178 reputation
6
bio website
location
age
visits member for 3 years, 1 month
seen Sep 23 at 13:19

Apr
10
awarded  Teacher
Mar
11
answered How do I prevent clicking at the end of each sound play in OpenAL?
Jan
5
awarded  Popular Question
Mar
15
comment Deferred shading - how to combine multiple lights?
Nope, deferred shading doesn't work that way. I have to draw the scene only once and store relevant information in G-Buffer. Then a sphere of influence for each light and blend it with the light buffer. And finally combining light buffer with colorbuffer I get the final shaded color buffer. The amount of lighting computations doesn't depend on scene complexity. That is the main advantage of deferred shading in the first place.
Mar
15
comment Can I use the default depth buffer when drawing to FBO?
What do you mean by reliably? In fact you can both read and write to default depth buffer using glReadPixels(format set to GL_DEPTH_COMPONENT) and glDrawPixels(format set to GL_DEPTH_COMPONTENT and calling glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE) prior to that to indicate that we are not gonna change the color buffer). This however may not be the most effiecient and up-to-date of method of doing so.
Mar
14
asked Can I use the default depth buffer when drawing to FBO?
Mar
13
awarded  Supporter
Mar
13
awarded  Scholar
Mar
13
accepted Deferred shading - how to combine multiple lights?
Mar
13
comment Deferred shading - how to combine multiple lights?
Yeah, and the question is - how do you add to the light render target? Using alpha blending as Nathan Reed suggested? Because as far as i know you can't read from and write to the same output buffer (which is the light buffer in this case).
Mar
12
comment Deferred shading - how to combine multiple lights?
No, that doesn't work that way. I draw a sphere for each point light. Unless the second point light lies withing the sphere of influence of the first light, the second light simply wont be drawn. Your method would work if I draw a fullscreen quad for all the pointlights, however, that is not the correct approach because fullscreen quads are used for global ilumination. Say I have 16 small point lights, that would force me to go through them for each pixel even if the pixel is not lit by it. And usually I'd say each pixel is lit by a one or two lights. And what if i have 100 lights? NO
Mar
12
awarded  Editor
Mar
12
revised Deferred shading - how to combine multiple lights?
deleted 1 characters in body
Mar
12
awarded  Student
Mar
12
asked Deferred shading - how to combine multiple lights?