Hi, I am trying to create a shader which uses a custom light function as so:
half4 LightingCustom(SurfaceOutputCustom s, half3 lightDir, half atten) {
half NdotL = dot(s.Normal, lightDir);
half4 c;
half light = NdotL * atten;
float4 screenPos;
c.rgb = s.Albedo * _LightColor0.rgb * clamp(ceil(light * _LightSteps + rand(screenPos)) / _LightSteps, 0, 1);
c.a = s.Alpha;
return c;
}
screenPos is not defined in this context, and because the custom lighting functions cannot receive an Input struct, there is no way to get access to screenPos. How would I do this?