Skip to main content
GameDev.net gamedev.net
🔒 Locked

Transparency problem

Started by marrshal Feb 22, 2012 at 9:08 AM 0 replies 650+ views
Original Post
marrshal
marrshal
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!
MarrShal
Brother Bob
Brother Bob
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.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.