title: What exactly do i need to write to add the ability for emission maps to this shader
body: <p>I am trying to understand shaders written with code, The shader that this is for is sprites in a 3D world in unity that react to the 3D lighting and will have emission maps. I will use shader graph later but wanna see how I can add a very basic emission map with code cause I am not that familiar with shaders and am not exactly sure where to write what, I think this will help me understand shaders a bit more.</p>
  <pre><code>{
      Properties
      {
          [PerRendererData] _MainTex(&quot;Sprite Texture&quot;, 2D) = &quot;white&quot; {}
          [PerRenderData] _EmissionMap(&quot;Emission Map&quot;, 2D) = &quot;white&quot; {}
          [HDR] _EmissionColor(&quot;Color&quot;, Color) = (1,1,1)
          _Color(&quot;Tint&quot;, Color) = (1,1,1,1)
          [MaterialToggle] PixelSnap(&quot;Pixel snap&quot;, Float) = 0
          [HideInInspector] _RendererColor(&quot;RendererColor&quot;, Color) = (1,1,1,1)
          [HideInInspector] _Flip(&quot;Flip&quot;, Vector) = (1,1,1,1)
          [PerRendererData] _AlphaTex(&quot;External Alpha&quot;, 2D) = &quot;white&quot; {}
          [PerRendererData] _EnableExternalAlpha(&quot;Enable External Alpha&quot;, Float) = 0
          _Cutoff(&quot;Alpha Cutoff&quot;, Range(0,1)) = 0.5
      }
  
          SubShader
          {
              Tags
          {
              &quot;Queue&quot; = &quot;Transparent&quot;
              &quot;IgnoreProjector&quot; = &quot;True&quot;
              &quot;RenderType&quot; = &quot;Transparent&quot;
              &quot;PreviewType&quot; = &quot;Plane&quot;
              &quot;CanUseSpriteAtlas&quot; = &quot;True&quot;
          }
  
              Cull Off
              Lighting Off
              ZWrite Off
              Blend One OneMinusSrcAlpha
  
              CGPROGRAM
      #pragma surface surf Lambert vertex:vert alphatest:_Cutoff addshadow nofog nolightmap nodynlightmap keepalpha noinstancing
      #pragma multi_compile_local _ PIXELSNAP_ON
      #pragma multi_compile _ ETC1_EXTERNAL_ALPHA
      #include &quot;UnitySprites.cginc&quot;
  
              struct Input
          {
              float2 uv_MainTex;
              fixed4 color;
          };
  
          void vert(inout appdata_full v, out Input o)
          {
              v.vertex = UnityFlipSprite(v.vertex, _Flip);
  
      #if defined(PIXELSNAP_ON)
              v.vertex = UnityPixelSnap(v.vertex);
      #endif
  
              UNITY_INITIALIZE_OUTPUT(Input, o);
              o.color = v.color * _Color * _RendererColor;
          }
  
          void surf(Input IN, inout SurfaceOutput o)
          {
              fixed4 c = SampleSpriteTexture(IN.uv_MainTex) * IN.color;
              o.Albedo = c.rgb * c.a;
              o.Alpha = c.a;
              //o.Emission = 
          }
          ENDCG
          }
  
              Fallback &quot;Transparent/VertexLit&quot;
  }
  
  </code></pre>
  <p>This is my current code I would like to know what I exactly need to write where cause I keep having problems or errors I hope the question can be answered on here.</p>