Jump to content
  • Advertisement
Sign in to follow this  
codingsolo

Particle being rendered after everything else, but renders occluded

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

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
Advertisement
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
Sign in to follow this  

  • 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!