What is the most common/simplest/fastest way to depth-test for a certain range?
pass if (currentDepth-offset < newDepth && newDepth < currentDepth)
- currentDepth := value in the depth buffer
- offset := constant (know at compile-time and for all fragments the same)
- newDepth := depth of the fragment
Ideally, the function glDepthFunc(...) would be more flexible.