What's the relation and difference between early-z, pre-z, z-pre?all of them have hardware one and software one?what the relation and difference between them?

what’s the relation and difference between early-z, pre-z, z-pre?
all of them have hardware one and software one?what the relation and difference between them?
Thanks!

I have never heard of “pre-z” or “z-pre”, so having links to someone using those terms would help.

https://www.gamedev.net/forums/topic/316415-z-pre-pass/

https://www.gamedev.net/forums/topic/316415-z-pre-pass/
https://www.reddit.com/r/vulkan/comments/1b2veku/forward_pixel_kill_vs_z_prepass/

Ok. So there’s no “z-pre”. It’s Z prepass (or depth prepass). And that refers to the graphics software application choosing to pre-render objects with depth (Z) writes with otherwise simple shaders.

Why? To try and take advantage of hardware depth-testing features that may be supported by the GPU and driver that can save fill. Depending on render state, the GPU can avoid some fragment shader executions for fragments (or groups of fragments, or even whole primitives) that are 100% occluded by pre-rendered geometry. That is geometry already rendered into the depth buffer. This is where vendor-specific terms like ZCULL / Hi-Z / Early-Z / etc. come in. See your GPU vendor’s programming guide for details.

thanks!
so why most renderEngine also prefer to add a Software z prepass while there is already Hardware early-z. What’s their relationship?

If the depth buffer already has all of the depths for the triangles you’re going to use, then any later triangles can be compared with that depth buffer and culled before doing any expensive fragment shader computations. But this is contingent on having hardware that can do that.

Software does a Z-prepass because hardware has early-Z. The one leads to the other.

Remember: the hardware doesn’t know what triangles you’re going to use in the future to render. It only knows the one it’s dealing with right now, and has the depth for anything that’s been rendered before.