Sign in to follow this  
BlackSeeds

Stencil Buffer (shadows)

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

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