SlideShare a Scribd company logo
1 of 144
Mark J. Kilgard NVIDIA Corporation Tuesday, August 10, 2004 Real-time Shadowing Techniques: Shadow Volumes Course 26
Real-time Shadow Volumes Notice the proper self-shadowing!
For Comparison ,[object Object],Credit: Id Software
For Comparison ,[object Object],The Year 1994 A.D. 320x240 8-bit palette Low-res decal Nearest filtering No shadows
For Comparison ,[object Object]
Doom 3
Doom 3 The Year 2004 A.D. 1600x1200, 24-bit True Color, 4x antialiased Specular, diffuse, bumped, glossed shading Anisotropic mipmap filtering Dynamic shadows Credit: Id Software
Doom 3 Multiple light sources cast independent shadows
Doom 3 True volumetric shadows, leg in shadow of wall
Quick Demo Interactive Shadowing in Doom3 via Stenciled Shadow Volumes
Computer Graphics Milestone: Doom 3 in 2004 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Basics Shadowing object Light source  Shadow volume ( infinite extent )  A shadow volume [Crow 77] is simply the half-space defined by a light source and a shadowing object
Shadow Volume Basics (2) Partially shadowed  object Surface inside shadow volume (shadowed) Surface outside shadow volume (illuminated)  Simple rule: samples within a shadow volume are in shadow.
Shadow Volume of a 3D Triangle Shadow volume of a single 3D triangle is a truncated infinite pyramid
Visualizing Shadow Volumes in 3D ,[object Object],[object Object],Light source Scene with shadows from an NVIDIA logo casting a shadow volume Visualization of the shadow volume
Quick Demo Shadow Volume Visualization
Shadow Volume Advantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Disadvantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Disadvantages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Concept to Rendering Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Aside: What is stencil testing? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Stencil Buffer & Stencil Testing Red 8-bit Green 8-bit Blue 8-bit Depth 24-bit Stencil 8-bit One pixel (x, y) Stencil buffer state Stencil testing s = readBuffer(stencil, x, y); if (s == state.reference) { // Spass z = readBuffer(depth, x, y); if (fragment.z < z) { // Zpass // INCR op writeBuffer(stencil, x, y, s+1); } else { // Zfail // ZERO op writeBuffer(stencil, x, y, 0); } } else { // Sfail // KEEP, no stencil update }
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Counting Enter/Leaves With a Stencil Buffer ( Two-pass Zpass )
Visualizing the Stencil Buffer Counts red = stencil value of 1 green  = stencil value of 0 Shadowed scene Stencil buffer contents GLUT  shadowvol  example credit: Tom McReynolds Stencil counts beyond 1 are possible for multiple or complex occluders.
Why Eye-to-Object Stencil  Counting Approach Works Shadowing object Light source  Eye position  zero zero +1 +1 +2 +2 +3
Illuminated, Behind Shadow Volumes ( Two-pass Zpass ) Shadowing object Light source  Eye position  zero zero +1 +1 +2 +2 +3 Unshadowed object Shadow Volume Count = +1+1+1-1-1-1 = 0 + - - - + +
Shadowed, Nested in Shadow Volumes ( Two-pass Zpass ) Shadowing object Light source  Eye position  zero zero +1 +1 +2 +2 +3 Shadowed object Shadow Volume Count = +1+1+1-1 = 2 + - + +
Illuminated, In Front of Shadow Volumes ( Two-pass Zpass ) Shadowing object Light source  Eye position  zero zero +1 +1 +2 +2 +3 Unshadowed object Shadow Volume Count = 0 (no depth tests pass)
Nested Shadow Volumes: Stencil Counts Beyond One Shadowed scene Stencil buffer contents green  = stencil value of 0 red = stencil value of 1 darker reds = stencil value > 1
Animation of Stencil Updates From Shadow Volumes Every frame is 5 additional stencil shadow volume polygon updates.  Note how various intermediate stencil values do not reflect the final state. Fully shaded scene Final stencil state
Problem Created by Near Clip Plane ( Two-pass Zpass ) zero zero +1 +1 +2 +2 +3 Near clip plane  Far clip plane  Missed shadow volume intersection due to near clip plane clipping; leads to mistaken count
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Better Approach: One-pass Zfail
Illuminated, Behind Shadow Volumes ( One-pass Zfail ) Shadowing object Light source  Eye position  zero zero +1 +1 +2 +2 +3 Unshadowed object Shadow Volume Count = 0 (zero depth tests fail)
Shadowed, Nested in Shadow Volumes ( One-pass Zfail ) Shadowing object Light source  Eye position  zero zero +1 +1 +2 +2 +3 Shadow Volume Count = +1+1 = 2 Shadowed object + +
Illuminated, In Front of Shadow Volumes ( One-pass Zfail ) Shadowing object Light source  Eye position  zero zero +1 +1 +2 +2 +3 Shadowed object Shadow Volume Count = -1-1-1+1+1+1 = 0 - + - - + +
But Now, Problem Created by Far Clip Plane ( One-pass Zfail ) zero Near clip plane  Far clip plane  Missed shadow volume intersection due to far clip plane clipping; leads to mistaken count +1 +1 +2 +2 +3 zero
Problem Solved by Eliminating Far Clip zero +1 +1 +2 +2 +3 Near clip plane
Avoiding Far Plane Clipping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard  glFrustum  Projection Matrix ,[object Object]
Limit of  glFrustum  Matrix as Far Plane is Moved to Infinity ,[object Object],[object Object],[object Object]
One-pass Zfail Infinite Robust Shadow Volumes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Two-pass Inverted Zpass , An Approach to Avoid ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rendering Closed, but Infinite, Shadow Volumes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
1 st  Set of Shadow Volume Polygons ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Homogenous vector differences
Examples of Possible Silhouette Edges for Quake2 Models An object viewed from the same basic direction that the light is shining on the object has an identifiable light-view silhouette An object’s light-view silhouette appears quite jumbled when viewed form a point-of-view that does not correspond well with the light’s point-of-view
2 nd  and 3 rd  Set of Shadow Volume Polygons ,[object Object],[object Object],[object Object],[object Object],[object Object],Homogenous vector differences
Complete Stenciled Shadow Volume Rendering Technique ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
9 Requirements for Stenciled Shadow Volume Technique (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
9 Requirements for Stenciled Shadow Volume Technique (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
9 Requirements for Stenciled Shadow Volume Technique (3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
9 Requirements for Stenciled Shadow Volume Technique (4) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],In practice, these are quite reasonable requirements for nearly any polygonal-based 3D game or application
One-Pass Zfail Infinite  Shadow Volumes in Practice (1) Scene with shadows.   Yellow light is embedded in the green three-holed object.  P inf  is used for all the following scenes. Same scene visualizing the shadow volumes.
One-Pass Zfail Infinite  Shadow Volumes in Practice (2) Details worth noting . . . Fine details:  Shadows of the A, N, and T letters on the knight’s armor and shield. Hard case:  The shadow volume from the front-facing hole would definitely intersect the near clip plane.
One-Pass Zfail Infinite  Shadow Volumes in Practice (3) Alternate view of same scene with shadows.   Yellow lines indicate previous view’s view frustum boundary.  Recall shadows are view-independent. Shadow volumes from the alternate view.
One-Pass Zfail Infinite  Shadow Volumes in Practice (4) Clip-space view.   Original view’s scene seen from clip space.  The back plane is “at infinity” with very little effective depth precision near infinity. Clip-space view of shadow volumes.   Back-facing triangles w.r.t. light are seen projected onto far plane at infinity.
Stenciled Shadow Volumes & Multiple Lights Three colored lights.  Diffuse/specular bump mapped animated characters with shadows.
Stenciled Shadow Volumes for Simulating Soft Shadows Cluster of 12 dim lights approximating an area light source.  Generates a soft shadow effect; watch out for bad banding. The cluster of point lights.
Shadows in a Real Game Scene Abducted g ame images courtesy Joe Riedel of Contraband Entertainment
Scene’s  Visible Geometric Complexity Primary light source location Wireframe shows geometric complexity of visible geometry
Blow-up of Shadow Detail Notice cable shadows on player model Notice player’s own shadow on floor
Scene’s  Shadow Volume Geometric Complexity Wireframe shows geometric complexity of shadow volume geometry Shadow volume geometry projects away from the light source
Visible Geometry versus Shadow Volume Geometry << Visible geometry Shadow volume geometry Typically, shadow volumes generate considerably more pixel updates than visible geometry
Other Example Scenes (1 of 2) Visible geometry Shadow volume geometry Dramatic chase scene with shadows Abducted g ame images courtesy Joe Riedel at Contraband Entertainment
Other Example Scenes (2 of 2) Visible geometry Shadow volume geometry Scene with multiple light sources Abducted g ame images courtesy Joe Riedel at Contraband Entertainment
When Shadow Volumes Are Too Expensive Chain-link fence’s shadow appears on truck & ground with  shadow maps Chain-link fence is shadow volume nightmare! Fuel g ame image courtesy Nathan d’Obrenan at Firetoad Software
Stenciled Shadow Volumes Optimizations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Fill Rate Optimizations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Zpass  versus  Zfail  (1)  ,[object Object],[object Object],eye Zpass Zfail light cap dark cap
Zpass  versus  Zfail  (2) ,[object Object],Clipping throws the shadow count off for this whole region
Zpass  versus  Zfail  (3) ,[object Object],[object Object],[object Object],Zfail (with caps) Zpass (no caps)
Zpass  versus  Zfail  (4) ,[object Object],[object Object],This diagram shows three (5 in 3D) planes to form the “near rectangle – light pyramid” Any object that is completely outside one of the planes can be rendered with  Zpass Use object bounding volume for speed Object is at least partially inside of each plane ( Zfail ) Object is completely outside plane “c” ( Zpass  is ok) a b c
Zpass  versus  Zfail  (5) ,[object Object],[object Object],[object Object],Objects completely outside plane “c” ( Zpass  is ok) a b c
Bounding  Shadow Volume Rasterization ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Attenuated Light Bounds (1) ,[object Object],[object Object],[object Object],scissor rectangle fill savings
Attenuated Light Bounds (2)  ,[object Object],[object Object],[object Object],scissor rectangle wasted fill
Environmental Bounds (1) ,[object Object],scissor rectangle fill savings
Environmental Bounds (2) ,[object Object],[object Object],very small scissor rectangle! fill savings even more fill savings
Depth Bounds ,[object Object],[object Object],depth bounds Depth range that can be in shadow no shadow possible fill savings zmax zmin
Depth Bounds Test ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Computing Window Space Bounds ,[object Object],depth bounds zmax zmin Shadow volume constrained by  frustum
Computing Window Space Bounds depth bounds zmax zmin Shadow volume constrained by  light bounds light bounds Light bounds (scissor and depth) can be used as conservative bounds scissor
Computing Window Space Bounds depth bounds zmax zmin Shadow volume constrained by  environment environment (floor) scissor
Computing Window Space Bounds ,[object Object],[object Object],[object Object],[object Object],[object Object]
Culling Optimizations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Culling ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Culling Example Light and occluder both outside the view frustum. But occluder still casts shadow  into  the view frustum. Must  consider shadow volume of the occluder even though the occluder could be itself view frustum culled!
Photograph of Shadows of Unseen Objects Photograph of shadow cast by a light post and the photographer that are otherwise not seen in the photograph Credit:  Caroline Elizabeth Kennedy, used with permission
Shadow Volume Culling Easy Case ,[object Object],[object Object]
Generalized Shadow Volume Culling Rule ,[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Culling Example Reconsidered (1) Light and occluder both outside the view frustum. But occluders still within convex hull formed by the light and view frustum Must  consider shadow volume of the purple occluder even though the purple occluder could be itself view frustum culled!
Shadow Volume Culling Example Reconsidered (2) Light and occluder both outside the view frustum. But purple occluders still  also  outside convex hull formed by the light and view frustum No need to render the purple occluders or their shadow volumes! Green occluder must be considered however!
A Note about “Frustum” ,[object Object],[object Object],[object Object],[object Object],[object Object]
Infinite Cap Culling ,[object Object],[object Object],[object Object]
Portal-based Shadow Volume Optimizations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Silhouette Determination Optimizations ,[object Object],[object Object],[object Object]
Cache Shadow Volumes, Update As Necessary ,[object Object],[object Object],[object Object],[object Object]
Structures for Static Occluder and Dynamic Light Interactions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Simplified Occluder Geometry ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Rendering Optimizations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Avoid Transforming Shadow Volume Vertices Redundantly ,[object Object],[object Object],[object Object]
Shadow Volume Extrusion Using Triangles or Triangle Fans ,[object Object],[object Object],[object Object],Scene with directional light Clip-space view of shadow volume
Shadow Volume Extrusion  Using Triangle Fans ,[object Object],[object Object],[object Object],[object Object],red vertex is  internal red vertex is  external What is an external triangle? A triangle where one or two vertices has w<0
Vertex Programs for  Shadow Volumes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Fully Automatic Shadow Volume Extrusion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bloating the Original Triangle Mesh Original triangle mesh 6 vertexes 4 triangles Bloated triangle mesh 12 vertexes 10 triangles 1 2 3 4 5 6 1 2a 3a 4b 5 6 2b 2c 3d 3b 4c 4d A B C D A B C D A  lot  of extra geometry! Formula for  geometry: v bloat  = 3 * t orig t bloat  = t orig  + 2 * e orig Bloated geometry based only on number of  triangles and  edges  of original geometry.
Vertex Normal-based Extrusion (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Vertex Normal-based Extrusion (2) ,[object Object],Facet-based SV Extrusion (correct) Vertex Normal-based SV Extrusion (incorrect)
Vertex Normal-based Extrusion (3) ,[object Object],Facet-based SV Extrusion (correct) Vertex Normal-based SV Extrusion (incorrect)
Vertex Normal-based Extrusion (4) ,[object Object],Facet-based SV Extrusion (correct) Vertex Normal-based SV Extrusion (incorrect) Incorrectly unshadowed region (incorrect)
Vertex Normal-based Extrusion (5) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Semi-automatic Shadow Volume Extrusion (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Semi-automatic Shadow Volume Extrusion (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Semi-automatic Shadow Volume Extrusion (3) ,[object Object],[object Object],[object Object],[object Object]
Special Case:  Zpass ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Polygon Rendering Order (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Polygon Rendering Order (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Polygon Rendering Order (3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Other Shadow Volume Issues ,[object Object],[object Object],[object Object],[object Object]
Shadow Volumes versus Smooth Shading ,[object Object],[object Object],[object Object],vertex normal smooth normal (interpolated) coarse circle approximation fine circle approximation
Shading “silhouette” ,[object Object],[object Object]
Geometric silhouette ,[object Object],[object Object],Incompatible lighting models . . .
How to resolve? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Trivial Self-Shadowing ,[object Object],[object Object],[object Object],Trivially self-shadowed
Implementation Alternatives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
2-Manifold issues ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Extra Slides
Shadow Volume History (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume History (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume History (3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume History (4) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume History (5) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume History (6) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume History (7) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume History (8) ,[object Object],[object Object],[object Object],[object Object]
Verifying P inf  Will Not Clip Infinitely Far Away Vertices (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Verifying P inf  Will Not Clip Infinitely Far Away Vertices (2) ,[object Object],[object Object],[object Object]
Another Example (1) Original eye’s view.  Again, yellow light is embedded in the green three-holed object.  P inf  is used for all the following scenes. Eye-space view of previous eye’s view.  Clipped to the previous eye’s P inf  view frustum.  Shows knight’s projection to infinity.
Another Example (2) Clip-space view of previous eye’s view.  Shows shadow volume closed at infinity and other shadow volume’s intersection with the near clip plane. Original eye’s  far  clip plane Original eye’s  near  clip plane
Hardware Enhancements: Wrapping Stencil Operations ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hardware Enhancements: Two-sided Stencil Testing ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Window Space Bounds ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Attenuated Light Bounds (3)  ,[object Object],[object Object],[object Object],[object Object],scissor rectangle reclaimed fill per-occluder scissor rectangle
The Future of Shadow Volumes ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot

A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)Mark Kilgard
 
Around the World in 80 Shaders
Around the World in 80 ShadersAround the World in 80 Shaders
Around the World in 80 Shadersstevemcauley
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3guest11b095
 
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping종빈 오
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3stevemcauley
 
Implementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES rendererImplementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES rendererDavide Pasca
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Tiago Sousa
 
Lighting Shading by John Hable
Lighting Shading by John HableLighting Shading by John Hable
Lighting Shading by John HableNaughty Dog
 
CS 354 Project 2 and Compression
CS 354 Project 2 and CompressionCS 354 Project 2 and Compression
CS 354 Project 2 and CompressionMark Kilgard
 
Shiny Pixels and Beyond: Real-Time Raytracing at SEED
Shiny Pixels and Beyond: Real-Time Raytracing at SEEDShiny Pixels and Beyond: Real-Time Raytracing at SEED
Shiny Pixels and Beyond: Real-Time Raytracing at SEEDElectronic Arts / DICE
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture MappingMark Kilgard
 
Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Tiago Sousa
 
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingPractical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingMark Kilgard
 
Clustered defered and forward shading
Clustered defered and forward shadingClustered defered and forward shading
Clustered defered and forward shadingWuBinbo
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics PipelineMark Kilgard
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingMark Kilgard
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupMark Kilgard
 

What's hot (20)

A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)
A Practical and Robust Bump-mapping Technique for Today’s GPUs (slides)
 
Around the World in 80 Shaders
Around the World in 80 ShadersAround the World in 80 Shaders
Around the World in 80 Shaders
 
A Bit More Deferred Cry Engine3
A Bit More Deferred   Cry Engine3A Bit More Deferred   Cry Engine3
A Bit More Deferred Cry Engine3
 
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
[shaderx4] 4.2 Eliminating Surface Acne with Gradient Shadow Mapping
 
Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3Calibrating Lighting and Materials in Far Cry 3
Calibrating Lighting and Materials in Far Cry 3
 
Implementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES rendererImplementing a modern, RenderMan compliant, REYES renderer
Implementing a modern, RenderMan compliant, REYES renderer
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666Siggraph2016 - The Devil is in the Details: idTech 666
Siggraph2016 - The Devil is in the Details: idTech 666
 
Lighting Shading by John Hable
Lighting Shading by John HableLighting Shading by John Hable
Lighting Shading by John Hable
 
The Unique Lighting of Mirror's Edge
The Unique Lighting of Mirror's EdgeThe Unique Lighting of Mirror's Edge
The Unique Lighting of Mirror's Edge
 
CS 354 Project 2 and Compression
CS 354 Project 2 and CompressionCS 354 Project 2 and Compression
CS 354 Project 2 and Compression
 
Shiny Pixels and Beyond: Real-Time Raytracing at SEED
Shiny Pixels and Beyond: Real-Time Raytracing at SEEDShiny Pixels and Beyond: Real-Time Raytracing at SEED
Shiny Pixels and Beyond: Real-Time Raytracing at SEED
 
CS 354 Texture Mapping
CS 354 Texture MappingCS 354 Texture Mapping
CS 354 Texture Mapping
 
Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)Crysis Next-Gen Effects (GDC 2008)
Crysis Next-Gen Effects (GDC 2008)
 
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated RenderingPractical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
Practical and Robust Stenciled Shadow Volumes for Hardware-Accelerated Rendering
 
Clustered defered and forward shading
Clustered defered and forward shadingClustered defered and forward shading
Clustered defered and forward shading
 
CS 354 More Graphics Pipeline
CS 354 More Graphics PipelineCS 354 More Graphics Pipeline
CS 354 More Graphics Pipeline
 
Global illumination
Global illuminationGlobal illumination
Global illumination
 
CS 354 Ray Casting & Tracing
CS 354 Ray Casting & TracingCS 354 Ray Casting & Tracing
CS 354 Ray Casting & Tracing
 
Geometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping SetupGeometry Shader-based Bump Mapping Setup
Geometry Shader-based Bump Mapping Setup
 

Viewers also liked

Opportunity and prototype
Opportunity and prototypeOpportunity and prototype
Opportunity and prototypedingmire
 
OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...
OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...
OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...Gael Hofemeier
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and MoreMark Kilgard
 
Overview of Graphics System
Overview of Graphics SystemOverview of Graphics System
Overview of Graphics SystemPrathimaBaliga
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devicesvinay arora
 

Viewers also liked (6)

Opportunity and prototype
Opportunity and prototypeOpportunity and prototype
Opportunity and prototype
 
OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...
OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...
OIT to Volumetric Shadow Mapping, 101 Uses for Raster-Ordered Views using Dir...
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
Computer Graphics display technologies(Computer graphics tutorials and tips)
Computer Graphics display technologies(Computer graphics tutorials and tips)Computer Graphics display technologies(Computer graphics tutorials and tips)
Computer Graphics display technologies(Computer graphics tutorials and tips)
 
Overview of Graphics System
Overview of Graphics SystemOverview of Graphics System
Overview of Graphics System
 
CG - Display Devices
CG - Display DevicesCG - Display Devices
CG - Display Devices
 

Similar to Real-time Shadowing Techniques: Shadow Volumes

Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1qpqpqp
 
Introdution to astro photography
Introdution to astro photographyIntrodution to astro photography
Introdution to astro photographymarkcasazza
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel UpdatingMark Kilgard
 
NVIDIA effects GDC09
NVIDIA effects GDC09NVIDIA effects GDC09
NVIDIA effects GDC09IGDA_London
 
Soft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear LightsSoft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear Lightsstefan_b
 
Single Sample Soft Shadows Using Depth Maps
Single Sample Soft Shadows Using Depth MapsSingle Sample Soft Shadows Using Depth Maps
Single Sample Soft Shadows Using Depth Mapsstefan_b
 
Massive Point Light Soft Shadows
Massive Point Light Soft ShadowsMassive Point Light Soft Shadows
Massive Point Light Soft ShadowsWolfgang Engel
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space MarinePope Kim
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderEidos-Montréal
 
Build Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-PlanesBuild Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-PlanesDouglas Lanman
 
The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805mistercteam
 
5 ray casting computer graphics
5 ray casting computer graphics5 ray casting computer graphics
5 ray casting computer graphicscairo university
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparencyacbess
 
Unite2015 probelight English version
Unite2015 probelight English versionUnite2015 probelight English version
Unite2015 probelight English versionSangYun Yi
 
study Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded Imagesstudy Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded ImagesChiamin Hsu
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCQLOC
 
Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko3D
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardwarestefan_b
 

Similar to Real-time Shadowing Techniques: Shadow Volumes (20)

Computer Graphics Part1
Computer Graphics Part1Computer Graphics Part1
Computer Graphics Part1
 
Introdution to astro photography
Introdution to astro photographyIntrodution to astro photography
Introdution to astro photography
 
CS 354 Pixel Updating
CS 354 Pixel UpdatingCS 354 Pixel Updating
CS 354 Pixel Updating
 
NVIDIA effects GDC09
NVIDIA effects GDC09NVIDIA effects GDC09
NVIDIA effects GDC09
 
Soft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear LightsSoft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear Lights
 
Offscreenparticle
OffscreenparticleOffscreenparticle
Offscreenparticle
 
Single Sample Soft Shadows Using Depth Maps
Single Sample Soft Shadows Using Depth MapsSingle Sample Soft Shadows Using Depth Maps
Single Sample Soft Shadows Using Depth Maps
 
Massive Point Light Soft Shadows
Massive Point Light Soft ShadowsMassive Point Light Soft Shadows
Massive Point Light Soft Shadows
 
Rendering Tech of Space Marine
Rendering Tech of Space MarineRendering Tech of Space Marine
Rendering Tech of Space Marine
 
Rendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb RaiderRendering Techniques in Rise of the Tomb Raider
Rendering Techniques in Rise of the Tomb Raider
 
DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3DirectX 11 Rendering in Battlefield 3
DirectX 11 Rendering in Battlefield 3
 
Build Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-PlanesBuild Your Own 3D Scanner: 3D Scanning with Swept-Planes
Build Your Own 3D Scanner: 3D Scanning with Swept-Planes
 
The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805The technology behind_the_elemental_demo_16x9-1248544805
The technology behind_the_elemental_demo_16x9-1248544805
 
5 ray casting computer graphics
5 ray casting computer graphics5 ray casting computer graphics
5 ray casting computer graphics
 
Order Independent Transparency
Order Independent TransparencyOrder Independent Transparency
Order Independent Transparency
 
Unite2015 probelight English version
Unite2015 probelight English versionUnite2015 probelight English version
Unite2015 probelight English version
 
study Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded Imagesstudy Diffusion Curves: A Vector Representation for Smooth-Shaded Images
study Diffusion Curves: A Vector Representation for Smooth-Shaded Images
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOC
 
Minko stage3d workshop_20130525
Minko stage3d workshop_20130525Minko stage3d workshop_20130525
Minko stage3d workshop_20130525
 
Shadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics HardwareShadow Volumes on Programmable Graphics Hardware
Shadow Volumes on Programmable Graphics Hardware
 

More from Mark Kilgard

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...Mark Kilgard
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsMark Kilgard
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017Mark Kilgard
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017Mark Kilgard
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016Mark Kilgard
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsMark Kilgard
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMark Kilgard
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectanglesMark Kilgard
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Mark Kilgard
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineMark Kilgard
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsMark Kilgard
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsMark Kilgard
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondMark Kilgard
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...Mark Kilgard
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardMark Kilgard
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path RenderingMark Kilgard
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingMark Kilgard
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012Mark Kilgard
 

More from Mark Kilgard (20)

D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...D11: a high-performance, protocol-optional, transport-optional, window system...
D11: a high-performance, protocol-optional, transport-optional, window system...
 
Computers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School StudentsComputers, Graphics, Engineering, Math, and Video Games for High School Students
Computers, Graphics, Engineering, Math, and Video Games for High School Students
 
NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017NVIDIA OpenGL and Vulkan Support for 2017
NVIDIA OpenGL and Vulkan Support for 2017
 
NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017NVIDIA OpenGL 4.6 in 2017
NVIDIA OpenGL 4.6 in 2017
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
Virtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUsVirtual Reality Features of NVIDIA GPUs
Virtual Reality Features of NVIDIA GPUs
 
Migrating from OpenGL to Vulkan
Migrating from OpenGL to VulkanMigrating from OpenGL to Vulkan
Migrating from OpenGL to Vulkan
 
EXT_window_rectangles
EXT_window_rectanglesEXT_window_rectangles
EXT_window_rectangles
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
Slides: Accelerating Vector Graphics Rendering using the Graphics Hardware Pi...
 
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware PipelineAccelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
Accelerating Vector Graphics Rendering using the Graphics Hardware Pipeline
 
NV_path rendering Functional Improvements
NV_path rendering Functional ImprovementsNV_path rendering Functional Improvements
NV_path rendering Functional Improvements
 
OpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUsOpenGL 4.5 Update for NVIDIA GPUs
OpenGL 4.5 Update for NVIDIA GPUs
 
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path RenderingSIGGRAPH Asia 2012: GPU-accelerated Path Rendering
SIGGRAPH Asia 2012: GPU-accelerated Path Rendering
 
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and BeyondSIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
SIGGRAPH Asia 2012 Exhibitor Talk: OpenGL 4.3 and Beyond
 
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...Programming with NV_path_rendering:  An Annex to the SIGGRAPH Asia 2012 paper...
Programming with NV_path_rendering: An Annex to the SIGGRAPH Asia 2012 paper...
 
GPU accelerated path rendering fastforward
GPU accelerated path rendering fastforwardGPU accelerated path rendering fastforward
GPU accelerated path rendering fastforward
 
GPU-accelerated Path Rendering
GPU-accelerated Path RenderingGPU-accelerated Path Rendering
GPU-accelerated Path Rendering
 
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web RenderingSIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
SIGGRAPH 2012: GPU-Accelerated 2D and Web Rendering
 
SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012SIGGRAPH 2012: NVIDIA OpenGL for 2012
SIGGRAPH 2012: NVIDIA OpenGL for 2012
 

Recently uploaded

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 

Recently uploaded (20)

The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 

Real-time Shadowing Techniques: Shadow Volumes

  • 1. Mark J. Kilgard NVIDIA Corporation Tuesday, August 10, 2004 Real-time Shadowing Techniques: Shadow Volumes Course 26
  • 2. Real-time Shadow Volumes Notice the proper self-shadowing!
  • 3.
  • 4.
  • 5.
  • 7. Doom 3 The Year 2004 A.D. 1600x1200, 24-bit True Color, 4x antialiased Specular, diffuse, bumped, glossed shading Anisotropic mipmap filtering Dynamic shadows Credit: Id Software
  • 8. Doom 3 Multiple light sources cast independent shadows
  • 9. Doom 3 True volumetric shadows, leg in shadow of wall
  • 10. Quick Demo Interactive Shadowing in Doom3 via Stenciled Shadow Volumes
  • 11.
  • 12. Shadow Volume Basics Shadowing object Light source Shadow volume ( infinite extent ) A shadow volume [Crow 77] is simply the half-space defined by a light source and a shadowing object
  • 13. Shadow Volume Basics (2) Partially shadowed object Surface inside shadow volume (shadowed) Surface outside shadow volume (illuminated) Simple rule: samples within a shadow volume are in shadow.
  • 14. Shadow Volume of a 3D Triangle Shadow volume of a single 3D triangle is a truncated infinite pyramid
  • 15.
  • 16. Quick Demo Shadow Volume Visualization
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22. Stencil Buffer & Stencil Testing Red 8-bit Green 8-bit Blue 8-bit Depth 24-bit Stencil 8-bit One pixel (x, y) Stencil buffer state Stencil testing s = readBuffer(stencil, x, y); if (s == state.reference) { // Spass z = readBuffer(depth, x, y); if (fragment.z < z) { // Zpass // INCR op writeBuffer(stencil, x, y, s+1); } else { // Zfail // ZERO op writeBuffer(stencil, x, y, 0); } } else { // Sfail // KEEP, no stencil update }
  • 23.
  • 24. Visualizing the Stencil Buffer Counts red = stencil value of 1 green = stencil value of 0 Shadowed scene Stencil buffer contents GLUT shadowvol example credit: Tom McReynolds Stencil counts beyond 1 are possible for multiple or complex occluders.
  • 25. Why Eye-to-Object Stencil Counting Approach Works Shadowing object Light source Eye position zero zero +1 +1 +2 +2 +3
  • 26. Illuminated, Behind Shadow Volumes ( Two-pass Zpass ) Shadowing object Light source Eye position zero zero +1 +1 +2 +2 +3 Unshadowed object Shadow Volume Count = +1+1+1-1-1-1 = 0 + - - - + +
  • 27. Shadowed, Nested in Shadow Volumes ( Two-pass Zpass ) Shadowing object Light source Eye position zero zero +1 +1 +2 +2 +3 Shadowed object Shadow Volume Count = +1+1+1-1 = 2 + - + +
  • 28. Illuminated, In Front of Shadow Volumes ( Two-pass Zpass ) Shadowing object Light source Eye position zero zero +1 +1 +2 +2 +3 Unshadowed object Shadow Volume Count = 0 (no depth tests pass)
  • 29. Nested Shadow Volumes: Stencil Counts Beyond One Shadowed scene Stencil buffer contents green = stencil value of 0 red = stencil value of 1 darker reds = stencil value > 1
  • 30. Animation of Stencil Updates From Shadow Volumes Every frame is 5 additional stencil shadow volume polygon updates. Note how various intermediate stencil values do not reflect the final state. Fully shaded scene Final stencil state
  • 31. Problem Created by Near Clip Plane ( Two-pass Zpass ) zero zero +1 +1 +2 +2 +3 Near clip plane Far clip plane Missed shadow volume intersection due to near clip plane clipping; leads to mistaken count
  • 32.
  • 33. Illuminated, Behind Shadow Volumes ( One-pass Zfail ) Shadowing object Light source Eye position zero zero +1 +1 +2 +2 +3 Unshadowed object Shadow Volume Count = 0 (zero depth tests fail)
  • 34. Shadowed, Nested in Shadow Volumes ( One-pass Zfail ) Shadowing object Light source Eye position zero zero +1 +1 +2 +2 +3 Shadow Volume Count = +1+1 = 2 Shadowed object + +
  • 35. Illuminated, In Front of Shadow Volumes ( One-pass Zfail ) Shadowing object Light source Eye position zero zero +1 +1 +2 +2 +3 Shadowed object Shadow Volume Count = -1-1-1+1+1+1 = 0 - + - - + +
  • 36. But Now, Problem Created by Far Clip Plane ( One-pass Zfail ) zero Near clip plane Far clip plane Missed shadow volume intersection due to far clip plane clipping; leads to mistaken count +1 +1 +2 +2 +3 zero
  • 37. Problem Solved by Eliminating Far Clip zero +1 +1 +2 +2 +3 Near clip plane
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45. Examples of Possible Silhouette Edges for Quake2 Models An object viewed from the same basic direction that the light is shining on the object has an identifiable light-view silhouette An object’s light-view silhouette appears quite jumbled when viewed form a point-of-view that does not correspond well with the light’s point-of-view
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51.
  • 52. One-Pass Zfail Infinite Shadow Volumes in Practice (1) Scene with shadows. Yellow light is embedded in the green three-holed object. P inf is used for all the following scenes. Same scene visualizing the shadow volumes.
  • 53. One-Pass Zfail Infinite Shadow Volumes in Practice (2) Details worth noting . . . Fine details: Shadows of the A, N, and T letters on the knight’s armor and shield. Hard case: The shadow volume from the front-facing hole would definitely intersect the near clip plane.
  • 54. One-Pass Zfail Infinite Shadow Volumes in Practice (3) Alternate view of same scene with shadows. Yellow lines indicate previous view’s view frustum boundary. Recall shadows are view-independent. Shadow volumes from the alternate view.
  • 55. One-Pass Zfail Infinite Shadow Volumes in Practice (4) Clip-space view. Original view’s scene seen from clip space. The back plane is “at infinity” with very little effective depth precision near infinity. Clip-space view of shadow volumes. Back-facing triangles w.r.t. light are seen projected onto far plane at infinity.
  • 56. Stenciled Shadow Volumes & Multiple Lights Three colored lights. Diffuse/specular bump mapped animated characters with shadows.
  • 57. Stenciled Shadow Volumes for Simulating Soft Shadows Cluster of 12 dim lights approximating an area light source. Generates a soft shadow effect; watch out for bad banding. The cluster of point lights.
  • 58. Shadows in a Real Game Scene Abducted g ame images courtesy Joe Riedel of Contraband Entertainment
  • 59. Scene’s Visible Geometric Complexity Primary light source location Wireframe shows geometric complexity of visible geometry
  • 60. Blow-up of Shadow Detail Notice cable shadows on player model Notice player’s own shadow on floor
  • 61. Scene’s Shadow Volume Geometric Complexity Wireframe shows geometric complexity of shadow volume geometry Shadow volume geometry projects away from the light source
  • 62. Visible Geometry versus Shadow Volume Geometry << Visible geometry Shadow volume geometry Typically, shadow volumes generate considerably more pixel updates than visible geometry
  • 63. Other Example Scenes (1 of 2) Visible geometry Shadow volume geometry Dramatic chase scene with shadows Abducted g ame images courtesy Joe Riedel at Contraband Entertainment
  • 64. Other Example Scenes (2 of 2) Visible geometry Shadow volume geometry Scene with multiple light sources Abducted g ame images courtesy Joe Riedel at Contraband Entertainment
  • 65. When Shadow Volumes Are Too Expensive Chain-link fence’s shadow appears on truck & ground with shadow maps Chain-link fence is shadow volume nightmare! Fuel g ame image courtesy Nathan d’Obrenan at Firetoad Software
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.
  • 80.
  • 81. Computing Window Space Bounds depth bounds zmax zmin Shadow volume constrained by light bounds light bounds Light bounds (scissor and depth) can be used as conservative bounds scissor
  • 82. Computing Window Space Bounds depth bounds zmax zmin Shadow volume constrained by environment environment (floor) scissor
  • 83.
  • 84.
  • 85.
  • 86. Shadow Volume Culling Example Light and occluder both outside the view frustum. But occluder still casts shadow into the view frustum. Must consider shadow volume of the occluder even though the occluder could be itself view frustum culled!
  • 87. Photograph of Shadows of Unseen Objects Photograph of shadow cast by a light post and the photographer that are otherwise not seen in the photograph Credit: Caroline Elizabeth Kennedy, used with permission
  • 88.
  • 89.
  • 90. Shadow Volume Culling Example Reconsidered (1) Light and occluder both outside the view frustum. But occluders still within convex hull formed by the light and view frustum Must consider shadow volume of the purple occluder even though the purple occluder could be itself view frustum culled!
  • 91. Shadow Volume Culling Example Reconsidered (2) Light and occluder both outside the view frustum. But purple occluders still also outside convex hull formed by the light and view frustum No need to render the purple occluders or their shadow volumes! Green occluder must be considered however!
  • 92.
  • 93.
  • 94.
  • 95.  
  • 96.
  • 97.
  • 98.
  • 99.
  • 100.
  • 101.
  • 102.
  • 103.
  • 104.
  • 105.
  • 106. Bloating the Original Triangle Mesh Original triangle mesh 6 vertexes 4 triangles Bloated triangle mesh 12 vertexes 10 triangles 1 2 3 4 5 6 1 2a 3a 4b 5 6 2b 2c 3d 3b 4c 4d A B C D A B C D A lot of extra geometry! Formula for geometry: v bloat = 3 * t orig t bloat = t orig + 2 * e orig Bloated geometry based only on number of triangles and edges of original geometry.
  • 107.
  • 108.
  • 109.
  • 110.
  • 111.
  • 112.
  • 113.
  • 114.
  • 115.
  • 116.
  • 117.
  • 118.
  • 119.
  • 120.
  • 121.
  • 122.
  • 123.
  • 124.
  • 125.
  • 126.
  • 128.
  • 129.
  • 130.
  • 131.
  • 132.
  • 133.
  • 134.
  • 135.
  • 136.
  • 137.
  • 138. Another Example (1) Original eye’s view. Again, yellow light is embedded in the green three-holed object. P inf is used for all the following scenes. Eye-space view of previous eye’s view. Clipped to the previous eye’s P inf view frustum. Shows knight’s projection to infinity.
  • 139. Another Example (2) Clip-space view of previous eye’s view. Shows shadow volume closed at infinity and other shadow volume’s intersection with the near clip plane. Original eye’s far clip plane Original eye’s near clip plane
  • 140.
  • 141.
  • 142.
  • 143.
  • 144.

Editor's Notes

  1. NVIDIA Graphics Software Engineer
  2. Two items of note: Proper self-shadowing Hard shadow edges, light sources modeled as points
  3. Doom circa 1994
  4. just 79,000 pixels Notice the “border” to further reduce the rendered area to improve performance Utterly free of both shadows and lighting
  5. Doom3 circa 2004 No one would confuse this scene with a photograph but impressive leap forward
  6. 1600x1200 is 25x the original 320x240 4x multisampling makes that actually 100x 3x the color makes the memory per rendered scene 300x the Doom from 10 years ago
  7. multiple light source combine in additive fashion
  8. Spider leg in the shadow of the left wall
  9. What’s really new? SHADOWS
  10. Frank Crow introduced shadow volumes to Computer Graphics at SIGGRAPH 77
  11. Before we get to deep in the nitty-gritty of shadow volumes Truth in advertising I want to highlight the high-level advantages and disadvantages of shadow volumes
  12. We’ll revisit other progress on addressing these disadvantages later
  13. More discussion of shadow volumes versus shadow maps later in the course
  14. Fill rate optimizations—reducing the rasterization overhead Culling optimizations—send fewer shadow volumes by eliminating shadow volume polygon sets More efficient silhouette determination—minimize the CPU overhead Miscellaneous