Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ali-raheem/vraytracer
Raytracer in a weekend course with vlang
https://github.com/ali-raheem/vraytracer
Last synced: 15 days ago
JSON representation
Raytracer in a weekend course with vlang
- Host: GitHub
- URL: https://github.com/ali-raheem/vraytracer
- Owner: ali-raheem
- License: mit
- Created: 2019-07-23T19:57:57.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-06-28T15:43:08.000Z (over 4 years ago)
- Last Synced: 2024-10-04T21:53:32.842Z (about 1 month ago)
- Language: V
- Size: 3.45 MB
- Stars: 48
- Watchers: 3
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-v - vRayTracer - A simple ray tracer written in V. (Applications / Graphics)
README
# vRayTracer
Simple raytracer in [vlang](https://vlang.io), learning the language as I go along so plenty of poor design choices, some for educational purposes. Based on [Ray Tracing in One Weekend](https://github.com/RayTracing/raytracinginoneweekend).
See f64 branch for more precise but slower implementation using 64 bit floats instead of 32bit.
### Current output
![raytrace output](output.png)
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](https://github.com/spytheman).)