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>
12 lines
400 B
GLSL
12 lines
400 B
GLSL
#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);
|
|
}
|