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:
catbot 2026-06-04 13:33:04 +00:00
commit b645746c8c
9 changed files with 471 additions and 0 deletions

View file

@ -82,3 +82,11 @@ shader couldn't express. Shows:
inserted automatically, so the custom shader sees the colored stripes
drawn by the prior `DispatchQuads` and reads/writes the swapchain
image safely.
### [RayQueryPick](RayQueryPick/)
Regression test for the WebGPU software ray-query shim. Builds a
512-instance TLAS and shoots one ray through a `rayQuery=true`
`PlainComputeShader`, reading the committed hit back to the host and
checking it against the analytically-known answer. Guards against the
hardcoded-leaf-start TLAS-traversal bug (issue #25) that made every
rayQuery pick miss for realistic instance counts. WebGPU/DOM only.