Accessing screenPos in custom light function

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?

The input of your lighting function is the SurfaceOutputCustom strucd.
You can add a variable “screenPos” in this struct and define it in the Surface function.