This is a post I wrote a little while ago internally for the team I was on all about reverse z (it took me longer than I'd like to admit to wrap my head around it πŸ˜…πŸ™ˆ). Hopefully, someone finds it helpful! https://tomhultonharrop.com/mathematics/graphics/2023/08/06/reverse-z.html

Heavily inspired by the work of @reedbeta and @benjamin

Reverse Z (and why it’s so awesome)

Topic

Tom Hulton-Harrop

@tom_h_h Thanks for the article! Yet another example of how we ignore the details of a given numerical representation at our peril.

This is coming to me at the perfect time as I just read the section on this in Lengyel's book on rendering, and am about to implement it. I'll likely use your article as a reference.

BTW, that book has the best visualization of this that I've seen:

https://foundationsofgameenginedev.com/figures/FGED2-Figure6.8.png

@aminom Pleasure! πŸ™‚ Thanks for the feedback, and that reference is great, I think I have a copy of that kicking around somewhere! πŸ˜… At the end of the article there are a couple of links to working implementations of this (one in OpenGL and one in Metal) that could be helpful to refer to. I also have a project using it in Vulkan if you'd like to see that too. Thanks again!