Applying Pragma Forwardbase, Inserting Shadowcoords in the struct and Transfershadow in the geometry output don't seem to affect the Shadow Attenuation result of the fragment pass applied to the geometry. I wonder if my placement of certain code is wrong or my include files are incomplete though I can't see the problem myself I was wondering if more experienced shaderlab programmers could see what I'm doing wrong here my current shader is only focussed on receiving shadows using directional lighting. I added comment lines to highlight the Shadow implementation. Code (CSharp): CGINCLUDE #include "UnityCG.cginc" #include "Lighting.cginc" #include "Autolight.cginc" #include "CustomTesselation.cginc" #pragma multi_compile_fwdbase nolightmap nodirlightmap nodynlightmap novertexlight float _CardSize; float _CardRemovalVal; float _RenderDistance; sampler2D _WindDistortionMap; float4 _WindDistortionMap_ST; float2 _WindSpeed; float _WindStrength; float _OffsetAmount; float _DisplacementStrength; struct geometryOutput { float4 pos : SV_POSITION; float2 uv : TEXCOORD0; SHADOW_COORDS(1)//---------------------------------------------- }; geometryOutput VertexOutput(float3 pos, float2 uv) { geometryOutput o; o.pos = UnityObjectToClipPos(pos); TRANSFER_SHADOW(o)//---------------------------------------------- o.uv = uv; return o; } float3x3 AngleAxis3x3(float angle, float3 axis) { float c, s; sincos(angle, s, c); float t = 1 - c; float x = axis.x; float y = axis.y; float z = axis.z; return float3x3( t * x * x + c, t * x * y - s * z, t * x * z + s * y, t * x * y + s * z, t * y * y + c, t * y * z - s * x, t * x * z - s * y, t * y * z + s * x, t * z * z + c ); } float rand(float3 co) { return frac(sin(dot(co.xyz, float3(12.9898, 78.233, 53.539))) * 43758.5453123); } [maxvertexcount(8)] void geo(triangle vertexOutput IN[3] : SV_POSITION, inout TriangleStream<geometryOutput> triStream) { geometryOutput o; float3 pos = IN[0].vertex; float3 wpos = IN[0].wpos; float2 wposuv = IN[0].wposuv; float3 vertNormal = IN[0].normal; float4 vertTangent = IN[0].tangent; float3 color = IN[0].color; float3 randomOffset = (rand(wpos) * 2 - 1) * _OffsetAmount; randomOffset.y = 0; float viewDistance = distance(wpos, _WorldSpaceCameraPos); if (_CardSize * color.r < _CardRemovalVal || viewDistance > _RenderDistance) return; float3 vertCross = cross(vertNormal, vertTangent) * vertTangent.w; float3x3 tangentToLocal = float3x3( vertTangent.x, vertCross.x, vertNormal.x, vertTangent.y, vertCross.y, vertNormal.y, vertTangent.z, vertCross.z, vertNormal.z ); float3x3 facingRotationMatrix = AngleAxis3x3(rand(pos) * UNITY_TWO_PI, float3(0, 0, 1)); float2 uv = pos.xz * _WindDistortionMap_ST.xy + _WindDistortionMap_ST.zw + _WindSpeed * _Time; float2 windSample = (tex2Dlod(_WindDistortionMap, float4(uv, 0, 0)).xy * 2 - 1) * _WindStrength; float3 wind = float3(windSample.x, 0, windSample.y); float2 wposUV_tex = tex2Dlod(_RenderTexture, float4(wposuv.xy, 0,0)); float3 renderDisplacement = (float3(wposUV_tex.x -0.25, 0, wposUV_tex.y -0.25)) * _DisplacementStrength; float3x3 transformationMatrix = mul(tangentToLocal, facingRotationMatrix); pos.xz += vertTangent * randomOffset.xz; //first quad triStream.Append(VertexOutput(pos + mul(transformationMatrix, float3((-_CardSize / 2) * color.r, 0, 0)), float2(0, 0))); triStream.Append(VertexOutput(pos + mul(transformationMatrix, float3((_CardSize / 2) * color.r, 0, 0)), float2(1, 0))); triStream.Append(VertexOutput(pos + renderDisplacement + wind * (color.r * _CardSize) + mul(transformationMatrix, float3((-_CardSize / 2) * color.r, 0, _CardSize * color.r)), float2(0,1))); triStream.Append(VertexOutput(pos + renderDisplacement + wind * (color.r * _CardSize) + mul(transformationMatrix, float3((_CardSize / 2) * color.r, 0, _CardSize * color.r)), float2(1, 1))); //start second quad triStream.RestartStrip(); triStream.Append(VertexOutput(pos + mul(transformationMatrix, float3(0, (-_CardSize / 2) * color.r, 0)), float2(0, 0))); triStream.Append(VertexOutput(pos + mul(transformationMatrix, float3(0, (_CardSize / 2) * color.r, 0)), float2(1, 0))); triStream.Append(VertexOutput(pos + renderDisplacement + wind * (color.r * _CardSize) + mul(transformationMatrix, float3(0, (-_CardSize / 2) * color.r, _CardSize * color.r)), float2(0, 1))); triStream.Append(VertexOutput(pos + renderDisplacement + wind * (color.r * _CardSize) + mul(transformationMatrix, float3(0, (_CardSize / 2) * color.r, _CardSize * color.r)), float2(1, 1))); } ENDCG SubShader { Cull Off Tags { "Queue" = "Transparent" "RenderType" = "Transparent" } Pass { Tags { "LightMode" = "ForwardBase" } ZWrite On AlphaToMask On CGPROGRAM #pragma vertex vert #pragma fragment frag #pragma geometry geo #pragma hull hull #pragma domain domain #pragma target 4.6 #pragma multi_compile_fwdbase #include "UnityCG.cginc" #include "AutoLight.cginc" #include "Lighting.cginc" sampler2D _MainTex; float4 _TopColor; float4 _BottomColor; float _ShadowStrength; float4 frag(geometryOutput i, fixed facing : VFACE) : SV_Target { half atten = SHADOW_ATTENUATION(i);//----------------------------- float4 tex = tex2D(_MainTex, i.uv); float4 col = lerp(_BottomColor, _TopColor, i.uv.y); col *= atten; tex *= col; return tex; } ENDCG } } }