A simple C++ ray tracer built with CMake and Visual Studio.
Render output generated by the ray tracer:
- CMake (v3.10 or later)
- Visual Studio 17 2022
Run the provided batch script to build and execute the ray tracer:
build.bat
During execution, you will be prompted to enter a filename. This will save the output as a PPM file inside the output/
directory.
Alternatively, if you want to build and run manually:
mkdir build
cd build
cmake .. -G "Visual Studio 17 2022"
cmake --build . --config Release
cd ..
bin\raytracing.exe > output/render.ppm
RayTracing/
├── bin/ # Compiled executable
├── output/ # Rendered images (PPM format)
├── build/ # CMake build files
├── include/ # Header files
├── src/ # Source code
│ └── raytracer.cpp # Raytracing Code
├── main.cpp # Main entry point
├── CMakeLists.txt # CMake build script
├── build.bat # Windows build script
└── README.md # This file