Expand description
Depth presets for depth tests.
Depth testing is used to avoid drawing “further away” fragments on top of already drawn fragments. Each fragment’s output depth is tested against a depth buffer, if the test fails the fragment will not be drawn.
A fragment’s output depth is the interpolated vertex z-value, or otherwise explicitly set (ie in OpenGL by gl_FragDepth).
Constants§
- LESS_
EQUAL_ TEST - “<=” comparison with read-only depth
- LESS_
EQUAL_ WRITE - When rendering a fragment, only draw when the fragment’s output depth is less than or equal to the current depth buffer value. Rendering will update the depth buffer with the new depth value.
- PASS_
TEST - When rendering a fragment, draw regardless of depth buffer state. Rendering will not update the depth buffer.
- PASS_
WRITE - When rendering a fragment, draw regardless of depth buffer state. Rendering will update the depth buffer.