billboard particles depth testing

I’m putting together and example for ofVbo and thought it would be nice to put in a point sprite example.

I just noticed that if you are drawing 3d shapes in the world then billboards around you need to enable depth testing.

glEnable(GL_DEPTH_TEST);

the problem is that this will cause the the billboard to get a box around them. Basically it looks like the alpha blending is no longer working. I have search the crap out of the opengl internet but no luck. Does anyone have any idea what is going on?

T

my guess is that drawing order does matter if alpha/transparency is involved. you should draw textures with alpha from back to front.
See http://vvvv.org/documentation/transparency -> about 2/3 down, “Where Drawing Order Matters…”. Technically for DirectX, but I figure similar things apply for OpenGL

[quote author=“vanderlin”]I’m putting together and example for ofVbo and thought it would be nice to put in a point sprite example.

I just noticed that if you are drawing 3d shapes in the world then billboards around you need to enable depth testing.

glEnable(GL_DEPTH_TEST);

the problem is that this will cause the the billboard to get a box around them. Basically it looks like the alpha blending is no longer working. I have search the crap out of the opengl internet but no luck. Does anyone have any idea what is going on?
[/quote]

Have you tried to disable writing into the depth-buffer for your point sprites, via

  
  
glDepthMask(false);  
  

you should render your point-sprites at the end of your frame, otherwise other geometries may overwrite you point-sprites regardless of their depth.

cheers,
Stephan