Ray Tracer

Developed a CPU-based ray tracer from scratch, implementing core rendering techniques including ray-sphere intersections, soft shadows, indirect lighting, and anti-aliasing to produce physically inspired images.

Key Features

  • Ray-sphere intersection and recursive ray casting.
  • Soft shadows using stochastic area light sampling.
  • Indirect (global) illumination through Monte Carlo sampling.
  • Super-sampling anti-aliasing for smoother image quality.
  • Multithreaded rendering for improved CPU performance.

Technical Highlights

  • Implemented ray-object intersection using vector mathematics and geometric ray tracing.
  • Generated realistic soft shadows by casting multiple shadow rays towards random points on an area light and averaging the results.
  • Approximated global illumination by sampling random bounce rays and accumulating indirect light contributions.
  • Parallelised the rendering pipeline across multiple CPU threads and evaluated the performance impact of varying sample counts for anti-aliasing, soft shadows, and indirect lighting.

Reflection
The project demonstrates a strong understanding of ray tracing fundamentals, lighting algorithms, and performance optimisation. Future work would involve porting the renderer to GPU compute shaders for real-time rendering, alongside supporting additional material models such as reflections, refractions, and physically based shading.