-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Description
The winit Blend::alpha_blending()
used in the glium renderer backend produces an incorrect blending function for our purposes.
Winit provides (and imgui-glium-renderer uses):
alpha: BlendingFunction::Addition {
source: LinearBlendingFactor::SourceAlpha,
destination: LinearBlendingFactor::OneMinusSourceAlpha
},
where the correct function for "overlay" alpha blending should be
alpha: BlendingFunction::Addition {
source: LinearBlendingFactor::One,
destination: LinearBlendingFactor::OneMinusSourceAlpha,
},
Screenshots:
Without the change - even though the window background is fully opaque, the drawn imgui windows overwrite the alpha with an incorrect value.
With the change, the window opacity is preserved as expected.
If this is not intentional (which i presume it isn't) and is not deemed to be a mistake in winit upstream then I will submit a PR later when I get the chance.
Metadata
Metadata
Assignees
Labels
No labels