Sign in to follow this  
codingsolo

Particle being rendered after everything else, but renders occluded

Recommended Posts

particle problem As seen in the image, the particle is being occluded by the model. The center point of the particle is his right hand. The particle is currently being drawn after everything else is rendered. ZEnable and ZWriteEnable are both true. Help me! Brandon

Share this post


Link to post
Share on other sites
Since you have Z buffer tests and Z buffer writes enabled, the first and obvious question is: what are the Z values of the vertices of the particle sprite?

On a related note, if you're transforming the particle sprite yourself (e.g. from a vertex shader), what is the W of each of the vertices of the sprite?

I.e. is your Z causing the rasterized Z values of the sprite to be very far away compared to the character polygons.

A longer shot is are you doing anything with the stencil buffer? volume shadows on the character perhaps? If so, have you remembered to disable the stencil tests when rendering particles?


PIX is great for finding out what's going on with things like this; you can see the transformed sprite coordinates to find out if their Z is sensible, and you can check what's in the stencil buffer and which stencil state is enabled.

Share this post


Link to post
Share on other sites
I'm assuming by the Z in your response you are always referencing the Z-buffer/W-buffer.

Using PIX, I was able to find the 6 vertices that I am sending into the shader to be drawn. I am only sending in an X,Y,Z ( along with color, tex coords, quad center point, and a rotation) in the vertex structure and can view the StreamSource just fine. I am not able to find out how to view the W component of the transformed vertex. Likewise, I am not able to view the stencil buffer surface.

Still working on it, though.

EDIT- Currently not doing anything with the stencil buffer for shadows or anything.

Depth surface rendered --



Brandon

[Edited by - codingsolo on May 24, 2007 7:49:54 PM]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this