PDA

View Full Version : Self-shadowing with stencils



gordon1
06-12-2009, 08:41 PM
hi guys,

I'm using stencil shadows on some new character figures in my game, and I was wondering if there is a good technique to eliminate the shadow from the polygon (tri) that is actually casting the shadow. I want the shadow to cast onto everything, but just not the polygon that is actually casting the shadow.

Maybe when I see the results, I won't want it, but I was wondering if there is a standard way to get this done.

Thanks.

Ilian Dinev
06-13-2009, 06:31 AM
Draw the character after applying the shadow-volumes?

_NK47
06-14-2009, 04:40 AM
... with stencil test off.

gordon1
06-15-2009, 06:36 PM
Thanks for the replies.

I'm not sure what you mean by stencil-test-off. I want a shadow from the character's arm to cast onto his body, etc. I haven't had time try your suggestions yet, but soon.

_NK47
06-16-2009, 03:08 AM
you said you want to eliminate the shadow. so you need to draw everything shadowed with stencil test on then disable stencil test and render the non-receivers on top.