Path tracing is a form of ray-tracing where light rays are simulated backwards from camera till it reaches a light source. It simulates the probabilistic behaviour of light very accurately using multiple samples. Increasing number of samples will increase the accuracy of the image but will also take more time to render. Due to the probabilistic nature of a Path tracer, it is common to use a denoising filter at the end to get a smoother image.
git clone https://github.com/elbertronnie/path-tracer.git
cd path-tracer
cargo run
A cornell box will start to be rendered. This demo progressively increases the sample count to visualize the gradual formation of the image. Mouse and Keyboard can be used to naviagte the 3D space but it will restart the sample count. The performance of the renderer might be very slow on old GPUs currently since BVH optimizations have not been implemented yet.
- Antialiasing
- Defocus Blur
- Importance Sampling
- Motion Blur
- BVH Optimization
Every object comprises of a geometry and a material. The geometry is the shape of the object and is used to decide if a light ray will hit it or not. A material decides how light ray will interact with it once it hits the surface.
- Sphere
- Parallelogram
- Triangle
- Circle
- Cone
- Lambertian
- Metallic
- Dielectric
- Light