mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-06 20:58:37 +01:00
[hud] Properly pre-multiply graphs and bars with alpha
Oversight, our blend mode relies on pre-multiplied alpha.
This commit is contained in:
parent
664783b290
commit
d9d99445bd
3 changed files with 3 additions and 0 deletions
|
@ -27,4 +27,5 @@ void main() {
|
|||
|
||||
o_color.a *= opacity;
|
||||
o_color = linear_to_output(o_color);
|
||||
o_color.rgb *= o_color.a;
|
||||
}
|
||||
|
|
|
@ -64,4 +64,5 @@ void main() {
|
|||
float blendFactor = 0.5f * float(bitsSet) / max(float(bitsTotal), 1.0f);
|
||||
o_color = vec4(mix(color.rgb, vec3(1.0f), blendFactor), color.a * opacity);
|
||||
o_color = linear_to_output(o_color);
|
||||
o_color.rgb *= o_color.a;
|
||||
}
|
||||
|
|
|
@ -83,4 +83,5 @@ void main() {
|
|||
|
||||
o_color = linear_to_output(o_color);
|
||||
o_color.a *= opacity;
|
||||
o_color.rgb *= o_color.a;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue