diff --git a/wgpu/src/backend/webgpu.rs b/wgpu/src/backend/webgpu.rs index 83355fe89..a9ec15b9a 100644 --- a/wgpu/src/backend/webgpu.rs +++ b/wgpu/src/backend/webgpu.rs @@ -4410,7 +4410,11 @@ impl dispatch::SurfaceInterface for WebSurface { formats, // Doesn't really have meaning on the web. present_modes: vec![wgt::PresentMode::Fifo], - alpha_modes: vec![wgt::CompositeAlphaMode::Opaque], + // https://gpuweb.github.io/gpuweb/#gpucanvasalphamode + alpha_modes: vec![ + wgt::CompositeAlphaMode::Opaque, + wgt::CompositeAlphaMode::PreMultiplied, + ], // Statically set to RENDER_ATTACHMENT for now. See https://gpuweb.github.io/gpuweb/#dom-gpucanvasconfiguration-usage usages: wgt::TextureUsages::RENDER_ATTACHMENT, }