Archived

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

_ralph

problem using particles

Recommended Posts

hi I´ve tried to implement some particle effects in my OGL based landscape engine using additive blending. Therefore I have to disable GL_DEPTH_TEST but as a result of this the particles either appear in front of the scenery or totally behind depending on when they are drawn -> whether before the landscape or after. Does anyone know a sollution for that ? thanks in advance ralph

Share this post


Link to post
Share on other sites
Guest Anonymous Poster

hi

First of all thanks for your reply but I still can´t get it.
-In order to get additive blending working properly, I have to disable GL_DEPTH_TEST, haven´t I ?
-How can I disable depth buffer writes ?

ralph

Share this post


Link to post
Share on other sites
I''m not sure what additive blending is... (GL_SOURCE_ALPHA and GL_ONE ??) but what I do is I just render the particles as a triangle strip for each one that is put together like a quad. And than I just make them in 3d... I think it would even be better if you make them in 3d.. yeah..

Share this post


Link to post
Share on other sites
No, you don''t want to disable GL_DEPTH_TEST, because then your particles would be seen through solid polygons in your world, for example walls.

I believe I know why you think you need to disable the test, because otherwise the particles aren''t rendered correctly. Well, you will fix this by disabling Depth buffer writing instead. This way the particles wont be seen through solid polygons but will blend nicely with each other.

I don''t know how to disable the depth buffer writes though. Maybe zedzeek''s way will work. If it doesn''t I could probably find out for you.

- WitchLord

Share this post


Link to post
Share on other sites