View Full Version : Occlusion Query, FBO and Alpha Testing

03-22-2007, 02:52 AM
I'm having some problems with occlusion query on ATI board that I hope you can help me with.

I'm rendering to a FBO, and using a occlusion query to determine how many pixels are going to visible for each object. The objects are rendered front-to-back with blending enabled. I have enabled alpha testing when rendering the occlusion queries. My occlusion query always returns 0 if I do not disable depth test! This is pretty strange as the FBO does not have a depth buffer attached. Has anyone run into similar problems on ATI.

The code fails on FireGL v7100, and FireGL v7340 - but runs perfectly on NVIDIA (GeForce 6800 GTX, GeForce 7900 GTX, and GeForce 8800 GTX).

03-22-2007, 04:47 AM
Actually you shouldn't be able to render to the FBO with depth test enabled as long it has no depth attachment, AFAIK. This is because the depth test cannot be performed.

03-22-2007, 08:41 AM
Zengar, that is what I expected - but apparently it only works with depth test enabled :(

03-22-2007, 11:47 PM
ATI's hardware counts fragments "that would modify the depth buffer".

If depth test is off, or you don't have a depth buffer, then it doesn't count anything.