test(webgpu-rt): RayQueryPick example exercising the rayQuery TLAS shim (#25)
Adds an 8^3 = 512-instance TLAS pick test that shoots one analytically determined ray through a rayQuery=true PlainComputeShader and checks the read-back committed hit (customIndex 484, t 40.75). 512 instances sit in the < 8193 regime that the hardcoded 16384-leaf start used to miss, so the example fails fast if the shim regresses. Verified in Firefox/WebGPU: "[RayQueryPick] PASS". Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
8f6a52a460
commit
b645746c8c
9 changed files with 471 additions and 0 deletions
7
examples/RayQueryPick/resolve.wgsl
Normal file
7
examples/RayQueryPick/resolve.wgsl
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
// RTStress RESOLVE-stage tonemap: Reinhard + gamma 2.2 over the linear
|
||||
// accumulator. Registered as a WebGPURTStage::Resolve shader.
|
||||
fn resolve_main(coord: vec2<u32>, hdr: vec4<f32>) -> vec4<f32> {
|
||||
let mapped = hdr.rgb / (hdr.rgb + vec3<f32>(1.0));
|
||||
let g = pow(mapped, vec3<f32>(1.0 / 2.2));
|
||||
return vec4<f32>(g, 1.0);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue