Merge pull request #2341 from Koranir/premultiply

Allow using the premultiplied alpha wgpu compositor mode
This commit is contained in:
Héctor Ramón 2024-03-20 16:58:19 +01:00 committed by GitHub
commit 01f38f05a2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -92,6 +92,10 @@ impl Compositor {
.contains(&wgpu::CompositeAlphaMode::PostMultiplied)
{
wgpu::CompositeAlphaMode::PostMultiplied
} else if alpha_modes
.contains(&wgpu::CompositeAlphaMode::PreMultiplied)
{
wgpu::CompositeAlphaMode::PreMultiplied
} else {
wgpu::CompositeAlphaMode::Auto
};