hello conitec,
currently I have some problems with getting different types of lights work properly in my shader and hope you have some answers to it.
The first problem is, that I can't separate between the different kinds of lights, so I have no Idea how to execute different code for directional, point- and spotlights. Currently I just treat everything as a pointlight.
The second thing is about the sun in combination with pointlights. If I treat the sun as a biiig pointlight (which is the default, because it's in the vecLightPos array) it's deactivated when the model is in the range of too many other lights, because it has the biggest distance. It looks really strange if the sunlight suddenly disappears. Maybe that could be fixed by making the sun the first light in the list.
I thought also about using vecSunDir and calculate it as a real directional light, but then you calculate the sunlight twice, because the sun position is still in the list of lights, which is of course not acceptable.
So, till now I didn't found a satisfying solution to this problem and hope, you can clear things up a little
Scorpion