PDA

View Full Version : Occlusion quereis and depth test using shaders



yalmar
08-19-2006, 08: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.

Thanks,

Zengar
08-19-2006, 01: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).

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