when a shader can handle limited number of lights strange things can happen. I had problems with it e.g. in case of terrains, chunks can become totally black (I use no, or very low ambient). finally I separated the Sun light which is always the last dynamic light, by the help of iLights (I had also problems with the iLights for loop discussed with Jcl, now I use it differently than in 3dgs shaders). in theory it can be done with specbump.fx. but my solution uses a very different normal/specular mapping shader approach.


Free world editor for 3D Gamestudio: MapBuilder Editor