SlideShare uma empresa Scribd logo
1 de 79
Shadow Mapping with Today’s OpenGL Hardware   CEDEC 2001 Tokyo, Japan
Mark J. Kilgard Graphics Software Engineer NVIDIA Corporation
Motivation for Better Shadows ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Common Real-time Shadow Techniques Shadow volumes Light maps Projected planar shadows Hybrid approaches
Problems with Common Shadow Techniques ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Introducing Another Technique: Shadow Mapping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Mapping References ,[object Object],[object Object],[object Object],[object Object]
The Shadow Mapping Concept (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Shadow Mapping Concept (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Shadow Mapping Concept (3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Mapping with a Picture in 2D (1) ,[object Object],light source  eye position  depth map Z  = A fragment’s light Z = B depth map image plane eye view image plane, a.k.a. the frame buffer
Shadow Mapping with a Picture in 2D (2) light source  eye position  depth map Z  = A fragment’s light Z = B depth map image plane eye view image plane, a.k.a. the frame buffer The A    B unshadowed fragment case
Note image precision mismatch! The depth map could be at a different resolution from the framebuffer This mismatch can lead to artifacts Shadow Mapping with a Picture in 2D (3)
Visualizing the Shadow Mapping Technique (1) ,[object Object],the point light source
Visualizing the Shadow Mapping Technique (2) ,[object Object],with shadows without shadows
Visualizing the Shadow Mapping Technique (3) ,[object Object],FYI: from the eye’s point-of-view again
Visualizing the Shadow Mapping Technique (4) ,[object Object],FYI: from the light’s point-of-view again
Visualizing the Shadow Mapping Technique (5) ,[object Object],FYI: depth map for light’s point-of-view again
Visualizing the Shadow Mapping Technique (6) ,[object Object]
Visualizing the Shadow Mapping Technique (6) ,[object Object],Green is where the light planar distance and the light depth map are  approximately equal Non-green is where shadows should be
Visualizing the Shadow Mapping Technique (7) ,[object Object],Notice how specular highlights never appear in shadows Notice how curved surfaces cast shadows on each other
Construct Light View Depth Map ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Justification for glPolygonOffset When Constructing Shadow Maps ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Sampling a Polygon’s Depth at Pixel Centers (1) ,[object Object],X Z Pixel centers Polygon
Sampling a Polygon’s Depth at Pixel Centers (2) X Z ,[object Object],X Z
Sampling a Polygon’s Depth at Pixel Centers (3) ,[object Object],X Z  z/  x
Why You Need glPolygonOffset’s Slope ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Depth Map Bias Issues ,[object Object],Too little bias, everything begins to shadow Too much bias, shadow starts too far back Just right
Selecting the Depth Map Bias ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Render Scene and Access the Depth Texture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is Projective Texturing? ,[object Object],[object Object],Source: Wolfgang Heidrich [99]
About Projective Texturing (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
About Projective Texturing (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
About Projective Texturing (3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
About Projective Texturing (4) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Back to the Shadow Mapping Discussion . . . ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
OpenGL’s Standard Vertex Coordinate Transform ,[object Object],object coordinates (x, y, z, w) eye coordinates (x, y, z, w) modelview matrix projection matrix divide by w viewport & depth range normalized  device coordinates (x, y, z) clip coordinates (x, y, z, w) window coordinates (x, y, z)
Eye Linear Texture Coordinate Generation ,[object Object],object coordinates eye coordinates modelview matrix projection matrix divide by w viewport & depth range normalized  device coordinates clip coordinates window coordinates eye-linear plane equations (s, t,  r , q) (x, y, z)
Setting Up Eye Linear Texgen ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Eye Linear Texgen Transform ,[object Object],[object Object],s t r q Splane[0]  Splane[1]  Splane[2]  Splane[3] Tplane[0]  Tplane[1]  Tplane[2]  Tplane[3] Rplane[0]  Rplane[1]  Rplane[2]  Rplane[3] Qplane[0]  Qplane[1]  Qplane[2]  Qplane[3] = x e y e z e w e
Shadow Map Eye Linear Texgen Transform 1/2 1/2 1/2 1 1/2 1/2 1/2 Light frustum (projection) matrix Light view (look at) matrix Inverse eye view (look at) matrix Eye view (look at) matrix Modeling matrix x o y o z o w o x e y e z e w e = = x e y e z e w e s t r q glTexGen automatically applies this when modelview matrix contains just the eye view transform Supply this combined transform to glTexGen
Shadow Map Operation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dedicated Hardware Shadow Mapping Support ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
OpenGL Extensions for Shadow Map Hardware ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
New Depth Texture Internal Texture Formats ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Depth Texture Details ,[object Object],[object Object],[object Object],[object Object],[object Object]
Depth Texture Copy Performance ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hardware Shadow Map Filtering ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Hardware Shadow Map Filtering Example GL_NEAREST: blocky GL_LINEAR: antialiased edges Low shadow map resolution used to heightens filtering artifacts
Depth Values are not Blend-able ,[object Object],eye position  What pixel covers in shadow map texture Texel sample depth = 0.25 Texel sample depth = 0.63 0.63 0.25 0.25 0.63 Average(0.25, 0.25, 0.63, 0.63) = 0.44 0.57  > 0.44 so pixel is  wrongly  “in shadow” Truth: nothing is at 0.44, just 0.25 and 0.57 Pixel depth = 0.57
Percentage Closer Filtering eye position  What pixel covers in shadow map texture Texel sample depth = 0.25 Texel sample depth = 0.63 Shadowed Average(0.57>0.25, 0.57>0.25, 0.57<0.63, 0.57<0.63) = 50% so pixel is reasonably 50% shadowed   (actually hardware does weighted average) Pixel depth = 0.57 Unshadowed ,[object Object]
Mipmap Filtering for Depth Textures with Percentage Closer Filtering (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mipmap Filtering for Depth Textures with Percentage Closer Filtering (2) ,[object Object],[object Object],[object Object]
Advice for Shadowed Illumination Model (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Need for Dimming Diffuse No dimming; shadowed regions have 0% diffuse and 0% specular With dimming; shadowed regions have 40% diffuse and 0% specular Front facing shadowed regions appear unnaturally flat. Still evidence of curvature in shadowed regions. No specular in shadowed regions in both versions.
Advice for Shadowed Illumination Model (2) ,[object Object],[object Object],[object Object],[object Object]
Careful about Back Projecting Shadow Maps (1) ,[object Object],Spotlight casting shadows (a hooded light source) Spotlight’s of cone of illumination where “true” shadows can form Back-projection of spotlight’s cone of illumination Pentagon would be incorrectly lit by back-projection if not specially handled
Careful about Back Projecting Shadow Maps (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Other Useful OpenGL Extensions for Improving Shadow Mapping ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Combining Shadow Mapping with other Techniques ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
An Alternative to Dedicated Shadow Mapping Hardware ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Issues with Shadow Mapping (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Issues with Shadow Mapping (2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some Theory for Determining Your Shadow Map Resolution (1) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some Theory for Determining Your Shadow Map Resolution (2) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Four Images of Dueling Frusta Case Eye’s View Light’s View Eye’s View with projection of color-coded mipmap levels from light: Blue = magnification Red = minification Light’s View with re-projection of above image from the eye
Interpretation of the Four Images of the Dueling Frusta Case Eye’s View Light’s View Region that is smallest in the light’s view is a region that is very large in the eye’s view.  This implies that it would require a very high-resolution shadow map to avoid obvious blocky shadow edge artifacts.
Example of Blocky Shadow Edge Artifacts in Dueling Frusta Situations Light position out here pointing towards the viewer. Blocky shadow edge artifacts. Notice that shadow edge is well defined in the distance.
Good Situation, Close to the Miner’s Lamp Eye’s View Light’s View Very similar views Note how the color-coded images share similar pattern and the coloration is uniform.  Implies single depth map resolution would work well for most of the scene. Ghosting is where projection would be in shadow.
More Examples ,[object Object],Note object self-shadowing
More Examples ,[object Object]
More Examples ,[object Object],Note shadow leakage due to infinitely thin floor Could be fixed by giving floor thickness
Combine with Projective Texturing for Spotlight Shadows ,[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Combining Shadows with Atmospherics Credit: Cass Everitt
Luxo Jr. in Real-time using Shadow Mapping ,[object Object]
Luxo Jr. Demo Details ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],(Sorry, no demo.  Images are from web cast video  of Apple’s MacWorld Japan announcement.)
Shadow Mapping Source Code ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Credits ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conclusions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Johan Andersson
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
devCAT Studio, NEXON
 
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
JP Lee
 

Mais procurados (20)

Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1Rendering AAA-Quality Characters of Project A1
Rendering AAA-Quality Characters of Project A1
 
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
A Certain Slant of Light - Past, Present and Future Challenges of Global Illu...
 
Taking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next GenerationTaking Killzone Shadow Fall Image Quality Into The Next Generation
Taking Killzone Shadow Fall Image Quality Into The Next Generation
 
Lighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow FallLighting of Killzone: Shadow Fall
Lighting of Killzone: Shadow Fall
 
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
4K Checkerboard in Battlefield 1 and Mass Effect Andromeda
 
Stochastic Screen-Space Reflections
Stochastic Screen-Space ReflectionsStochastic Screen-Space Reflections
Stochastic Screen-Space Reflections
 
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
【Unite Tokyo 2018】『崩壊3rd』開発者が語るアニメ風レンダリングの極意
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
 
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
 
IndirectDraw with unity
IndirectDraw with unityIndirectDraw with unity
IndirectDraw with unity
 
Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4Custom fabric shader for unreal engine 4
Custom fabric shader for unreal engine 4
 
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
The Rendering Technology of 'Lords of the Fallen' (Game Connection Europe 2014)
 
입문 Visual SLAM 14강 - 2장 Introduction to slam
입문 Visual SLAM 14강  - 2장 Introduction to slam입문 Visual SLAM 14강  - 2장 Introduction to slam
입문 Visual SLAM 14강 - 2장 Introduction to slam
 
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
김혁, <드래곤 하운드>의 PBR과 레이트레이싱 렌더링 기법, NDC2019
 
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
Introduction to Bidirectional Path Tracing (BDPT) & Implementation using Open...
 
Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4Physically Based Lighting in Unreal Engine 4
Physically Based Lighting in Unreal Engine 4
 
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...Penner   pre-integrated skin rendering (siggraph 2011 advances in real-time r...
Penner pre-integrated skin rendering (siggraph 2011 advances in real-time r...
 
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in FrostbitePhysically Based Sky, Atmosphere and Cloud Rendering in Frostbite
Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite
 
[0821 박민근] 렌즈 플레어(lens flare)
[0821 박민근] 렌즈 플레어(lens flare)[0821 박민근] 렌즈 플레어(lens flare)
[0821 박민근] 렌즈 플레어(lens flare)
 
[NDC17] 물리 기반 대기와 구름 만들기
[NDC17] 물리 기반 대기와 구름 만들기[NDC17] 물리 기반 대기와 구름 만들기
[NDC17] 물리 기반 대기와 구름 만들기
 

Destaque

Kalman filter - Applications in Image processing
Kalman filter - Applications in Image processingKalman filter - Applications in Image processing
Kalman filter - Applications in Image processing
Ravi Teja
 
Telescope pre のコピー
Telescope pre のコピーTelescope pre のコピー
Telescope pre のコピー
Hitsuji Kaji
 
OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
Girish Ghate
 

Destaque (17)

openFrameworks 007 - 3D
openFrameworks 007 - 3DopenFrameworks 007 - 3D
openFrameworks 007 - 3D
 
Kalman filter - Applications in Image processing
Kalman filter - Applications in Image processingKalman filter - Applications in Image processing
Kalman filter - Applications in Image processing
 
Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013Dynamic C++ ACCU 2013
Dynamic C++ ACCU 2013
 
openFrameworks 007 - utils
openFrameworks 007 - utilsopenFrameworks 007 - utils
openFrameworks 007 - utils
 
Open frameworks 101_fitc
Open frameworks 101_fitcOpen frameworks 101_fitc
Open frameworks 101_fitc
 
iOS OpenGL
iOS OpenGLiOS OpenGL
iOS OpenGL
 
Opengl Lighting Basic
Opengl Lighting BasicOpengl Lighting Basic
Opengl Lighting Basic
 
GLSLで遊ぶポイントスプライト
GLSLで遊ぶポイントスプライトGLSLで遊ぶポイントスプライト
GLSLで遊ぶポイントスプライト
 
Week 2 understand lighting (semester 1)
Week 2 understand lighting (semester 1)Week 2 understand lighting (semester 1)
Week 2 understand lighting (semester 1)
 
OpenGL Interaction
OpenGL InteractionOpenGL Interaction
OpenGL Interaction
 
Telescope pre のコピー
Telescope pre のコピーTelescope pre のコピー
Telescope pre のコピー
 
Felwyrld Tech
Felwyrld TechFelwyrld Tech
Felwyrld Tech
 
CS 354 Shadows
CS 354 ShadowsCS 354 Shadows
CS 354 Shadows
 
OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
 
Computer vision techniques for interactive art
Computer vision techniques for interactive artComputer vision techniques for interactive art
Computer vision techniques for interactive art
 
中級グラフィックス入門~シャドウマッピング総まとめ~
中級グラフィックス入門~シャドウマッピング総まとめ~中級グラフィックス入門~シャドウマッピング総まとめ~
中級グラフィックス入門~シャドウマッピング総まとめ~
 
OpenGL Basics
OpenGL BasicsOpenGL Basics
OpenGL Basics
 

Semelhante a Shadow Mapping with Today's OpenGL Hardware

Shadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive ApplicationsShadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive Applications
stefan_b
 
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
Mark Kilgard
 
study Active Refocusing Of Images And Videos
study Active Refocusing Of Images And Videosstudy Active Refocusing Of Images And Videos
study Active Refocusing Of Images And Videos
Chiamin Hsu
 

Semelhante a Shadow Mapping with Today's OpenGL Hardware (20)

Interactive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space TechniquesInteractive Refractions And Caustics Using Image Space Techniques
Interactive Refractions And Caustics Using Image Space Techniques
 
Shadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive ApplicationsShadow Techniques for Real-Time and Interactive Applications
Shadow Techniques for Real-Time and Interactive Applications
 
Advanced Lighting for Interactive Applications
Advanced Lighting for Interactive ApplicationsAdvanced Lighting for Interactive Applications
Advanced Lighting for Interactive Applications
 
Shadow Caster Culling for Efficient Shadow Mapping (Authors: Jiří Bittner, Ol...
Shadow Caster Culling for Efficient Shadow Mapping (Authors: Jiří Bittner, Ol...Shadow Caster Culling for Efficient Shadow Mapping (Authors: Jiří Bittner, Ol...
Shadow Caster Culling for Efficient Shadow Mapping (Authors: Jiří Bittner, Ol...
 
Soft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear LightsSoft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear Lights
 
Virtual Reality 3D home applications
Virtual Reality 3D home applicationsVirtual Reality 3D home applications
Virtual Reality 3D home applications
 
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)
 
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
 
Lecture1
Lecture1Lecture1
Lecture1
 
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
 
Svr Raskar
Svr RaskarSvr Raskar
Svr Raskar
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 
Deferred Pixel Shading on the PLAYSTATION®3
Deferred Pixel Shading on the PLAYSTATION®3Deferred Pixel Shading on the PLAYSTATION®3
Deferred Pixel Shading on the PLAYSTATION®3
 
Normal Mapping / Computer Graphics - IK
Normal Mapping / Computer Graphics - IKNormal Mapping / Computer Graphics - IK
Normal Mapping / Computer Graphics - IK
 
Real-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesReal-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow Volumes
 
study Active Refocusing Of Images And Videos
study Active Refocusing Of Images And Videosstudy Active Refocusing Of Images And Videos
study Active Refocusing Of Images And Videos
 
Trytten computergraphics(1)
Trytten computergraphics(1)Trytten computergraphics(1)
Trytten computergraphics(1)
 
Dual photography
Dual photographyDual photography
Dual photography
 
visual realism in geometric modeling
visual realism in geometric modelingvisual realism in geometric modeling
visual realism in geometric modeling
 
Lecture 11 Perspective Projection
Lecture 11 Perspective ProjectionLecture 11 Perspective Projection
Lecture 11 Perspective Projection
 

Mais de Mark Kilgard

Mais de 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
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Último (20)

Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Shadow Mapping with Today's OpenGL Hardware

  • 1. Shadow Mapping with Today’s OpenGL Hardware CEDEC 2001 Tokyo, Japan
  • 2. Mark J. Kilgard Graphics Software Engineer NVIDIA Corporation
  • 3.
  • 4. Common Real-time Shadow Techniques Shadow volumes Light maps Projected planar shadows Hybrid approaches
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12. Shadow Mapping with a Picture in 2D (2) light source eye position depth map Z = A fragment’s light Z = B depth map image plane eye view image plane, a.k.a. the frame buffer The A  B unshadowed fragment case
  • 13. Note image precision mismatch! The depth map could be at a different resolution from the framebuffer This mismatch can lead to artifacts Shadow Mapping with a Picture in 2D (3)
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41. Shadow Map Eye Linear Texgen Transform 1/2 1/2 1/2 1 1/2 1/2 1/2 Light frustum (projection) matrix Light view (look at) matrix Inverse eye view (look at) matrix Eye view (look at) matrix Modeling matrix x o y o z o w o x e y e z e w e = = x e y e z e w e s t r q glTexGen automatically applies this when modelview matrix contains just the eye view transform Supply this combined transform to glTexGen
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49. Hardware Shadow Map Filtering Example GL_NEAREST: blocky GL_LINEAR: antialiased edges Low shadow map resolution used to heightens filtering artifacts
  • 50.
  • 51.
  • 52.
  • 53.
  • 54.
  • 55. The Need for Dimming Diffuse No dimming; shadowed regions have 0% diffuse and 0% specular With dimming; shadowed regions have 40% diffuse and 0% specular Front facing shadowed regions appear unnaturally flat. Still evidence of curvature in shadowed regions. No specular in shadowed regions in both versions.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66. Four Images of Dueling Frusta Case Eye’s View Light’s View Eye’s View with projection of color-coded mipmap levels from light: Blue = magnification Red = minification Light’s View with re-projection of above image from the eye
  • 67. Interpretation of the Four Images of the Dueling Frusta Case Eye’s View Light’s View Region that is smallest in the light’s view is a region that is very large in the eye’s view. This implies that it would require a very high-resolution shadow map to avoid obvious blocky shadow edge artifacts.
  • 68. Example of Blocky Shadow Edge Artifacts in Dueling Frusta Situations Light position out here pointing towards the viewer. Blocky shadow edge artifacts. Notice that shadow edge is well defined in the distance.
  • 69. Good Situation, Close to the Miner’s Lamp Eye’s View Light’s View Very similar views Note how the color-coded images share similar pattern and the coloration is uniform. Implies single depth map resolution would work well for most of the scene. Ghosting is where projection would be in shadow.
  • 70.
  • 71.
  • 72.
  • 73.
  • 74.
  • 75.
  • 76.
  • 77.
  • 78.
  • 79.