mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 01:24:11 +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
@ -27,4 +27,5 @@ void main() {
|
|||||||
|
|
||||||
o_color.a *= opacity;
|
o_color.a *= opacity;
|
||||||
o_color = linear_to_output(o_color);
|
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);
|
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 = vec4(mix(color.rgb, vec3(1.0f), blendFactor), color.a * opacity);
|
||||||
o_color = linear_to_output(o_color);
|
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 = linear_to_output(o_color);
|
||||||
o_color.a *= opacity;
|
o_color.a *= opacity;
|
||||||
|
o_color.rgb *= o_color.a;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user