Skip to content

Suvansarkar/raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer

Trying to learn ray tracing in one weekend.

Build and run project

I hope you know how to do the obvious -

$ git clone https://github.com/Suvansarkar/raytracer
$ cd raytracer

Next generate make files using cmake

$ mkdir build
$ cmake -B build

Now build the project

$ cmake --build build

Run the project

$ ./build/raytracer > output.ppm

Note: This ray tracer only outputs to ppm format. You can use convert command to convert it to other formats.

$ convert output.ppm output.png

Sample images

first render metal example

Creating your own scenes

Add your own shapes to the main.cc file along with their materials. More shapes and materials are to be added later.

TODO

  • Add a plane shape
  • Add a cube shape
  • Add dielectric materials (glass, water, etc)
  • Add light sources using Phong Lighting model

Resources / References

Ray Tracing

Lighting

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published