View Full Version : Occlusion quereis and depth test using shaders

08-19-2006, 09:10 AM
Anybody have an idea how to implement a shader version of the NV_OCCLUSION_QUERY? I need to do this for adding more functionality, for example, compute and retrieve the penetration depth in collision tests.


08-19-2006, 02:48 PM
I do not think this is possible...

While gathering data on visible samples can be done by running a special shader on each fragment and summing it after reading the data to the CPU, you won't be even able to write a shader that exacly computes the number of samples (because there is no programmable blending).

08-19-2006, 07:13 PM
As Zengar points out, the GPU doesn't have generalized programmable methods for doing information gathers like this.