Light Indexed Deferred Rendering demo + paper

sqrt[-1]

Newcomer
Against my better judgment, I though I would post my paper and demo here you you guys to tear apart.

This is a deferred lighting approach that simply assigns each light a unique index and then stores this index at each fragment the light hits, rather than storing all the light or material properties per fragment. These indexes can then be used in a fragment shader to lookup into a lighting properties table for data to light the fragment.

This technique can be broken down into three basic render passes:

1) Render depth only pre-pass
2) Disable depth writes (depth testing only) and render light volumes into a light index texture.
Standard deferred lighting / shadow volume techniques can be used to find what fragments
are hit by each light volume.
3) Render geometry using standard forward rendering – lighting is done using the light index
texture to access lighting properties in each shader.

What this achieves is the main advantages of deferred rendering (complex light object scene interactions) with ways around the disadvantages (fat buffer sizes, MSAA and transparency issues)

This technique has a obvious down side of limiting the number of lights that can hit a fragment - but this can be easily managed in a game editor context.
However, I think artists would prefer to have as many non-shadowing lights as they want and deal with overlap issues than the current situation of X lights per object and having to break up objects into small pieces.

Read the full paper here:
http://lightindexed-deferredrender.googlecode.com/files/LightIndexedDeferredLighting1.1.pdf

If you have an Nvidia card you can get the demo here:
http://lightindexed-deferredrender.googlecode.com/files/LightIndexedDeferredRendering1.0.zip
 
Sweet! Runs at a full 20fps on my 6600. :p

Any particular reason why it doesn't run on ATI, or is it merely that it's only been tested on Nvidia? I've read the paper and there doesn't seem to be anything fancy required that would prevent it from working on ATI, although I got an error message on a shader on load. Haven't tried debugging it.
 
Yeah it has only been tested on Nvidia.

The only issues is on ATI is it would fall back to using the stencil approach instead of depth bounds when rendering the light spheres.

If someone wants to debug on ATI , I would be happy to update it.
 
I've tried debugging it a bit yesterday, but there appears to be multiple problems. I got it to load all shaders and run without GL errors, but rendering is still broken for some reason. I'll give it another shot tomorrow.
 
Very nice!
Runs 12-15fps on a 7600GS@1920x1080. 60fps@575x575.

I've found deferred rendering to be very interesting because we always need more lights, but I can't stomach cutting back on light models (diffuse, specular, anisotropic, subsurface, etc...). This is a nicely hybrid technique that brings us closer to capturing the best of both forward and deferred techniques.
 
I get 60 FPS with my 8800 GTX @1920x1200 4xFSAA and 30 FPS with 8xFSAA which is a strange halving of FPS.
 
Thanks for the ATi support!
Anyway, on the matter now:

> Radeon HD3870 @ 850/2500 MHz;
> Catalyst 8.1/Vista x86;
> 1600*1200 & 8xAA;

The above setup draws 114 fps with deferred lighting on and just 37 with the multi-pass path. Those numbers are taken from the Static Lights scene.
Didn't bother to test without AA, though. ;)

ALU:TEX ratio seems to be 5:1.
 
Last edited by a moderator:
Great work, sqrt.

With that said, this thread desperately lacks pictures and other screenshots! So, folks, let's try to update the thread with some visuals of some sort.
 
Screenshot,

DemoScreenshot_small.jpg
 
My results:

Vista64, Cat 8.1 WHQL, two PowerColor 3870's at 850 / 1250, 1680x1050 full screen rez, Static light scene

Scores are AA Level - Deferred / Static.

CF Disabled:
0 - 148 / 49
2 - 131 / 46
4 - 125 / 45
8 - 119 / 39

CF Enabled:
0 - 147 / 49
2 - 130 / 46
4 - 125 / 45
8 - 118 / 39

Doesn't seem to get much from crossfire ;)
 
Back
Top