Show HN: a Rust ray tracer that runs on any GPU – even in the browser

Cool demo wows in Chrome, crashes for some, and gets roasted for Firefox and mobile

TLDR: A Rust ray tracer runs in the browser, impressing with real-time lighting, but commenters split: fun slider, broken mobile, crashes, and no Firefox WebGPU. Debate raged over novelty versus prior art, with a link to an older Java-to-JS demo, making this both a cool showcase and a compatibility headache.

The internet’s favorite side quest: a Rust-made ray tracer that promises to shine on any GPU, even in your browser. The live demo shows real-time lighting, camera controls, and an FPS counter. But the comment section turned it into a reality check — and a comedy roast — in minutes.

One camp clicked around and had fun. A user loved the ‘bounces’ slider that controls how many times light reflects, noting diminishing returns after three bounces. The other camp? Chaos. One person hit a cryptic crash message, another said it simply doesn’t work in Firefox because WebGPU (a new browser tech for graphics) isn’t fully supported there, and a mobile user said the page gets shoved off-screen on iPhone. Cue the memes: ray tracing turned into ‘rage tracing,’ Firefox users formed a support group, and everyone begged for a quick mobile fix.

Then came the classic Hacker News twist: is this new, or just new-to-you? A commenter linked an older Java-to-JavaScript version that’s been around for years (example), stirring the ‘cool demo vs. prior art’ debate. Verdict from the crowd: slick tech and a great flex — but polish, compatibility, and documentation will decide if it’s more than a weekend wow.

Key Points

  • Project offers three implementations: CPU, offline GPU (compute shaders), and a live real-time GPU raytracer, with an online WebGPU demo.
  • CPU and offline GPU versions render to PPM image files; the live version provides an interactive window with camera controls and mode toggles.
  • CPU raytracer supports full path tracing, direct/indirect lighting, .obj meshes, and sphere primitives.
  • GPU offline raytracer uses compute shaders for faster rendering with hardware-accelerated ray–triangle intersection and maintains scene quality.
  • Requirements include Rust (latest stable) and a GPU with compute shader support via Vulkan, Metal, or DirectX 12; a to-do list details planned features like BVH, textures, materials, shadows, UI, and documentation.

Hottest takes

"It does not run: \"unreachable executed\"" — goodpoint
"Dosent work in firefox, because of missing webgpu" — gunalx
"Written in Java then transpiled to JavaScript, been around for years" — knowhistory
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.