Stencil shadows meant to look like this?
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?
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.
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.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| SLOW performance drawing multiple polygons per frame with stencil buffer | clam61 | 7 | 594 |
Apr 27, 2013 11:53 AM Last Post: clam61 |
|
| Masking without a stencil buffer? | Bachus | 12 | 10,764 |
Sep 2, 2010 02:42 PM Last Post: Skorche |
|
| Window drop shadows | NelsonMandella | 9 | 4,476 |
Mar 21, 2010 02:34 PM Last Post: NelsonMandella |
|
| Making 2D Stencil Shadows Soft | metacollin | 16 | 11,857 |
Jul 22, 2009 01:59 PM Last Post: NelsonMandella |
|
| softening 2d shadows | NelsonMandella | 5 | 3,952 |
May 19, 2009 04:19 AM Last Post: Najdorf |
|

