PAJAMA / RELIGHT

REAL RUST / WGPU / WGSL

One object. A different light.

Read the lessons →

A synthetic material study made of 1,536 Gaussian surfels. Move the light and inspect what the shader computes. Camera, light and object time are independent.

Starting WebGPU…

Drag horizontally to orbit, or focus the canvas and use ← / →. Home resets the camera. The light remains fixed in world space.

The exact rendering path

Deform + sort→GGX→Gaussian α → RGBA16Float→Reinhard → sRGB

Direct lighting only. No cast shadows, environment map or inverse training. The object is an analytic known-material surface; these are not estimated parameters of the STG research scene. Five modes inspect separate terms, not five independently trained models.

Run the same pass locally and inspect the code
cargo run --example relight_pixels
npm run build:wasm
npm run build:math
npx wrangler dev --config wrangler.jsonc

The first command writes 13 PNGs and an assertion report to artifacts/relight/. It uses the same RelightPass without a window. The remaining commands build and serve the browser host.

src/relight.rs

src/relight.wgsl

src/workshop_surface.rs

src/workshop_web.rs

examples/relight_pixels.rs

public/relight/lab.mjs