Jump to content
  • Advertisement
Sign in to follow this  

Stencil Buffer (shadows)

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

Hi I'm a long time reader, but just signed up as a member today. I've been working on a small project for a few months and have some simple shadows which look nice but have some issues. I basically render a texture of the players into a texture and project it onto my level mesh like a shadow map (I think this is called projective texture shadows). As the shadow map is a texture (not depth component) I can pass them through a Gaussian kernel filter and get the nicely smooth which means small textures like 512x512 look nice. Only problem with this is unlike depth component shadow maps I'm getting getting all kinds of back projection (shadow projecting onto polygons facing away from the light). I have found a temporary solution which is ok but not perfect. Ideally I would like to use the stencil buffer from the lights view to essentially ignore all poly's facing away from the lights view I can do this, but do I then need to then transform the stencil buffer from light space into eye space (like I do with the texture map) I'm not sure how to do this and cant seem to able to find any info on this subject. This is an old project I'm just polishing up for portfolio so don't really want to implement any different shadowing (which I have done in other projects) Any info would be great

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!