advanced real-time post-processing using gpgpu techniques
DESCRIPTION
Master thesis about GPGPU post-processing by Per Lönroth and Mattias Unger from Linköping University, Department of Science and Technology.TRANSCRIPT
![Page 1: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/1.jpg)
Advanced Real-time Post-Processing using GPGPU techniques
![Page 2: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/2.jpg)
Presentation overview
∙ Problem description and objectives∙ Depth of field∙ Methods∙ GPGPU programming∙ Results∙ Conclusion∙ Questions
![Page 3: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/3.jpg)
Problem description and objectives
∙ Post processing filters∙ Different depth of field algorithms∙ Visual quality
∙ Implement using HLSL and CUDA∙ Performance∙ Usability
![Page 4: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/4.jpg)
Depth of field
∙ Depth cue∙ Focus plane
∙ Focus in area in front of and beyond∙ Different blurriness
![Page 5: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/5.jpg)
Depth of field
∙ Thin lens camera model∙ Circle of confusion
![Page 6: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/6.jpg)
Depth of field
∙ Calculate Circle of confusion∙ Depth value and lins parameters
Depth map COC map
![Page 7: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/7.jpg)
Methods
∙ Poisson disc blur∙ Multi-passed diffusion∙ Separable diffusion∙ Summed-area table
![Page 8: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/8.jpg)
Methods – Poisson disc blur
∙ Distribution function∙ COC defines scale∙ Downscaled image
![Page 9: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/9.jpg)
Methods – Poisson disc blur
∙ Calculate values and interpolate depending on COC
![Page 10: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/10.jpg)
Methods – Multi-passed diffusion
∙ Every pixel gets new value depending on the COC gradient
Iterations
![Page 11: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/11.jpg)
Methods – Separable diffusion
∙ Use a tridiagonal system to represent the heat conductivity
∙ Cyclic reduction can solve the matrices for each row
![Page 12: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/12.jpg)
Methods – Separable diffusion
∙ Each row is solved independently
∙ In each step a reduced tridiagonal matrix is calculated (and output value) until the system is solved
![Page 13: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/13.jpg)
GPGPU programming
∙ General∙ Better flexibility∙ Potential advantages
∙ CUDA∙ Extension of C∙ Large community
![Page 14: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/14.jpg)
GPGPU programming
∙ Executes in chunks of threads∙ User specified blocks
∙ Several memory types∙ Global∙ Texture∙ Shared∙ Constant
∙ More choices and possibilities∙ Hardware specific limits∙ Great potential
![Page 15: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/15.jpg)
GPGPU programming
∙ Gaussian blur timings
![Page 16: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/16.jpg)
GPGPU programming
∙ Implementation impact using CUDA∙ +
∙ Easy to get started (C)∙ Memory indexing (no more floating point texture indices)∙ Good support for timing on the GPU∙ Good control over computations (threads and memory)
∙ -∙ A lot of ”rules” (amount of threads, occupancy, etc)∙ Hard to optimize∙ Beta problems (lack of interop, slow operations)
![Page 17: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/17.jpg)
Results
∙ HLSL and CUDA for most methods∙ Exceptions
∙ Poisson disc (HLSL only)∙ Summed Area-Table (CUDA only)
∙ Timings in runs of 100 on recent hardware
![Page 18: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/18.jpg)
Results∙ Poisson disc timings
∙ Separable simluated diffusion timings
∙ Multi-passed diffusion timings
![Page 19: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/19.jpg)
Results
∙ Artifacts∙ Color leaking∙ Sharp edges
![Page 20: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/20.jpg)
Results
∙ Input data
![Page 21: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/21.jpg)
Results
∙ Poisson disc∙ Multi-passed diffusion ∙ Separable simulated diffusion
![Page 22: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/22.jpg)
∙ Poisson disc
Results
∙ Multi-passed diffusion∙ Separable simulated diffusion
![Page 23: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/23.jpg)
∙ Lens parameter settings
Results
![Page 24: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/24.jpg)
Conclusions
∙ Current depth of field filters are good enough∙ Not really, but better is too expensive∙ Cut scenes do get time for more computations
∙ GPGPU techniques have great potential∙ Not mature enough (hardware support etc.)∙ Maybe better for other things than image processing
∙ Future work∙ Diffusion based approach offers best visual quality∙ Compute shaders anyone?
![Page 25: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/25.jpg)
Videos
![Page 26: Advanced Real-time Post-Processing using GPGPU techniques](https://reader035.vdocument.in/reader035/viewer/2022081401/5589cf10d8b42a62578b45ad/html5/thumbnails/26.jpg)
End