Skip to content

Latest commit

 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

Render

Ray Tracer

Path tracer in C++ following Peter Shirley's "Ray Tracing in One Weekend" series. This was a learning exercise. As it is the age of AI, I feel I am obligated to write let you know that this project was written by hand! Note that some of the boiler plate code was taken from the book I followed along from.

  • Indirect lighting (objects illuminate each other)
  • Anti-aliasing via random sampling
  • Materials: lambertian diffuse, metals, glass/dielectrics
  • Adjustable camera position and focus depth

Images are created by each pixel firing multiple rays with slight random offsets for anti-aliasing. Rays bounce around the scene accumulating color until they hit a light source or max out on bounces.

Dielectrics (glass) were the trickiest - had to implement Schlick's approximation for reflectance at grazing angles, otherwise glass looked wrong at the edges.

Renders to PPM format. The image above took about 2 minutes at 1200x800 with 500 samples per pixel.

https://github.com/RayTracing/raytracing.github.io/

About

C++ Ray-tracing engine

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages