Simple raytracer in vlang, learning the language as I go along so plenty of poor design choices, some for educational purposes. Based on Ray Tracing in One Weekend.
See f64 branch for more precise but slower implementation using 64 bit floats instead of 32bit.
Output is ppm but this is converted with imagemagick convert output.ppm output.png
Compile with v -o bin/raytrace -prod raytrace.v
Run with ./raytrace > output.ppm
- Code is a complete and utter mess.
- Move Ray into module
- Ray tracer module
- Take scene input from file
- Camera pos/fov
- Focal distance
- Use Interfaces once working
- Use None instead of error once working
* Ensure overloading is used everywhere once working //TODO
- PPM output
- Fuzz
- Albedo
- Reflection
- Scattering
- Lambertian material
- Metal material
- Dialectric material
- Command line arguments to image size (thanks spytheman.)