fix(renderer): fix RT shadow shader syntax, experimental features, and R32Float sampler compatibility

- Add 'enable wgpu_ray_query' to RT shadow shader
- Fix RayDesc struct constructor syntax and rayQueryGetCommittedIntersection API
- Enable ExperimentalFeatures in GpuContext for RT
- Change RT shadow texture binding to non-filterable (R32Float)
- Use textureLoad instead of textureSample for RT shadow in lighting pass

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 14:06:20 +09:00
parent b8334ea361
commit cddf9540dd
5 changed files with 41 additions and 32 deletions

View File

@@ -267,7 +267,9 @@ fn fs_main(in: VertexOutput) -> @location(0) vec4<f32> {
let F0 = mix(vec3<f32>(0.04, 0.04, 0.04), albedo, metallic);
// Shadow: sample RT shadow texture (1.0 = lit, 0.0 = shadowed)
let shadow_factor = textureSample(t_rt_shadow, s_rt_shadow, uv).r;
let rt_dims = textureDimensions(t_rt_shadow);
let rt_coord = vec2<i32>(vec2<f32>(uv.x * f32(rt_dims.x), uv.y * f32(rt_dims.y)));
let shadow_factor = textureLoad(t_rt_shadow, rt_coord, 0).r;
// Accumulate contribution from all active lights
var Lo = vec3<f32>(0.0);