Hi,
I am currently learning to apply lighting to my application, but then I got confused on how I should scale it. I'm using WebGL and I'm learning from learningwebgl.com (which they say the same as NeHe OpenGL tutorial), and it only shows simple shader programs that every sample have one program with embedded lighting on it.
Say I have multiple lighting setup, like some point lights/spot lights, and I have multiple meshes with different materials. What should I do? make individual shader programs where you put colors/textures to meshes and then switch to lighting program? or always have every shader texts with those lights as default in it and simply make variable passes to enable them?
Also I am focusing on per-fragment lighting.
Thanks for the help!