Not sure if this is a bug in Unity, but it seems it
but in the shader, _WorldSpaceLightPos0.xyz becomes 0,0,0
if the lights intensity = 0
i.e. GetComponent().intensity = 0;
Not sure if this is a bug in Unity, but it seems it
but in the shader, _WorldSpaceLightPos0.xyz becomes 0,0,0
if the lights intensity = 0
i.e. GetComponent().intensity = 0;
Working as intended AFAIK. Any light that has an intensity or color of 0.0 isn’t considered a valid light and is ignored. So when you set the intensity to 0, and there are no other directional lights in the scene, Unity will go “oh, there are no lights, send the shaders the default light property values.” And that basically means all the light properties go to all zeros.