Skip to content

Commit

Permalink
Fix transparency blending on web
Browse files Browse the repository at this point in the history
  • Loading branch information
asny committed Feb 26, 2021
1 parent 0a52a3d commit bc2c3c3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion examples/fireworks/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn main() {
rgb_equation: BlendEquationType::Add,
alpha_equation: BlendEquationType::Add,
source_rgb_multiplier: BlendMultiplierType::SrcAlpha,
source_alpha_multiplier: BlendMultiplierType::SrcAlpha,
source_alpha_multiplier: BlendMultiplierType::Zero,
destination_rgb_multiplier: BlendMultiplierType::One,
destination_alpha_multiplier:BlendMultiplierType::One
}),
Expand Down
4 changes: 2 additions & 2 deletions src/core/render_states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ impl BlendParameters {
pub fn transparency() -> Self {
Self {
source_rgb_multiplier: BlendMultiplierType::SrcAlpha,
source_alpha_multiplier: BlendMultiplierType::One,
source_alpha_multiplier: BlendMultiplierType::Zero,
destination_rgb_multiplier: BlendMultiplierType::OneMinusSrcAlpha,
destination_alpha_multiplier: BlendMultiplierType::Zero,
destination_alpha_multiplier: BlendMultiplierType::One,
rgb_equation: BlendEquationType::Add,
alpha_equation: BlendEquationType::Add
}
Expand Down

0 comments on commit bc2c3c3

Please sign in to comment.