Global Light Info in Custom Shader, similar to the Lights Node

@Evgeni_Popov I’m trying to get lighting information into my shader as well. I’ve used your hints as a starting point and had a look at default.fragment.fx. One can immediately see in the lightFragment.fx that no light contribution is computed if the light is not defined (#ifdef LIGHT{X}). So I had a look where this is defined and it seems to be done in MaterialHelper.PrepareDefinesForLight(). What I don’t see is that this would ever be called for a ShaderMaterial. So how is the lighting info passed on the CPU side to the shader in a ShaderMaterial?