{"by":"tchauffi","descendants":29,"id":45798871,"kids":[45800521,45802145,45801348,45800520,45806921,45800046,45800162,45800436,45801434,45800354],"score":95,"text":"I’ve been experimenting with Rust lately and wanted a project that would help me explore some of its lower-level and performance-oriented features. Inspired by Sebastian Lague’s videos, I decided to implement my own ray tracer from scratch.<p>The initial goal was just to render a simple 3D scene in the browser at a reasonable frame rate. It evolved into a small renderer that can:\n • Run locally or on the web using wgpu and WebAssembly\n • Perform mesh rendering with a Bounding Volume Hierarchy (BVH) for acceleration\n • Simulate both direct and indirect illumination for photorealistic results\n • Be deployed easily as a free web demo using GitHub Pages<p>The project is far from perfect, but it’s been a fun way to dig deeper into graphics programming and learn more about Rust’s ecosystem. I’m also planning to experiment with Rust for some ML projects next.<p>GitHub: <a href=\"https:&#x2F;&#x2F;github.com&#x2F;tchauffi&#x2F;rust-rasterizer\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;tchauffi&#x2F;rust-rasterizer</a> \nWeb demo (desktop browsers): <a href=\"https:&#x2F;&#x2F;tchauffi.github.io&#x2F;rust-rasterizer&#x2F;\" rel=\"nofollow\">https:&#x2F;&#x2F;tchauffi.github.io&#x2F;rust-rasterizer&#x2F;</a><p>Would love feedback from anyone who’s built similar projects or has experience with wgpu or ray tracing in Rust.","time":1762177515,"title":"Show HN: a Rust ray tracer that runs on any GPU – even in the browser","type":"story","url":"https://github.com/tchauffi/rust-rasterizer"}