RTv1 is a simple CPU-based raytracer school project for Hive by ekantane and ikarjala.
Written in C on top of SDL2. Uses ikarjala's libft.
- Sphere, cylinder (infinite), cone (infinite), plane (infinite)
- Ambient light
- Multiple point lights with falloff
- Material colors
- Gloss / Specular
- Custom scene file type / parser
Note: currently only supports MacOS!
Prerequisites are clang
and make
. SDL2 is provided as a framework package within the repo.
cd
to the root of the repository and run make
. The default rules are -Wall -Wextra -Werror. For convenience there are also:
make W
for stricter rules (-Wimplicit -Wunused -Wconversion)make O
for speed optimization (-O3)make D
for a debug build
./rtv1 <scene_description_file>
Try the provided sample scenes in eval_tests/
.