Single Pass Dual-Paraboloid Shadow Mapping

I was wondering about the possibility to create the shadow map(s) for dual-paraboloid shadow mapping in one single pass. I’m probably way off and that’s why I’m posting it here. Maybe there wouldn’t even be any performance gains, but it could be worth trying.

Drawing from the method presented by Brabec et al. in their paper, couldn’t one instead use a single shadow map of proportions 2:1 (e.g. 2048x1024) and instead of culling fragments in the wrong hemisphere by looking at the sign of the z-coordinate, use this to choose whether to write in the left or right half of the shadow map. Geometry would only have to be transformed once, and one could probably still make use of 4-sample PCF with free depth comparison in hardware, plus double speed Z-only rendering.

But as I said, maybe I’m completely off, so don’t “cut my head off” for posting a stupid idea.

Rewriting it to work when both shadow maps are in a single texture shouldn’t be a big problem. Generating that texture, however, is a different story. The main problem, I think, would be dealing with triangles that span the boundary between the two hemispheres. Your vertex shader can’t possibly detect that case, and even if it could, I don’t see any way to handle this situation.

Note that doing the two passes as described in the paper shouldn’t be that bad provided you build some smart culling into your app. The two hemispheres show completely different geometry, and you don’t need to render anything that’s outside the light source’s radius.