3 ms·
I have had mixed experiences with using depth pre-pass. When I tried it a few times, I didn’t see any significant performance improvements on midrange to high e
by Const-me 2y ago
I have had mixed experiences with using depth pre-pass. When I tried it a few times, I didn’t see any significant performance improvements on midrange to high end desktop GPUs. I'm not entirely sure why, but I suspect it was due to early Z rejection saving pixel shader invocations. Typically, I render my opaque meshes in front-to-back order.
To be fair, my experimentation was within the context of a CAD/CAM application rather than a game. The scenes were quite different from typical game environments, with minimal textures and very high-poly geometry.
- wilberton 2y agoYeah, a depth prepass won't help you if you're vertex bound. It's most useful when you have high depth complexity and expensive fragment shaders (which to be fair is most games). It's also not usually required for a deferred renderer, but for forward+ it's normally a decent win.
- taneq 2y agoAll of these techniques are super situational and depend not only on the overall game and engine but on the specific artwork and scene composition etc. Depth pre-pass is also often the first step of occlusion culling, but again that’s situational. Much more likely to be useful for a complex cityscape than a CAD model.