This repository is a learning project: a software (CPU) ray tracer built by following and adapting ideas from tinyraytracer. It’s not meant to be a polished library or “product”—it’s a sandbox for understanding how ray tracing works end-to-end (rays, intersections, shading, reflections, etc.) by implementing it yourself.
If you’re looking for a clean, reusable renderer API, you probably want the original tinyraytracer (or a more complete renderer). If you want something that’s easy to modify while you learn, this repo is the point.
This is:
- A personal learning/experimentation ray tracer
- Code-first scene setup (edit source, recompile, render)
- A place to try out features incrementally (materials, lights, recursion depth, etc.)
This is not:
- A stable rendering engine
- A maintained package with a public API
- A benchmark-optimized implementation
This project is based on the approach and concepts from:
- tinyraytracer by Dmitry Sokolov: https://github.com/ssloy/tinyraytracer
Any mistakes, deviations, or half-finished experiments are mine.
There isn’t a “proper” runtime interface. The intended workflow is:
- Open the renderer source file (the one that contains
main) in the renderer directory. - Edit the
mainfunction to change:- scene objects and materials
- light positions/colors/intensity (if applicable)
- camera position / look-at / FOV
- resolution and render quality settings
- output filename
- Rebuild and run to produce a new render.
In other words: to use it, you modify main directly.
Depending on what you’ve implemented so far, you’ll usually find settings for:
- Image
- width / height
- samples per pixel (if you added sampling)
- max recursion depth / bounces
- Camera
- position (eye)
- target (look-at)
- FOV
- Scene
- primitives (often spheres in tinyraytracer-style setups)
- materials (diffuse / reflective / refractive)
- light sources
- Output
- file path + format (often
.ppminitially)
- file path + format (often