Skip to main content

Depth

During rasterization, materials can specify to the GPU that it should write their depth value into the depth buffer. The depth value specifies how near or far the pixel is from the camera.

The GPU then uses this depth information to compare the depth value that it will write with the one that already exists on that pixel and determine if that pixel should be drawn or not.

Depth Compare

This defines the 'comparison' function that the GPU will use to determine if a pixel fails the depth test or passes it.

Failing the depth test will result in the pixel not being drawn, while succeding the test will draw the pixel.

You can learn more about the different comparison modes here

Write Depth

Determines whether or not this material will write into the depth buffer.