[][src]Module gfx::preset::depth

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.