Sign in to follow this  
Pokemonster

Different Stencil Shadow Techniques

Recommended Posts

I was wondering, what are the drawbacks of using the "gray square" method when doing stencil shadows in contrast to the "traditional" approch. E.g. drawing an alpha blended square to shade the stenciled shadow regions in contrast to an ambient pass plus stenciled light pass(es). The "gray square" method obviously looks faster since it involves only one render pass

Share this post


Link to post
Share on other sites
This is something that I've been wondering recently too, as my 3D engine currently uses the "gray square" method, and I want to switch to the more accurate algorithm.

But one problem I've hit is that the "gray square" has one advantage - it's very easy to fake shadows cast by translucent objects, as you just reduce the alpha component of the shadow you are drawing.

Is there an easyish way of doing this with the more traditional/accurate approach? I've tried to think of a few, but I can't think of an easy approach.

The reason I need this is because I have objects fade out when they die - it looks very unnatural if the shadow just blinks suddenly out of existence, it's far nicer to watch the shadow fade out gradually.

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