So I’ve got this shader:
http://pastebin.com/5iax5iX6
And I render it through a for loop like this:
for(Light light : lights)
[bind shader]
[enable blend: blend function (GL_SRC_ALPHA, GL_ONE)]
[shader uniforms based on light]
[render large quad the size of the display]
for(Entity e : entity)
[enable blend: blend function (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)]
[render entity]
[disable blend]
[bind shader]
I’ve tried other blending methods, and most of them don’t let more than one light… light it.
Image:
MP4 format: http://gyazo.com/ea3b8611e0d746a1f8783db22320a198