gfx-rs/wgpu · error
Raytracing not implemented for web
Error message
Raytracing not implemented for web
What it means
Panic in the WebGPU backend bind-group creation path: a ray-tracing resource was requested, but the browser API has no ray tracing, so the corresponding arm aborts. The faulty input is a ray-tracing binding in a bind group on the web backend.
Source
Thrown at wgpu/src/backend/webgpu.rs:2332
crate::BindingResource::Sampler(sampler) => {
let sampler = &sampler.inner.as_webgpu().inner;
webgpu_sys::GpuBindGroupEntry::new(binding.binding, sampler)
}
crate::BindingResource::SamplerArray(..) => {
panic!("Web backend does not support arrays of samplers")
}
crate::BindingResource::TextureView(texture_view) => {
let texture_view = &texture_view.inner.as_webgpu().inner;
webgpu_sys::GpuBindGroupEntry::new_with_gpu_texture_view(
binding.binding,
texture_view,
)
}
crate::BindingResource::TextureViewArray(..) => {
panic!("Web backend does not support BINDING_INDEXING extension")
}
crate::BindingResource::AccelerationStructure(_) => {
unimplemented!("Raytracing not implemented for web")
}
crate::BindingResource::AccelerationStructureArray(_) => {
unimplemented!("Raytracing not implemented for web")
}
crate::BindingResource::ExternalTexture(external_texture) => {
let external_texture = &external_texture.inner.as_webgpu().inner;
webgpu_sys::GpuBindGroupEntry::new_with_gpu_external_texture(
binding.binding,
external_texture,
)
}
})
.collect::<Vec<webgpu_sys::GpuBindGroupEntry>>();
let bgl = &desc.layout.inner.as_webgpu().inner;
let mapped_desc = webgpu_sys::GpuBindGroupDescriptor::new(&mapped_entries, bgl);
if let Some(label) = desc.label {
mapped_desc.set_label(label);View on GitHub (pinned to 3e11ff59bf)
Solutions
- Remove ray-tracing bindings when running on the WebGPU backend
- Gate ray tracing code paths to native backends that support them
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at wgpu/src/backend/webgpu.rs:2332 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of gfx-rs/wgpu@3e11ff59bf (2026-09-03).
Data as JSON: /api/errors/aff3cfc4fd16328f.
Report an issue: GitHub.