test(vulkan-rt): port RTVolume example to native Vulkan (#33)
Regression test for the procedural BLAS path: the same 3x3x3 grid of unit-box AABBs runs through a PROCEDURAL_HIT_GROUP_KHR group whose GLSL intersection shader (reportIntersectionEXT) turns each box into a radius-1 sphere, the any-hit shader punches the spherical-checkerboard cut-out (visible proof non-opaque geometry runs any-hit), and the closest-hit shades per-instance tints — the WebGPU example behavior reproduced natively. Fixed camera in raygen.glsl; the WebGPU/DOM path is unchanged. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a9e42f9c90
commit
40c4184d41
8 changed files with 357 additions and 18 deletions
12
examples/RTVolume/miss.glsl
Normal file
12
examples/RTVolume/miss.glsl
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
#version 460
|
||||
#extension GL_EXT_ray_tracing : enable
|
||||
|
||||
// RTVolume miss — vertical sky gradient, also what shows through the
|
||||
// any-hit cut-out cells. Mirrors miss.wgsl on the WebGPU path.
|
||||
|
||||
layout(location = 0) rayPayloadInEXT vec3 hitValue;
|
||||
|
||||
void main() {
|
||||
float t = clamp(gl_WorldRayDirectionEXT.y * 0.5 + 0.5, 0.0, 1.0);
|
||||
hitValue = mix(vec3(0.05, 0.07, 0.12), vec3(0.45, 0.60, 0.85), t);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue