Skip to content

Commit

Permalink
metal: return AlphaMode::Ignored when not transparent
Browse files Browse the repository at this point in the history
  • Loading branch information
kvark committed May 7, 2024
1 parent a804ef9 commit 27d34bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ bitflags = "2"
bytemuck = { version = "1", features = ["derive"] }
choir = "0.7"
egui = "0.26"
glam = { version = "0.25", features = ["mint"] }
glam = { version = "0.27", features = ["mint"] }
gltf = { version = "1.1", default-features = false }
log = "0.4"
mint = "0.5"
Expand Down
8 changes: 7 additions & 1 deletion blade-graphics/src/metal/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,13 @@ impl super::Surface {

crate::SurfaceInfo {
format,
alpha: crate::AlphaMode::PostMultiplied,
alpha: if config.transparent {
crate::AlphaMode::PostMultiplied
} else {
//Warning: it's not really ignored! Instead, it's assumed to be 1:
// https://developer.apple.com/documentation/quartzcore/calayer/1410763-isopaque
crate::AlphaMode::Ignored
},
}
}
}
Expand Down

0 comments on commit 27d34bc

Please sign in to comment.