Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Gammastrahler

Problem with Particle Engine

This topic is 5877 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

Hi, i´m working on a particle engine. The problem i have is drawing the particles: if one particle is drawn with blending on, and glBlendFunc(GL_SRC_ALPHA, GL_ONE), everything looks OK. But if two particles overlap, i see the intersecting rectangle of the two particles. How can i avoid this? Setting a color key is not desired, since it causes particles to look raggged. Can some one help me? Thanks Gammastrahler

Share this post


Link to post
Share on other sites
Advertisement
try other blending methods
eg
one 1-src_alpha
one one
src_alpha 1-src_alpha etc
though only the last one will not ''brighten'' if 2 textures overlap (which is normally what u want anyway for stuff like fire explosions etc)

http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
you can also try to disable depth writing (glDepthMask() if i recall corectly)


mfg Phreak
--
"Input... need input!" - Johnny Five, Short Circuit.

Share this post


Link to post
Share on other sites
Hairybudda... disabling depth tests will most likely cause artifacts where particles are not occluded by other surfaces (walls and whatnot) when they should be. Disabling depth writes is the better way to do it.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!