test(webgpu): HDRBloom example exercising the HDR post-process primitives (#27)
RT→rgba16float→threshold→blur→composite, end-to-end proof of the three primitives. threshold/blur run from onBeforeUpdate (one submit each) so the storage-write→sampled-read dependency gets WebGPU's per-submit barrier (there is none between dispatches within a compute pass); the composite is a UI custom shader so it owns the canvas ping-pong. Documents the Vulkan symmetry (gap 4): the native present path records passes generically and barriers between them, so the same chain is wireable today. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
097cc37347
commit
bbe1b21c22
10 changed files with 518 additions and 0 deletions
|
|
@ -90,3 +90,19 @@ Regression test for the WebGPU software ray-query shim. Builds a
|
|||
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.
|
||||
|
||||
### [HDRBloom](HDRBloom/)
|
||||
Cross-backend-shaped HDR bloom on the WebGPU backend (issue #27). The RT
|
||||
pipeline's RESOLVE writes linear radiance into a user `rgba16float`
|
||||
texture (`StorageImage2D`, `PipelineRTWebGPU::Init(..., RGBA16Float)`),
|
||||
two `PlainComputeShader` passes threshold + blur it through float storage
|
||||
targets (`UICustomBindingKind::StorageTexture`), and a UI custom shader
|
||||
composites scene + bloom with a Reinhard tonemap onto the canvas.
|
||||
Exercises the three primitives an HDR post-process chain needs: float
|
||||
textures, write-only storage-texture bindings, and pre-tonemap radiance
|
||||
out of the wavefront. The threshold/blur passes run from `onBeforeUpdate`
|
||||
so each gets its own queue submit — the storage-write → sampled-read
|
||||
barrier WebGPU only provides between submits (or between passes), never
|
||||
within a single compute pass. WebGPU/DOM only; the same chain is wireable
|
||||
on Vulkan today via an offscreen HDR heap image + a composite `RenderPass`
|
||||
(the present path records passes generically and barriers between them).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue