About blend, Need help


I am facing a problem on image blend. I blended 2 images with 50% transparency, the 2 images cross with 90 degree. but when I rotate the this object, a part of image where behind the front image is invisible also with 50% transparency, why?

any advice would be appreciated.

Unfortunately (at least up to opengl 1.2), opengl simply cannot do transparency like that. So it uses blending, along with the depth buffer that only remember the depth value.
You should draw your objects in a given order: from the farest translucent one to the nearest one.

Hope this helps.

Disable depth test when drawing transparent geometry.
With 50% transparency, drawing order may not matter. Nor with additive transparency.
In most other cases, you would need to sort yourself from back to front the transparent polygons.

Thanks, I will try with the write order.
Anyway, that would be better if there is any sample for refering…

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.