A basic Raytracer with no external dependencies, implemented in C/C++ as part of my 3D graphics and computer simulations learning process. feel free to fork, comment suggestions, tips or add pull requests.
Note
This project is a work in progress.
To compile and create an .o file (Compiler)
- g++ -c Raytracer.cpp
To create a output.exe file from the .o files (Linker)
- g++ Raytracer.o Image.o (etc...) -o output
To run the output.exe file
- ./output
Prerequisites
-
Make sure "g++" and "make" are present in your enviroment variables, test with, g++ --version and make --version if missing add the following to "Path" in "User variables for YOURNAME" (VSCode MSYS2)
- Base compiler files : C:\msys64\ucrt64\bin
- CMake : C:\msys64\usr\bin
- Base compiler files : C:\msys64\ucrt64\bin
-
Install the Makefile extension by Microsoft and add the "C:\msys64\usr\bin" path to the Make Path extension settings field.
To run the make file
- make
To clear the compiled files
- make clear
To make the files and run the program
- make run
Some books and references that helped me learn the basics :
-
Raytracing Book Series by Peter Shirley, Trevor David Black, Steve Hollasch
Ray Tracing in One Weekend
Ray Tracing: The Next Week
Ray Tracing: The Rest of Your Life -
Arun Ravindran's (ArunRocks) references on raytracing and tutorials
Website -
LearningTwice's tutorials
Website