RE: [Algorithms] Doom lightmaps
Brought to you by:
vexxed72
|
From: Alex C. <al...@ar...> - 2001-03-15 19:37:34
|
> This is not necessary if you draw the shadow volume polygons > only where > their Z depth is beyond the surface (vs. in front of the > surface, as is > normally done). A guy named Bilodeau from Creative Labs > explained this > technique at GDC 1999 (and I didn't learn of it until a few > months ago, > from the BioWare team, who are using it in Neverwinter > Nights). Basic idea > is to cap the shadow volumes against (or at least somewhere > near) the eye's > far plane, and render to the stencil buffer only when the > shadow volumes > are beyond the stored z-buffer depth values.> I had a try at implementing this. It certainly did seem to solve the camera intersection issues very nicely. However, self shadowing didn't seem to be working which is a little odd. (This has got to be a bug in my implementation) Also the capping scares me a tad. My utterly naieve attempt involved a pretty far clip plane, and ensureing the shadow volumes aren't projected that far and just rendering the entire mesh with back face culling on, incrementing the stencil value. Amazingly this seems to work so far. The "correct" approach would seem to be cull light facing tris, then project the mesh and treat the triangles like te rest of the shadow volume. I'm not yet sure how to do this fast in a veretx shader... Anyone else tried this varient of stencil shadows? Alex Clarke, Programmer Argonaut Games PLC |