FrameBuffer / Multi light

Started by
24 comments, last by WhiskyAndCode 5 years, 4 months ago
On 12/2/2018 at 6:18 AM, ccel said:

 

The tutorial can be tweaked to greatly increase the number of lights.
Set NR_LIGHTS to some high value like 512, this is now your "maximum number" of lights on screen.

Then pass in a uniform for the number of active lights, the shader will exit the for loop. There's no need to render geometry per light, that makes it more complicated. This does a single pass that loops over all of your lights per pixel. 

Hello CCEL. Thank u for reply.

But i would like to know how to render contless light using geometry.
I'm following several tutorials, but I can not get this result. I do not know if any "LearnOpenGL" settings prevent the result.

This is a personal goal, I have no interest in using engines, this is a goal for knowledge.

If u can follow:
https://stackoverflow.com/questions/53549406/how-to-add-countless-lights-in-framebuffer

Advertisement

Ah sorry I misunderstood, I answered your question on stackexchange.

https://stackoverflow.com/questions/53549406/how-to-add-countless-lights-in-framebuffer/53607753#53607753

The point about doing it in a single pass still stands since you have more control over the loops and you can have any number of lights still (especially if you use a https://www.khronos.org/opengl/wiki/Shader_Storage_Buffer_Object). The 512 suggestion was just a suggestion for a max limit... you can't really render an infinite number of lights per frame anyway, it won't be real time anymore XD 

https://learnopengl.com/Advanced-Lighting/Deferred-Shading

"How we really use light volumes" ... :)

 

.:vinterberg:.

1 hour ago, vinterberg said:

https://learnopengl.com/Advanced-Lighting/Deferred-Shading

"How we really use light volumes" ... :)

 

Yeah, but my question is about "How we really use light volumes" HAHAHAHAHAH

It's difficult for me to get

adding the lightspaces now I have this result: (Each sphere has the framebuffer rendered and with the respective light)

 

SHIT.thumb.png.7408d5643b5e6d52d26073e36fba5de9.png

This topic is closed to new replies.

Advertisement