SlideShare una empresa de Scribd logo
1 de 36
Shadow Volumes on Programmable Graphics Hardware Stefan Brabec Hans-Peter Seidel MPI Informatik
Overview ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volumes ,[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volumes ,[object Object],[object Object],[object Object],occluder light shadow region lit
Shadow Volume Generation ,[object Object],[object Object],[object Object],[object Object],[object Object]
Shadow Volume Generation ,[object Object],Light Light FF BF FF FF Silhouette Edge (v0,v1) ! No Silhouette Edge ! n 1 n 2 n 1 n 2
Shadow Volume Rendering ,[object Object],[object Object]
Shadow Volume Rendering ,[object Object],[object Object],[object Object],[object Object],[object Object],silhouette detection   Focus of this talk:
Motivation ,[object Object]
Motivation ,[object Object]
Our method ,[object Object],[object Object],[object Object],[object Object],[object Object]
Input Data ,[object Object],[object Object],[object Object],Example: This is  not  a closed mesh, but since we are only focusing on one edge of this mesh its ok.
Coordinate Transformation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Transform to world/eye space ,[object Object],[object Object],[object Object],[object Object],P 0 P 1 P 2 P 3 P 4 position texture P 0 P 1 P 2 P 3 P 4 P N
Transform to world/eye space ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],!!ARBvp1.0 ATTRIB  iVertexPos  = vertex.position; ATTRIB  iVertexIdx  = vertex.texcoord[0]; PARAM   mv[4]  = { state.matrix.modelview }; OUTPUT  oPos  = result.position; OUTPUT  oDumpPos  = result.texcoord[0]; # Transform the vertex to eye coordinates .   DP4   oDumpPos.x, mv[0], iVertexPos; DP4   oDumpPos.y, mv[1], iVertexPos; DP4   oDumpPos.z, mv[2], iVertexPos; DP4   oDumpPos.w, mv[3], iVertexPos; # Vertex position is its index (x,y,0,1) MOV   oPos, iVertexIdx; END
Transform to world/eye space ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Process edges ,[object Object],[object Object],[object Object],[object Object],[object Object]
Process edges ,[object Object],[object Object],[object Object],E 0_idx P 0_idx P 1_idx P 3_idx P 4_idx glBegin(GL_POINTS) ; glAttrib(P0_idx, P3_idx,  P1_idx, P4_idx); glVertex1f(E0_idx); glEnd();
Process Edges ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Process edges ,[object Object],E 0_idx P 0_idx P 1_idx P 3_idx P 4_idx input data 4 texture lookups for  world space positions P 0 P 1 P 3 P 4 registers P 3 P 0 P 1 P 4 N 1  = (P 3 –P 0 )x(P 1 –P 0 ) N 2  = (P 4 –P 0 )x(P 3 –P 0 ) front & back  facing ? position texture P 0 P 1 P 2 P 3 P 4 Light Store silhouette flag (yes/no) at edge index E 0 E 1 E 2 E 3 E 4 E M edge texture
Silhouette Detection ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Rendering Shadow Volumes ,[object Object],for all lights  { for all edges  { if (is silhouette edge for light i) { get edge’s vertices  render extruded quad  } } }
Rendering shadow volumes ,[object Object],[object Object],[object Object],[object Object],position texture P 0 P 1 P 2 P 3 P 4 P N E 0 E 1 E 2 E 3 E 4 E M edge texture glBegin(GL_QUADS) ; glVertex(P0_idx, E0_idx, 0); glVertex(P1_idx, E0_idx, 0); glVertex(P1_idx, E0_idx, 1); glVertex(P0_idx, E0_idx, 1); P =  Lookup (p_idx) mask =  Lookup (e_idx) if (mask & silhouette) { if (extrude)  // 0 or 1 flag out = P – Light_pos else out = P }  else  { out = (0,0,0,1)  // outside view   }
Rendering shadow volumes ,[object Object],[object Object],E 0 =  silhouette quad texture E` 0 =  silhouette &    extrude P 0 L P 3 P 0- L P 3- L Q 0 Q 1 Q 2 Q 3 Q 0  = (P 0x ,P 0y ,P 0z , E 0 ) Q 1  = (P 3x ,P 3y ,P 3z , E 0 ) Q 2  = (P 3x ,P 3y ,P 3z , E` 0 ) Q 3  = (P 0x ,P 0y ,P 0z , E` 0 )
Rendering Shadow Volumes ,[object Object],[object Object],[object Object],[object Object],[object Object],Light0: Silhouette Light0: Extrude  Light1: Silhouette Light1: Extrude
Rendering Shadow Volumes ,[object Object],Vertex Array: glBegin(GL_QUADS) ; glArrayElement(0); glArrayElement(1); glArrayElement(2); glArrayElement(3); P_xyz = IN_xyz; E = IN_w; if(E & silhouette) { if(E & extrude) out = P-L; else out = P; } else { out = somewhere outside view } Q 0 Q 1 Q 2 Q 3
Rendering Shadow Volumes ,[object Object],[object Object],[object Object],[object Object],[object Object]
ARB_superbuffers ,[object Object],[object Object],[object Object],[object Object],[object Object],glVertexArrayMem ( GL_VERTEX_ARRAY,    4,  mem, 0); memory block glAttachMem ( GL_DRAW_FRAMEBUFFER,  GL_AUX0, mem); glAttachMem ( GL_TEXTURE_2D,    GL_IMAGES, mem); glAllocMem2D (fmt, w, h, …)
ARB_superbuffers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object],[object Object]
Results
Conclusions ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Future Work ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Thank you !

Más contenido relacionado

La actualidad más candente

Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked Lists
Holger Gruen
 

La actualidad más candente (20)

CS 354 Viewing Stuff
CS 354 Viewing StuffCS 354 Viewing Stuff
CS 354 Viewing Stuff
 
CS 354 Graphics Math
CS 354 Graphics MathCS 354 Graphics Math
CS 354 Graphics Math
 
CS 354 Introduction
CS 354 IntroductionCS 354 Introduction
CS 354 Introduction
 
CS 354 Acceleration Structures
CS 354 Acceleration StructuresCS 354 Acceleration Structures
CS 354 Acceleration Structures
 
NVIDIA's OpenGL Functionality
NVIDIA's OpenGL FunctionalityNVIDIA's OpenGL Functionality
NVIDIA's OpenGL Functionality
 
Anatomy of a Texture Fetch
Anatomy of a Texture FetchAnatomy of a Texture Fetch
Anatomy of a Texture Fetch
 
OpenGL 3.2 and More
OpenGL 3.2 and MoreOpenGL 3.2 and More
OpenGL 3.2 and More
 
Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well Modern OpenGL Usage: Using Vertex Buffer Objects Well
Modern OpenGL Usage: Using Vertex Buffer Objects Well
 
GDC 2012: Advanced Procedural Rendering in DX11
GDC 2012: Advanced Procedural Rendering in DX11GDC 2012: Advanced Procedural Rendering in DX11
GDC 2012: Advanced Procedural Rendering in DX11
 
CS 354 Programmable Shading
CS 354 Programmable ShadingCS 354 Programmable Shading
CS 354 Programmable Shading
 
CS 354 Final Exam Review
CS 354 Final Exam ReviewCS 354 Final Exam Review
CS 354 Final Exam Review
 
Beyond porting
Beyond portingBeyond porting
Beyond porting
 
CS 354 Project 2 and Compression
CS 354 Project 2 and CompressionCS 354 Project 2 and Compression
CS 354 Project 2 and Compression
 
CS 354 GPU Architecture
CS 354 GPU ArchitectureCS 354 GPU Architecture
CS 354 GPU Architecture
 
Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5Trident International Graphics Workshop 2014 4/5
Trident International Graphics Workshop 2014 4/5
 
Oit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked ListsOit And Indirect Illumination Using Dx11 Linked Lists
Oit And Indirect Illumination Using Dx11 Linked Lists
 
NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016NVIDIA OpenGL in 2016
NVIDIA OpenGL in 2016
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
Matlab Feature Extraction Using Segmentation And Edge Detection
Matlab Feature Extraction Using Segmentation And Edge DetectionMatlab Feature Extraction Using Segmentation And Edge Detection
Matlab Feature Extraction Using Segmentation And Edge Detection
 
CS 354 Lighting
CS 354 LightingCS 354 Lighting
CS 354 Lighting
 

Destacado

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
 
Shaders in Unity by Zoel
Shaders in Unity by ZoelShaders in Unity by Zoel
Shaders in Unity by Zoel
Agate Studio
 

Destacado (7)

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
 
Shaders in Unity by Zoel
Shaders in Unity by ZoelShaders in Unity by Zoel
Shaders in Unity by Zoel
 
Unity advanced computer graphics week 02
Unity advanced computer graphics week 02Unity advanced computer graphics week 02
Unity advanced computer graphics week 02
 
Shader Programming With Unity
Shader Programming With UnityShader Programming With Unity
Shader Programming With Unity
 
Shaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the BestShaders - Claudia Doppioslash - Unity With the Best
Shaders - Claudia Doppioslash - Unity With the Best
 
Cg shaders with Unity3D
Cg shaders with Unity3DCg shaders with Unity3D
Cg shaders with Unity3D
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Similar a Shadow Volumes on Programmable Graphics Hardware

Practical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT MethodsPractical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT Methods
Naughty Dog
 
D3 D10 Unleashed New Features And Effects
D3 D10 Unleashed   New Features And EffectsD3 D10 Unleashed   New Features And Effects
D3 D10 Unleashed New Features And Effects
Thomas Goddard
 

Similar a Shadow Volumes on Programmable Graphics Hardware (20)

Chapter-3.pdf
Chapter-3.pdfChapter-3.pdf
Chapter-3.pdf
 
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeksBeginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
Beginning direct3d gameprogramming09_shaderprogramming_20160505_jintaeks
 
GL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdfGL Shading Language Document by OpenGL.pdf
GL Shading Language Document by OpenGL.pdf
 
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
Vertex Shader Tricks by Bill Bilodeau - AMD at GDC14
 
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
OpenGL Fixed Function to Shaders - Porting a fixed function application to “m...
 
Rendering basics
Rendering basicsRendering basics
Rendering basics
 
Advanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics APIAdvanced Game Development with the Mobile 3D Graphics API
Advanced Game Development with the Mobile 3D Graphics API
 
GPU - how can we use it?
GPU - how can we use it?GPU - how can we use it?
GPU - how can we use it?
 
Practical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT MethodsPractical Spherical Harmonics Based PRT Methods
Practical Spherical Harmonics Based PRT Methods
 
Practical spherical harmonics based PRT methods.ppsx
Practical spherical harmonics based PRT methods.ppsxPractical spherical harmonics based PRT methods.ppsx
Practical spherical harmonics based PRT methods.ppsx
 
lectureAll-OpenGL-complete-Guide-Tutorial.pdf
lectureAll-OpenGL-complete-Guide-Tutorial.pdflectureAll-OpenGL-complete-Guide-Tutorial.pdf
lectureAll-OpenGL-complete-Guide-Tutorial.pdf
 
Intro to OpenGL ES 2.0
Intro to OpenGL ES 2.0Intro to OpenGL ES 2.0
Intro to OpenGL ES 2.0
 
Creating an Uber Clone - Part IV - Transcript.pdf
Creating an Uber Clone - Part IV - Transcript.pdfCreating an Uber Clone - Part IV - Transcript.pdf
Creating an Uber Clone - Part IV - Transcript.pdf
 
Open GL ES Android
Open GL ES AndroidOpen GL ES Android
Open GL ES Android
 
Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5Trident International Graphics Workshop 2014 1/5
Trident International Graphics Workshop 2014 1/5
 
Bai 1
Bai 1Bai 1
Bai 1
 
3 d graphics with opengl part 2
3 d graphics with opengl  part 23 d graphics with opengl  part 2
3 d graphics with opengl part 2
 
D3 D10 Unleashed New Features And Effects
D3 D10 Unleashed   New Features And EffectsD3 D10 Unleashed   New Features And Effects
D3 D10 Unleashed New Features And Effects
 
Opengl basics
Opengl basicsOpengl basics
Opengl basics
 
OpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI PlatformsOpenGL ES based UI Development on TI Platforms
OpenGL ES based UI Development on TI Platforms
 

Ú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@
 

Último (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
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...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
+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...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
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
 
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
 

Shadow Volumes on Programmable Graphics Hardware

  • 1. Shadow Volumes on Programmable Graphics Hardware Stefan Brabec Hans-Peter Seidel MPI Informatik
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 34.
  • 35.