Monday, April 19, 2010
Got Stencil Light Volumes to work
Finally got the stencil buffer to work. This will allow me to save some lighting time by not doing lighting computations on unlit pixels. The only drawback is that each light volume has to be drawn twice, which shouldn't really be too bad.
However, I'm not using stencil light volumes for the speedup primarily - since I'm going to be reflected light volumes off of surfaces, almost the entire scene is going to have some contribution of light, and the stencil light volumes won't make much of a difference in rendering time. However, I can use stencil light volumes to precisely determine which lights are actually lighting a given pixel.
I'm going to start using a lighting technique called Light Indexed Deferred Lighting. The paper on it is here. I render each light volume with a different color, which is used for an array lookup to get the properties for that light. With alpha blending and bit-packing, I can have multiple overlapping lights (up to 16 with 4 render targets), which I'll need.
Thursday, April 15, 2010
Progress
Finally got a render from my deferred shader. It's a single directional light source, but at least I have most of the pieces in place that I need to continue.
Now I need to implement light volumes. The concept is similar to stencil shadow volumes (just reversed), so I've been reading about those (since there is more documentation).
Thursday, April 8, 2010
Going into the weekend
The alpha review for me wasn't great, but this weekend will be much better for getting some work done. I'm going to start working on getting a simple full screen directional light to test out compositing. Should have something tonight or tomorrow morning.
Subscribe to:
Posts (Atom)