1 .. _depth,stencil,&alpha:
3 Depth, Stencil, & Alpha
4 =======================
6 These three states control the depth, stencil, and alpha tests, used to
7 discard fragments that have passed through the fragment shader.
9 Traditionally, these three tests have been clumped together in hardware, so
10 they are all stored in one structure.
12 During actual execution, the order of operations done on fragments is always:
22 Whether the depth test is enabled.
24 Whether the depth buffer receives depth writes.
26 The depth test function. One of PIPE_FUNC.
31 XXX document valuemask, writemask
34 Whether the stencil test is enabled. For the second stencil, whether the
35 two-sided stencil is enabled.
37 The stencil test function. One of PIPE_FUNC.
39 Stencil test reference value; used for certain functions.
41 The operation to carry out if the stencil test fails. One of
44 The operation to carry out if the stencil test passes but the depth test
45 fails. One of PIPE_STENCIL_OP.
47 The operation to carry out if the stencil test and depth test both pass.
48 One of PIPE_STENCIL_OP.
54 Whether the alpha test is enabled.
56 The alpha test function. One of PIPE_FUNC.
58 Alpha test reference value; used for certain functions.