I am writing a custom shader for the Universal Pipeline, only targetting the deferred path.
Light mainLight = GetMainLight(inputData.shadowCoord, inputData.positionWS, inputData.shadowMask);`
The function above takes in a shadowcoord value. However i am not sure if this is actually used in deferred. i am copying the logic from built-in shaders to ensure it works in any setting. My goal is also to keep out anything that is not used. I am uncertain if the shadowcoord needs to be set or not.
The logic below is what i see in the shaders from Unity a lot of time.
#if defined(REQUIRES_VERTEX_SHADOW_COORD_INTERPOLATOR)
#endif
I have been trying to figure out unsuccessfully when this keyword is true or false. it never seems true or i am testing it incorrectly.
I mostly just want to know if i actually need it or not? without the shadowcoord being set so it being 0, the shadows for the mainlight still seem to cast.