GPU Based Path Tracer
Introduction
As some of you might have seen I’ve been working on a Path Tracer on the GPU. Path Tracing is ray tracing like technique that is (when done right) a physically correct simulation of light. Usually it is done on the CPU but since the work can be easily parallelized and GPUs are getting more powerful, and more programmable it is now feasible to let the GPU do the bulk of the work. I didn’t use Cuda or OpenCL just plain ‘simple’ DirectX 11 with pixel shaders written in HLSL doing most of the work.
Since it is an assignment (which is due in 40 minutes) I can’t share any source code with you. But I would like to show the video and tell you where you can find the resources to build your own.
Video
(Be sure to select the 720P version, but even then the compression has a hard time with the grainyness that path tracing produces. The actually generated image are grainy but look a lot better.)
Image Gallery
References
The Direct3D 11 Reference http://msdn.microsoft.com/en-us/library/windows/desktop/ff476079(v=vs.85).aspx
- Main resource
Wolfram Math World http://mathworld.wolfram.com/SpherePointPicking.html
- Sphere Point Picking algorithm #2
GPU Gems 3 http://http.developer.nvidia.com/GPUGems3/gpugems3_ch37.html
- GPU random number generation
Colors, Effects, Code http://www.colorseffectscode.com/Projects/GPUPathTracer.html
- ‘Jitter’ idea for depth of field
The FW1 DirectX 11 Font Wrapper http://fw1.codeplex.com/
- This library is used for font rendering
Rastertek.com http://www.rastertek.com/dx11tut22.html
- Render Targets
- Best practices (I recommend the entire tutorial series)
Fundamentals of Computer Graphics, 3rd edition, Peter Shirley & Steve Marschner, 2009 http://www.amazon.com/Fundamentals-Computer-Graphics-Peter-Shirley/dp/1568814690/
- Miscellaneous math
- View/Projection/Perspective transformations
- Inverse transformations
- roytries
- roy-t
- roytri