Sign in to follow this  
marrshal

Transparency problem

Recommended Posts

I'm implementing a simple particle system. I draw a textured polygon where the particle is suposed to be. This texture has a transparent regions (in the edges). Here is the problem:

[attachment=7397:scr.JPG]

As you can see the in the transparent regions is draw the backround, not the part of the particle behind. During the rendering of the fountain I didn't disable depth testing or something similar.

Thanks in advance!

Share this post


Link to post
Share on other sites
Transparency is draw order dependent; you need to sort your particles and draw them from back to front. But depending on the visual results you get by not sorting, you [i]may[/i] get away with no sorting even though you technically do need it. In that case, you need to disable depth writes to ensure that particles closer don't block particles further away. Look into glDepthMask.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this