Jump to content
  • Advertisement
Sign in to follow this  
marrshal

Transparency problem

This topic is 2490 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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 may 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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!