Show HN: a Rust ray tracer that runs on any GPU – even in the browser
github.com·11h·
Discuss: Hacker News
Flag this post

rust-rasterizer

A rasterizer implementation in Rust

Try it online: Live WebGPU Raytracer

Features

This project includes three different raytracing implementations:

  1. CPU Raytracer - Software-based raytracing running on the CPU
  2. GPU Raytracer - Hardware-accelerated raytracing using GPU compute shaders (offline rendering)
  3. Live GPU Raytracer - Real-time interactive GPU raytracer with camera controls

Usage

CPU Raytracer (Software Rendering)

The CPU version renders scenes using traditional CPU-based raytracing and outputs to a PPM image file.

# Build and run (outputs to stdout, redirect to file)
cargo run --release > output.ppm

# Or build first, then run
cargo build --release
./target/release/rust-...

Similar Posts

Loading similar posts...