dorkhub

weekend-raytracer-wgpu

A GPU raytracer inspired by the "Ray Tracing In One Weekend" series of books

Nelarius
Rust586 forksMITupdated 1 year ago
visit the demogit clone https://github.com/Nelarius/weekend-raytracer-wgpu.gitNelarius/weekend-raytracer-wgpu

README

A WebGPU implementation of Peter Shirley's ray tracing books. An interactive renderer which allows you to play around with the camera and renderer settings in real-time.

Run

$ cargo run --release

Camera and render controls

  • Translate the camera using WASD keys.
  • Pan the camera by dragging the right mouse button.
  • Adjust camera and rendering parameters using UI

Read

More details about the WebGPU implementation is available in the following series of blog posts.

Weekend raytracing with wgpu, part 2

blog post part 2

  • Adds texture support from "Ray Tracing: The Next Week" and a physically-based sky based on the Hosek-Wilkie model.
  • Describes the global texture lookup system implemented in WGSL.

Weekend raytracing with wgpu, part 1

blog post part 1

  • A straightforward fragment shader implementation of the "Ray Tracing In One Weekend" book.
  • Notes on porting RNG, recursive rendering function and more to WGSL.

Asset credits

assets/moon.jpeg

assets/earthmap.jpeg

assets/sun.jpeg

more like this

anne-key

Firmware for Anne Pro Keyboard written in Rust

Rust572

TachiSnap

TachiSnap — Pixel Snapper for animation pixel artists. Rust + WebAssembly client-side tool for cleaning up AI-generated…

HTML50

urge

The Universal Ruby Game Engine (URGE) Project

C++50

bit_gossip

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

Rust50

search

search projects, people, and tags