Simple raytracing engine in C (WIP). Based on Ray Tracing in One Weekend by Peter Shirley.
Watch image.png for a rough estimate of what the raytracer is capable of at this moment.
Build with make:
$ make
To generate the image, run the make rule "image":
$ make image
Here is what I'm planning to to next (eventually):
-
Improve vector operations: Changed pointer params to const. -
Fix the coordinate system: This was really as easy as changing v-up. -
Materials: Implemented. Lacks the shared pointer capability of the original. One material can only be used by one object. -
Const correctness: Const all the things. -
Inline utility functions: Vec3.h now just holds static inline declarations. - Command line arguments: Reading resolution and other settings from argv.
-
Read geometry from file: Implemented a rudimentary obj parser. Loading objs with tons of tris slows down renders tremendously though. - Environment maps.
- Threading: I have no experience with pthread.h so this ought to be fun.
- Textures.
- Volumes.
- Ray Tracing in One Weekend by Peter Shirley
- raytracing-weekend by Morozov-5F
- Fast, Minimum Storage Ray/Triangle Intersection by Thomas Möller and Ben Trumbore