All Projects → ali-raheem → vraytracer

ali-raheem / vraytracer

Licence: MIT license
Raytracer in a weekend course with vlang

Programming Languages

V
68 projects

vRayTracer

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.

Current output

raytrace output

Output is ppm but this is converted with imagemagick convert output.ppm output.png

Building & Running

Compile with v -o bin/raytrace -prod raytrace.v Run with ./raytrace > output.ppm

Todo

  • Code is a complete and utter mess.
    • Move Ray into module
    • Ray tracer module
  • Take scene input from file
  • Camera pos/fov
  • Focal distance

Waiting on vlang for

  • Use Interfaces once working
  • Use None instead of error once working * Ensure overloading is used everywhere once working //TODO

Complete

  • PPM output
  • Fuzz
  • Albedo
  • Reflection
  • Scattering
  • Lambertian material
  • Metal material
  • Dialectric material
  • Command line arguments to image size (thanks spytheman.)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].