I am nearly done coding the tiling version, but I ran into a problem: I decide which lights are assigned to which tiles by rendering the light volumes to an FBO with the same resolution as the tile grid dimensions, but if a volume is completely encompassed by a tile, it will disappear (too low resolution). Is there some way I can render to the FBO such that it will render to fragments as long as geometry is touching them?
Alright, I got the tiled deferred shading to work, but it actually runs significantly slower than the normal deferred shading. Using timer queries, I found that the problem wasn't on the GPU side, but the CPU was taking a lot of time to set up the lights after the light grid has been generated. Is glLightfv particularly slow? I have to call it hundreds of times each frame in order to set up the lights for each grid cell.
Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
Technical Blog: http://www.rastergrid.com/blog/
Yes, since I am using tile-based deferred shading: http://visual-computing.intel-resear...red_rendering/
It groups lights together based on tiles in order to reduce g-buffer look-ups.
Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
Technical Blog: http://www.rastergrid.com/blog/
It was the easiest to implement. Why not use it? Is it slow?
I can barely believe that it is in any way easier to implement than using uniforms.
Maybe because it's deprecated, or because it's not really general purpose, or because you are bound to 8 lights per draw call?
I would bet it is, though I don't know, I didn't call that function since the advent of programmable shaders.
Though, after this, I have doubts whether you actually implemented deferred rendering as that requires shaders and I (fortunately) haven't met anybody yet who used glLightfv with shaders.
Disclaimer: This is my personal profile. Whatever I write here is my personal opinion and none of my statements or speculations are anyhow related to my employer and as such should not be treated as accurate or valid and in no case should those be considered to represent the opinions of my employer.
Technical Blog: http://www.rastergrid.com/blog/