MCPcopy Index your code
hub / github.com/Nelarius/weekend-raytracer-wgpu

github.com/Nelarius/weekend-raytracer-wgpu @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
77 symbols 114 edges 6 files 0 documented · 0% updated 21mo ago★ 58
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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 * NASA's Scientific Visualization Studio * https://svs.gsfc.nasa.gov/4720

assets/earthmap.jpeg * https://raytracing.github.io/images/earthmap.jpg

assets/sun.jpeg * https://www.solarsystemscope.com/textures/

Core symbols most depended-on inside this repo

layout
called by 10
src/raytracer/gpu_buffer.rs
binding
called by 10
src/raytracer/gpu_buffer.rs
as_radians
called by 9
src/raytracer/angle.rs
as_slice
called by 6
src/raytracer/texture.rs
camera_orientation
called by 4
src/fly_camera.rs
handle
called by 4
src/raytracer/gpu_buffer.rs
clamp
called by 3
src/raytracer/angle.rs
renderer_camera
called by 2
src/fly_camera.rs

Shape

Method 41
Class 23
Function 10
Enum 3

Languages

Rust100%

Modules by API surface

src/raytracer/mod.rs36 symbols
src/raytracer/angle.rs12 symbols
src/fly_camera.rs8 symbols
src/raytracer/texture.rs7 symbols
src/raytracer/gpu_buffer.rs7 symbols
src/main.rs7 symbols

For agents

$ claude mcp add weekend-raytracer-wgpu \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page