View Full Version : Particle Woes

01-19-2002, 12:54 PM
My Particle system has a problem. If Depth testing is on then the particles block each other out for obvious reasons. When is is off it is ok but then you can see the particles through walls and everything for that matter. What do i have to do so they dont block each other out and so you cant see them through walls?

01-19-2002, 02:11 PM
Draw all opaque geometry 1st.

Turn Depth testing on
Turn Z writing off

Draw all your particles.

Ideally all your particle should be depth sorted, but not everyone does this.

If they are drawn as Addative blends, then you dont need to sort.


[This message has been edited by Nutty (edited 01-19-2002).]

01-19-2002, 02:38 PM
Thanks... I know how to turn depth testing on/off (not kinda hard ;-p ), but how do i turn z writing off?? BTW, they are drawn using glBlendFunc(GL_SRC_ALPHA, GL_ONE);

[This message has been edited by MrShoe (edited 01-19-2002).]

01-19-2002, 04:10 PM
turns Z-writing off
turns it back on

01-19-2002, 06:40 PM
Sweet, thanks!