ABSTRACT

In the following sections, I will describe each stage in detail. The source GLSL code of a working implementation can be found on the OpenGL Insights website, www.openglinsights.com.

The early depth pass is a special rendering stage that draws an opaque part of a scene into the depth buffer without any color output. The pixel processing cost for this operation is minimal. It guarantees that only visible fragments will be processed by heavy pixel shaders when the actual drawing of a scene is performed, with the depth buffer attached in read-only mode. This pass utilizes the double-speed, depth-only function implemented in the hardware for many cards [Cozzi 09].