Jump to content
  • Advertisement

Archived

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

FlyingDemon

Particles are Z-Fighting

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

Advertisement
quote:
Original post by DrEvil
disable depth testing
That''s the obvious solution, but it won''t work in all situations. Post some more info, FlyingDemon, and we''ll be able to help a little more...

[Insert witty signature here]

Share this post


Link to post
Share on other sites
thanks.
I used glDepthMask(GL_FALSE) glDepthMask(GL_TRUE) to draw my particles and it works good so far. No more z-fighting.

but...
If i were to sort them would i have to perform a distance function for every particle or is there a faster way?

Share this post


Link to post
Share on other sites
i thought the point of depth was that things would automatically sort according to z location and camera? i dont understand why someone would have to sort the quads on their own when the 3d api is supposed to do it anyways... ??

Share this post


Link to post
Share on other sites
Particles are generaly blended. This means you have to draw them in the right order or it''ll look wrong with some of the blending mode. Additive blending is very popular because you don''t have to do depth sorting.

The Red Book explains this pretty extensively IIRC in the blending section.

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!