Shader Unlimited Lights

Started by
29 comments, last by DwarvesH 10 years, 8 months ago

Yup, just do it. My version might be hopefully very optimized, but it works. Here is one directional light and multiple point lights:

http://dl.dropboxusercontent.com/u/45638513/02_01.png

I managed to cut down on shader body implementations with parametrized uniform inputs for the pixel shader. You can have theoretically an unlimited number of lights, but after a fair number of pixels affected by the lights and overall objects illuminated, performance drops down quickly. But it is enough for most realistic lighting schemes.

This topic is closed to new replies.

Advertisement