Stencil shadows meant to look like this? - Printable Version
+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Stencil shadows meant to look like this? (/thread-3695.html)
Stencil shadows meant to look like this? - ia3n_g - Nov 23, 2006 04:45 PM
I just implemented some basic z-pass stencil shadows, and am a bit disappointed with how they handle self-shadowing curves. The problem is that each polygon of the curve is either fully in shadow or fully out of shadow so the geometry becomes a lot more obvious... see the jagged line in this screenshot. Is that just a limitation of the algorithm or is it just my implementation of it?
Stencil shadows meant to look like this? - OneSadCookie - Nov 23, 2006 05:28 PM
You need to make your lighting equation so that the far side of the object is completely dark; then you'll get a smooth line.
Stencil shadows meant to look like this? - akb825 - Nov 23, 2006 06:57 PM
Alternately, you could render your scene once only with ambient lighting, then another time after the stencil shadows so only the unshadowed parts get light. That way self-shadowing only looks different if the part that's being shadowed would usually be lit.