Jump to content
  • Advertisement

Archived

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

mhays

Shadow Volumes - Black Snow Bug

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

I''ve recently implemented Shadow Volumes in DX9, and am having a problem with a bug which i can''t seem to fix. I assume it is caused by round errors when rendering the volumes to the stencil buffer. Basically, there are shadowed dots under the model, and when they are "over" the shadow, they turn light. You can see the bug here here.... http://www.phrenicgames.com/temp/SnowBug.jpg it''s a little hard to see, but it''s alot easier to see in motion. Basically if you look really close there are little black dots under the model, and there are light dots over the shadow. I assume these are at the edges of the shadow volume. Any help or suggestions would be greatly apprectiated. Thanks Marcus Hays

Share this post


Link to post
Share on other sites
Advertisement
Sounds like you are running into a depth buffer issue. If you are using a 16 bit depth buffer try setting it to 32-bits. Also, you may want to play with pixel offset as this should fix the problem.


-dizzy
Game Institute Intern

Share this post


Link to post
Share on other sites
I''m using the D3DFMT_D24S8 format. I think that''s supposed to be 24 bits depth and 8 for stencil. Since I need to have a stencil buffer, I''m not aware of any format I can use that would use 32 bits of depth, and still have room for stencil. Do you have any suggestions for a format?

Thanks

Marcus

Share this post


Link to post
Share on other sites
are you cappping the shadow volume? looks like this is a z fight between the shadow volume and the model. If yes try displacing the front cap slightly in the normal direction.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!