GLSL shaders: how to use p3d_LightSource?

The light position is given in view space. I don’t have time to read through your shaders in detail right now, but I’ll add in some links for some example shaders for GLSL lighting that you could use as reference.

The size of the p3d_LightSource struct can be tweaked based on how many lights you are able to handle in your frame budget. If you declare too many, the remaining lights will automatically be black and not contribute. If you declare too few, then Panda will cull based on the most high-priority lights, as defined by the lights’ priority attributes.

Here are the links:

(Slightly outdated):
http://rdb.name/glsl-lighting.zip