Author Topic: Reverse Z Cheat Sheet  (Read 1404 times)

0 Members and 1 Guest are viewing this topic.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1624
    • View Profile
    • Geeks3D.com
Reverse Z Cheat Sheet
« on: January 03, 2018, 07:53:08 PM »
Quote
Just recently I’ve started looking into ways to optimize the depth buffer precision for large draw distances and one specific approach caught my eye again. A technique which is now commonly referred to as Reverse Z. While it comes with just a few minor changes, the results can be quite considerable.

That considerable everyone should just go ahead and use it.

The general idea itself is actually very simple: instead of mapping the interval between the near and far plane [zn,zf] to [0,1], a special projection matrix is constructed in a way that it is being mapped to [1,0] instead.

Why this actually increases the depth buffer precision is not directly obvious, but I will also not go into detail here. I’ve added some references to articles on this topic at the end of this post.

Link: http://www.intrinsic-engine.com/reverse-z-cheat-sheet/