Occlusion Query, FBO and Alpha Testing

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).

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.

Zengar, that is what I expected - but apparently it only works with depth test enabled :frowning:

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.