#96953 - 0xtob - Mon Aug 07, 2006 12:01 am
While fooling around with 3D, I stumbled upon a rather nasty problem with transparent textures:
I'm using the GL_RGB32_A3 texture format that has a 5-bit paletted color + a 3-bit alpha value. I have two objects, which are just quads with a semi-transparent texture.
The problem I encounter now is that the depth test seems to be inverted for semi-transparent textures. That means if object A is before object B, object B is still in the foreground. And when object A is behind object B, object A is still in the foreground. I switched the order in which the objects are drawn, which had no effect at all.
When using a texture with non-transparent, as well as semi-transparent and fully-transparent texels, then only the semi-transparent texels show this strange behaviour.
What could be causing this? Am I getting something wrong about the DS's alpha blending?
Thanks in advance!
Tob
I'm using the GL_RGB32_A3 texture format that has a 5-bit paletted color + a 3-bit alpha value. I have two objects, which are just quads with a semi-transparent texture.
The problem I encounter now is that the depth test seems to be inverted for semi-transparent textures. That means if object A is before object B, object B is still in the foreground. And when object A is behind object B, object A is still in the foreground. I switched the order in which the objects are drawn, which had no effect at all.
When using a texture with non-transparent, as well as semi-transparent and fully-transparent texels, then only the semi-transparent texels show this strange behaviour.
What could be causing this? Am I getting something wrong about the DS's alpha blending?
Thanks in advance!
Tob