Skip to content

Commit

Permalink
Merge pull request #2341 from Koranir/premultiply
Browse files Browse the repository at this point in the history
Allow using the premultiplied alpha wgpu compositor mode
  • Loading branch information
hecrj authored Mar 20, 2024
2 parents a1d3b52 + a613079 commit 01f38f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions wgpu/src/window/compositor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down

0 comments on commit 01f38f0

Please sign in to comment.