Raytracing in One Weekend (Rust Implementation)
- 2 Devlogs
- 10 Total hours
A Rust implementation of the programme outlined in "Raytracing in One Weekend". An attempt to teach myself Rust.
A Rust implementation of the programme outlined in "Raytracing in One Weekend". An attempt to teach myself Rust.
Added different materials: Lambertian (matte), Metal (reflective) and Dielectric (transparent). The sphere on the left is transparent, and is hollow sphere, the middle is matte, and the right sphere is a metal with a relatively high fuzziness. Dielectric materials reflect and refract taking total internal reflection into account using Snell’s law.
Diffuse lighting sort of works - it’s very grainy on lower numbers of rays though, and very slow - although I suppose that’s a byproduct of CPU tracing. The demo should work on all platforms, however I have only tested the Linux and Windows (via wine) binaries. The image below is 1920x1080 and uses 100 samples per pixel, but it took quite a while to generate!