docs(webgpu-rt): add RTVolume example (procedural spheres + any-hit cut-out)
A 3x3x3 grid of AABB-geometry spheres rendered through an analytic ray-sphere intersection shader, with an any-hit spherical-checkerboard cut-out so the background shows through. Exercises both features end to end on the WebGPU wavefront tracer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
1628e1a58c
commit
5dd1086f08
10 changed files with 420 additions and 1 deletions
7
examples/RTVolume/miss.wgsl
Normal file
7
examples/RTVolume/miss.wgsl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// RTVolume miss (runs in SHADE). Vertical sky gradient — also what shows
|
||||
// through the any-hit cut-out cells.
|
||||
fn miss_main(ray: RayDesc, payload: ptr<function, Payload>) {
|
||||
let t = clamp(ray.direction.y * 0.5 + 0.5, 0.0, 1.0);
|
||||
rtAccumulate(mix(vec3<f32>(0.05, 0.07, 0.12),
|
||||
vec3<f32>(0.45, 0.60, 0.85), t));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue