Maybe it is werid, but I want to know How to get direction light’s position,without script
_WorldSpaceLightPos0 is rotation for direction light, so is it possible?
Edit: Misread, sorry.
You r welcome,Farfarer
Just write a javascript/c#script in which u place
Shader.SetGlobalVector (propertyName : String, vec : Vector4) —> Unity - Scripting API: Shader
then in your shader u have to put the propertyName an compute it
It is not possible, as far as I know. You can derive the position using of a spotlight using _LightMatrix0 in a ForwardAdd pass, but the light’s Z axis isn’t present in a directional light’s _LightMatrix0.
Thanks,Jessy,