Reputation: 517
I'm making some tests with alpha blending in a projet and I don't understand something.
In my tests I've done something like that and everything look good:
Every tutorial say that we should:
Here is the result:
So, I'm not sure to understand how it work/what is wrong (I've read this document).
Thanks!
Upvotes: 1
Views: 1256
Reputation: 43319
You typically disable depth writes (e.g. glDepthMask (GL_FALSE)
) for the translucent objects, but the depth test itself is not something you would disable.
You need to test against the depth values generated by the opaque objects for this to function correctly, otherwise you have to sort both your opaque and translucent objects (which is exactly what you did originally).
Upvotes: 1