Depth Test (Z-test)
Compare incoming fragment Z value with Z value in Z-buffer, accept or reject based on comparison
- Same comparisons as with ALPHA test
Biggest difference from Alpha test is that we must read the old Z value from the Z-buffer
- ALPHA test uses same reference value for incoming pixels.
- Note we can reject fragment early (don’t read Z-buffer) if test is GL_NEVER
Same hardware requirements as Alpha test
- Z value tends to be wider than alpha value, usually 16 bits.