fix(webgpu): add PreMultiplied to alpha_modes (#10507)

This commit is contained in:
elbaro authored and GitHub committed 2026-09-30 15:26:59 +00:00
1 parent fe27fd1eb9
commit 40f4aac8ab
1 file changed
+5 -1
+5 -1
View File
@@ -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,
}