SlideShare una empresa de Scribd logo
1 de 36
Interactive Refractions and Caustics  Using Image-Space Techniques Shader Study  (http://cafe.naver.com/shader.cafe) Codevania  (http://codevania.blogspot.com)
Reflection… Refraction… Caustic…
 
Goal is…
Table of Contents ,[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]
Approximate, Image-Space Refraction ,[object Object],[object Object],-_-!? ^-^♬
Approximate, Image-Space Refraction ,[object Object],[object Object],[object Object],[object Object]
Approximate, Image-Space Refraction ,[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]
Approximate, Image-Space Refraction ,[object Object],[object Object],[object Object],[object Object]
Refraction Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Approximate Distance d 1 ,[object Object],[object Object],[object Object],[object Object],[object Object]
Approximating Surface Normal N 2 ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Graphical Overview of Rendering Image-Space Refraction ,[object Object]
Graphical Overview of Rendering Image-Space Refraction ,[object Object]
Graphical Overview of Rendering Image-Space Refraction ,[object Object]
Graphical Overview of Rendering Image-Space Refraction ,[object Object]
Graphical Overview of Rendering Image-Space Refraction ,[object Object],[object Object]
Fixing Problem Cases ,[object Object],[object Object],[object Object],[object Object],[object Object]
Fixing Problem Cases ,[object Object]
Fixing Problem Cases ,[object Object]
Fixing Problem Cases ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Putting it Together
Approximate, Image-Space Caustics ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Caustics Algorithm ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Caustics Algorithm ,[object Object],[object Object],[object Object]
Rendering From the Light ,[object Object],[object Object],[object Object],Depth Map Final Photon Locations Standard Rendering From Light’s View Incident Photon Direction
Rendering Caustic Map Use photon data in vertex shader, render points at photon locations Light Space Eye Space
Applying the Caustic Map ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Putting it Together ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Examples and Discussion
Conclusion ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Code snippets RenderCaustics { // create the buffers needed for refraction from light (for caustics) createRefractionBuffers // create all the necessary buffers (normal, bg geom, depth, etc) from a particular POV // draw the normals for the back side createBackSideMaps // Draw just the background geometry createOtherObjectEyeTexture // draw the caustics positions & directions info to the framebuffer DrawSceneCausticsToBuffer // Draw refractive geometry from a particular POV // store positions of final hitpoints into a secondary buffer set the eye's lookat  Draw the environment map Draw the refractor Draw the non refractive objects in the scene PerformLightSpaceGather // find caustic contribution using an image-space gather using a image from the light's POV   draw photons splats using point sprites } // Now we've got our caustic map. However, simply projecting this onto the // scene means any surface will get a caustic, whether shadowed (from the refractor) or not! // By copying the depth buffer from the background image we used above, // we can sort this out to only cast caustics onto the "frontmost" surface behind the refractor
Code snippets DrawCausticsSceneWithLightSpaceGatheredPhotons { if ( needToRerenderCaustics )   RenderCaustics // create the buffers needed for refraction from the "eye's" point of view CreateRefractionBuffersForLightSpacePhotonGather  // create all the necessary buffers (normal, bg geom, depth, etc) from a particular POV // Draw just the background geometry (MacBeth, Dragon, etc)   DrawShadowedBackgroundWithLightSpaceCaustics DrawEnvironmentMap compute the shadow map matrix index into 'light-space caustic map' displayBackGroundGeometry   // draw the normals for the back side   createBackSideMaps // draw the scene, with caustics on the background geometry, refracted thru the refractor FinalDrawWithAlreadyComputedLightSpaceGather // takes the background geometry textures // (which includes one with accumulated photon contributions)   set the eye's lookat   //Draw the (background) non refractive objects in the scene   displayLargeTextureWithDepth   // Go ahead and actually draw the refractive object   glCallList }
Graphical Overview (1) Eye-space background image without refractor (2) Eye-space background surface depth map (3) Light-space background surface depth map (4) Eye-space view of refractor's backfacing surface normals (5) Eye-space view of refractor's backfacing surface depth (6) Four frame caustic map (one frame's intensity per channel) (7) Current frame's photon buffer (i.e., the photon positions) (8) Surface normal at final photon positions (light-space) (9) Light-space depth map (a.k.a. the shadow map)
References ,[object Object],[object Object],[object Object],[object Object],[object Object]
Appendix ,[object Object]

Más contenido relacionado

La actualidad más candente

Advanced Lighting Techniques Dan Baker (Meltdown 2005)
Advanced Lighting Techniques   Dan Baker (Meltdown 2005)Advanced Lighting Techniques   Dan Baker (Meltdown 2005)
Advanced Lighting Techniques Dan Baker (Meltdown 2005)mobius.cn
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferRaj Sikarwar
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shadingeshveeen
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenBenjamin Glatzel
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9fungfung Chen
 
Advanced Lighting for Interactive Applications
Advanced Lighting for Interactive ApplicationsAdvanced Lighting for Interactive Applications
Advanced Lighting for Interactive Applicationsstefan_b
 
Build Your Own 3D Scanner: Conclusion
Build Your Own 3D Scanner: ConclusionBuild Your Own 3D Scanner: Conclusion
Build Your Own 3D Scanner: ConclusionDouglas Lanman
 
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareMark Kilgard
 
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
 
Structure and Motion - 3D Reconstruction of Cameras and Structure
Structure and Motion - 3D Reconstruction of Cameras and StructureStructure and Motion - 3D Reconstruction of Cameras and Structure
Structure and Motion - 3D Reconstruction of Cameras and StructureGiovanni Murru
 
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 Real-time Volumetric Cloudscapes of Horizon Zero Dawn
The Real-time Volumetric Cloudscapes of Horizon Zero DawnThe Real-time Volumetric Cloudscapes of Horizon Zero Dawn
The Real-time Volumetric Cloudscapes of Horizon Zero DawnGuerrilla
 
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWSAPPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWSijcga
 
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 VideosChiamin Hsu
 
Real-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesReal-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesMark Kilgard
 
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
 
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
 

La actualidad más candente (20)

Advanced Lighting Techniques Dan Baker (Meltdown 2005)
Advanced Lighting Techniques   Dan Baker (Meltdown 2005)Advanced Lighting Techniques   Dan Baker (Meltdown 2005)
Advanced Lighting Techniques Dan Baker (Meltdown 2005)
 
Hidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-bufferHidden Surface Removal using Z-buffer
Hidden Surface Removal using Z-buffer
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
Volumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the FallenVolumetric Lighting for Many Lights in Lords of the Fallen
Volumetric Lighting for Many Lights in Lords of the Fallen
 
CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9CG OpenGL surface detection+illumination+rendering models-course 9
CG OpenGL surface detection+illumination+rendering models-course 9
 
Advanced Lighting for Interactive Applications
Advanced Lighting for Interactive ApplicationsAdvanced Lighting for Interactive Applications
Advanced Lighting for Interactive Applications
 
Build Your Own 3D Scanner: Conclusion
Build Your Own 3D Scanner: ConclusionBuild Your Own 3D Scanner: Conclusion
Build Your Own 3D Scanner: Conclusion
 
Shadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL HardwareShadow Mapping with Today's OpenGL Hardware
Shadow Mapping with Today's OpenGL Hardware
 
Lighting and shading
Lighting and shadingLighting and shading
Lighting and shading
 
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
 
Structure and Motion - 3D Reconstruction of Cameras and Structure
Structure and Motion - 3D Reconstruction of Cameras and StructureStructure and Motion - 3D Reconstruction of Cameras and Structure
Structure and Motion - 3D Reconstruction of Cameras and Structure
 
CS 354 Lighting
CS 354 LightingCS 354 Lighting
CS 354 Lighting
 
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 Real-time Volumetric Cloudscapes of Horizon Zero Dawn
The Real-time Volumetric Cloudscapes of Horizon Zero DawnThe Real-time Volumetric Cloudscapes of Horizon Zero Dawn
The Real-time Volumetric Cloudscapes of Horizon Zero Dawn
 
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWSAPPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
APPEARANCE-BASED REPRESENTATION AND RENDERING OF CAST SHADOWS
 
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
 
Real-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow VolumesReal-time Shadowing Techniques: Shadow Volumes
Real-time Shadowing Techniques: Shadow Volumes
 
01 ray-optics-mm
01 ray-optics-mm01 ray-optics-mm
01 ray-optics-mm
 
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)
 
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
 

Destacado

ARCHITECTURE HISTORY OF MALAYSIA HOUSES
ARCHITECTURE HISTORY OF MALAYSIA HOUSES ARCHITECTURE HISTORY OF MALAYSIA HOUSES
ARCHITECTURE HISTORY OF MALAYSIA HOUSES Ali Alakhram
 
Unique Space Planning concepts for Lifestyle Apartment
Unique Space Planning concepts for Lifestyle Apartment Unique Space Planning concepts for Lifestyle Apartment
Unique Space Planning concepts for Lifestyle Apartment Shashi Rekha
 
Top 10 Persuasive techniques
Top 10 Persuasive techniquesTop 10 Persuasive techniques
Top 10 Persuasive techniques16ardmanc
 
Architectural case study of Apartments
Architectural case study of ApartmentsArchitectural case study of Apartments
Architectural case study of ApartmentsTanzil Faraz
 

Destacado (6)

RUMAH KUTAI
RUMAH KUTAIRUMAH KUTAI
RUMAH KUTAI
 
ARCHITECTURE HISTORY OF MALAYSIA HOUSES
ARCHITECTURE HISTORY OF MALAYSIA HOUSES ARCHITECTURE HISTORY OF MALAYSIA HOUSES
ARCHITECTURE HISTORY OF MALAYSIA HOUSES
 
Unique Space Planning concepts for Lifestyle Apartment
Unique Space Planning concepts for Lifestyle Apartment Unique Space Planning concepts for Lifestyle Apartment
Unique Space Planning concepts for Lifestyle Apartment
 
Interior space
Interior spaceInterior space
Interior space
 
Top 10 Persuasive techniques
Top 10 Persuasive techniquesTop 10 Persuasive techniques
Top 10 Persuasive techniques
 
Architectural case study of Apartments
Architectural case study of ApartmentsArchitectural case study of Apartments
Architectural case study of Apartments
 

Similar a 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 Applicationsstefan_b
 
Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionDamian T. Gordon
 
Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationWolfgang Engel
 
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfAdam Hill
 
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
 
Globalillumination
GlobalilluminationGlobalillumination
Globalilluminationmeheng1001
 
Ray casting algorithm by mhm
Ray casting algorithm by mhmRay casting algorithm by mhm
Ray casting algorithm by mhmMd Mosharof Hosen
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - TexturesMichael Heron
 
7 illumination and-shading computer graphics
7 illumination and-shading computer graphics7 illumination and-shading computer graphics
7 illumination and-shading computer graphicscairo university
 
Computer Vision panoramas
Computer Vision  panoramasComputer Vision  panoramas
Computer Vision panoramasWael Badawy
 
Adjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 WhiteAdjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 Whiteguest0030172
 
Adjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 WhiteAdjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 WhiteChristoph Borel
 
Green Custard Friday Talk 17: Ray Tracing
Green Custard Friday Talk 17: Ray TracingGreen Custard Friday Talk 17: Ray Tracing
Green Custard Friday Talk 17: Ray TracingGreen Custard
 
SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)
SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)
SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)Matthew O'Toole
 
Understanding neural radiance fields
Understanding neural radiance fieldsUnderstanding neural radiance fields
Understanding neural radiance fieldsVarun Bhaseen
 
visual realism in geometric modeling
visual realism in geometric modelingvisual realism in geometric modeling
visual realism in geometric modelingsabiha khathun
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologyTiago Sousa
 

Similar a Interactive Refractions And Caustics Using Image Space Techniques (20)

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
 
Ray Tracing.pdf
Ray Tracing.pdfRay Tracing.pdf
Ray Tracing.pdf
 
Computer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and MotionComputer Vision: Shape from Specularities and Motion
Computer Vision: Shape from Specularities and Motion
 
Paris Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global IlluminationParis Master Class 2011 - 07 Dynamic Global Illumination
Paris Master Class 2011 - 07 Dynamic Global Illumination
 
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdfPapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
PapersWeLove - Rendering Synthetic Objects Into Real Scenes - Paul Debevec.pdf
 
Soft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear LightsSoft Shadow Maps for Linear Lights
Soft Shadow Maps for Linear Lights
 
Svr Raskar
Svr RaskarSvr Raskar
Svr Raskar
 
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
 
Globalillumination
GlobalilluminationGlobalillumination
Globalillumination
 
Ray casting algorithm by mhm
Ray casting algorithm by mhmRay casting algorithm by mhm
Ray casting algorithm by mhm
 
GRPHICS07 - Textures
GRPHICS07 - TexturesGRPHICS07 - Textures
GRPHICS07 - Textures
 
7 illumination and-shading computer graphics
7 illumination and-shading computer graphics7 illumination and-shading computer graphics
7 illumination and-shading computer graphics
 
Computer Vision panoramas
Computer Vision  panoramasComputer Vision  panoramas
Computer Vision panoramas
 
Adjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 WhiteAdjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 White
 
Adjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 WhiteAdjoint Radiosity Borel Earsel09 2 11 09 White
Adjoint Radiosity Borel Earsel09 2 11 09 White
 
Green Custard Friday Talk 17: Ray Tracing
Green Custard Friday Talk 17: Ray TracingGreen Custard Friday Talk 17: Ray Tracing
Green Custard Friday Talk 17: Ray Tracing
 
SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)
SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)
SIGGRAPH 2014 Course on Computational Cameras and Displays (part 4)
 
Understanding neural radiance fields
Understanding neural radiance fieldsUnderstanding neural radiance fields
Understanding neural radiance fields
 
visual realism in geometric modeling
visual realism in geometric modelingvisual realism in geometric modeling
visual realism in geometric modeling
 
Secrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics TechnologySecrets of CryENGINE 3 Graphics Technology
Secrets of CryENGINE 3 Graphics Technology
 

Más de codevania

14 virtual memory
14 virtual memory14 virtual memory
14 virtual memorycodevania
 
Gstar gossip
Gstar gossipGstar gossip
Gstar gossipcodevania
 
Deferred rendering transparency
Deferred rendering transparencyDeferred rendering transparency
Deferred rendering transparencycodevania
 
테스트 자동화의 원칙
테스트 자동화의 원칙테스트 자동화의 원칙
테스트 자동화의 원칙codevania
 
3장 자동적으로 움직이는 게임 에이전트 생성법
3장 자동적으로 움직이는 게임 에이전트 생성법3장 자동적으로 움직이는 게임 에이전트 생성법
3장 자동적으로 움직이는 게임 에이전트 생성법codevania
 
Spin locks 추가 자료
Spin locks 추가 자료Spin locks 추가 자료
Spin locks 추가 자료codevania
 
Texture bombing
Texture bombingTexture bombing
Texture bombingcodevania
 
Memory corruption stack
Memory corruption stackMemory corruption stack
Memory corruption stackcodevania
 
Mathematical Structures for CS [Chapter3]456
Mathematical Structures for CS [Chapter3]456Mathematical Structures for CS [Chapter3]456
Mathematical Structures for CS [Chapter3]456codevania
 
Optimizing The Content Pipeline
Optimizing The Content PipelineOptimizing The Content Pipeline
Optimizing The Content Pipelinecodevania
 
시간 있으면 설계나 합시다
시간 있으면 설계나 합시다시간 있으면 설계나 합시다
시간 있으면 설계나 합시다codevania
 
Memory Corruption Heap
Memory Corruption HeapMemory Corruption Heap
Memory Corruption Heapcodevania
 
Generic Refraction Simulation
Generic Refraction SimulationGeneric Refraction Simulation
Generic Refraction Simulationcodevania
 

Más de codevania (16)

14 virtual memory
14 virtual memory14 virtual memory
14 virtual memory
 
Taocp 2_4
Taocp  2_4Taocp  2_4
Taocp 2_4
 
Taocp 2_3_1
Taocp  2_3_1Taocp  2_3_1
Taocp 2_3_1
 
Taocp 1 2-2
Taocp 1 2-2Taocp 1 2-2
Taocp 1 2-2
 
Gstar gossip
Gstar gossipGstar gossip
Gstar gossip
 
Deferred rendering transparency
Deferred rendering transparencyDeferred rendering transparency
Deferred rendering transparency
 
테스트 자동화의 원칙
테스트 자동화의 원칙테스트 자동화의 원칙
테스트 자동화의 원칙
 
3장 자동적으로 움직이는 게임 에이전트 생성법
3장 자동적으로 움직이는 게임 에이전트 생성법3장 자동적으로 움직이는 게임 에이전트 생성법
3장 자동적으로 움직이는 게임 에이전트 생성법
 
Spin locks 추가 자료
Spin locks 추가 자료Spin locks 추가 자료
Spin locks 추가 자료
 
Texture bombing
Texture bombingTexture bombing
Texture bombing
 
Memory corruption stack
Memory corruption stackMemory corruption stack
Memory corruption stack
 
Mathematical Structures for CS [Chapter3]456
Mathematical Structures for CS [Chapter3]456Mathematical Structures for CS [Chapter3]456
Mathematical Structures for CS [Chapter3]456
 
Optimizing The Content Pipeline
Optimizing The Content PipelineOptimizing The Content Pipeline
Optimizing The Content Pipeline
 
시간 있으면 설계나 합시다
시간 있으면 설계나 합시다시간 있으면 설계나 합시다
시간 있으면 설계나 합시다
 
Memory Corruption Heap
Memory Corruption HeapMemory Corruption Heap
Memory Corruption Heap
 
Generic Refraction Simulation
Generic Refraction SimulationGeneric Refraction Simulation
Generic Refraction Simulation
 

Último

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Último (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Interactive Refractions And Caustics Using Image Space Techniques

  • 1. Interactive Refractions and Caustics Using Image-Space Techniques Shader Study (http://cafe.naver.com/shader.cafe) Codevania (http://codevania.blogspot.com)
  • 3.  
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27. Rendering Caustic Map Use photon data in vertex shader, render points at photon locations Light Space Eye Space
  • 28.
  • 29.
  • 31.
  • 32. Code snippets RenderCaustics { // create the buffers needed for refraction from light (for caustics) createRefractionBuffers // create all the necessary buffers (normal, bg geom, depth, etc) from a particular POV // draw the normals for the back side createBackSideMaps // Draw just the background geometry createOtherObjectEyeTexture // draw the caustics positions & directions info to the framebuffer DrawSceneCausticsToBuffer // Draw refractive geometry from a particular POV // store positions of final hitpoints into a secondary buffer set the eye's lookat Draw the environment map Draw the refractor Draw the non refractive objects in the scene PerformLightSpaceGather // find caustic contribution using an image-space gather using a image from the light's POV draw photons splats using point sprites } // Now we've got our caustic map. However, simply projecting this onto the // scene means any surface will get a caustic, whether shadowed (from the refractor) or not! // By copying the depth buffer from the background image we used above, // we can sort this out to only cast caustics onto the "frontmost" surface behind the refractor
  • 33. Code snippets DrawCausticsSceneWithLightSpaceGatheredPhotons { if ( needToRerenderCaustics ) RenderCaustics // create the buffers needed for refraction from the "eye's" point of view CreateRefractionBuffersForLightSpacePhotonGather // create all the necessary buffers (normal, bg geom, depth, etc) from a particular POV // Draw just the background geometry (MacBeth, Dragon, etc) DrawShadowedBackgroundWithLightSpaceCaustics DrawEnvironmentMap compute the shadow map matrix index into 'light-space caustic map' displayBackGroundGeometry // draw the normals for the back side createBackSideMaps // draw the scene, with caustics on the background geometry, refracted thru the refractor FinalDrawWithAlreadyComputedLightSpaceGather // takes the background geometry textures // (which includes one with accumulated photon contributions) set the eye's lookat //Draw the (background) non refractive objects in the scene displayLargeTextureWithDepth // Go ahead and actually draw the refractive object glCallList }
  • 34. Graphical Overview (1) Eye-space background image without refractor (2) Eye-space background surface depth map (3) Light-space background surface depth map (4) Eye-space view of refractor's backfacing surface normals (5) Eye-space view of refractor's backfacing surface depth (6) Four frame caustic map (one frame's intensity per channel) (7) Current frame's photon buffer (i.e., the photon positions) (8) Surface normal at final photon positions (light-space) (9) Light-space depth map (a.k.a. the shadow map)
  • 35.
  • 36.