News for hackers. Stuff that matters.
Re:My favorite tools and techniques for procedural gamedev by Const-me on Sunday July 28, 2024 @01:47PM (#41094703)
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.

Re:My favorite tools and techniques for procedural gamedev by wilberton on Sunday July 28, 2024 @04:03PM (#41095570)
Yeah, 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.
Re:My favorite tools and techniques for procedural gamedev by taneq on Sunday July 28, 2024 @09:03PM (#41097204)
All 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.