1 / 6

Stencil Shadows

Stencil Shadows. Garrett Weng. What are stencil shadows?. Also known as shadow volumes Relies on use of the stencil buffer Create volumes of the shadows Shadows projected onto surfaces of objects Different from shadow mapping. How do we get the shadow volumes?.

dima
Download Presentation

Stencil Shadows

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stencil Shadows Garrett Weng

  2. What are stencil shadows? • Also known as shadow volumes • Relies on use of the stencil buffer • Create volumes of the shadows • Shadows projected onto surfaces of objects • Different from shadow mapping

  3. How do we get the shadow volumes? • Find the silhouette edge of the object • Project rays from the edges • Create polygons using these rays • Polygons form the volumes

  4. How do we create the stencil? • Use the stencil buffer • Different techniques (Z-Pass, Z-Fail) • Assume Depth-Values are already set • Render front face of the volume • Increment the stencil value if depth test passes • Render back face of volume • Decrement the stencil value if depth test fails

  5. How do we get shadows? • First, render the whole scene with ambient lighting • Create the volumes • Create the stencil • Render the rest of the scene with diffuse and specular lighting where stencil test fails

  6. Where am I at? • Working on stencil buffer • Still working on creating the shadow volumes • Need to learn how to use depth test for creating the stencil

More Related