using 2018.4.8f1
When i use _WorldSpaceLightPos0 in a forwardbase shader and if there is a realtime point light in the scene, my mixed directional light direction is not equal to _WorldSpaceLightPos0. even if .w = 0.
if the point light is baked, it is equal.
Isnt _WorldSpaceLightPos0 is just a directional light when in forwardbase?
Two first things I’d check:
-
Are you absolutely sure you know what lights are active in your scene? typiing “t:light” into the project window navbar can sometimes reveal unexpected items sitting in your scene (often inside someone else’s prefab)
-
When using point-lights, are you also using the relevant #ifdef for your current mode? I remember having problems in the past when leaving those out.
e.g. #ifndef USING_DIRECTIONAL_LIGHT
c.f. Conditional Shader Variant USING_DIRECTIONAL_LIGHT