by Spike » Tue Oct 01, 2013 12:45 pm
z-pass means that you can skip caps. it can be an effective optimisation as it means you only draw edges and don't have quite so much fill rate (stencil shadows are quite expensive in fillrate, of course). z-pass will not work if the view is in shadow, but will be faster in the cases where it does work. The trick is writing the code to decide whether its safe to use z-pass for each individual light.
one potential optimisation is to optimise your shadow volumes to avoid excessive overdraw which can greatly help in when given complex geometry.
the main issue imho with complex geometry is not the extra fillrate that results from it, but rather the cpu costs from working out whether each triangle surface is facing the light or not. With the world, this can be precompiled and with the extra filling clipped away, but moving models will need to be animated and rechecked every single frame.
Most people seem to prefer shadowmapping nowadays. Softer shadows are generally nicer and much less harsh. The real advantage though is that you don't have to generate lots of shadow edges based upon surface normals, meaning you can just push the entire mesh to the gpu in one... or 6 rather... goes. As a result, it can scale much better at higher detail levels. Especially if you can ensure that they're spot/sun lights.
Is the theoroy, anyway.
.