On 4/5/07, Lagarde Sébastien <slagarde@e-neko.com> wrote:

And I not understand why shadow collector is the z-prepass, don't you need to do a z-prepass before to render in the shadow collector,

You can save a lot of compare and texture fetch or I missed something ?

You can do it in both ways as you may want to gather your occlusion term in the z-prepass (in this case it wouldn't be a canonical
z-prepass anymore) or you want to re-use per pixel depth values generated in the z-prepass in the occlusion term gathering pass, both
ways can be a win on different platform/games.
In our title we render a full precision depth buffer in the z-prepass and then we use it as a texture in subsquent rendering passes to
gather the final per pixel occlusion/shadowing term, as in our case it happens to be way faster than the first method.