1
0
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:
Philip Rebohle 2024-11-11 11:59:26 +01:00
parent 664783b290
commit d9d99445bd
3 changed files with 3 additions and 0 deletions

View File

@ -27,4 +27,5 @@ void main() {
o_color.a *= opacity;
o_color = linear_to_output(o_color);
o_color.rgb *= o_color.a;
}

View File

@ -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;
}

View File

@ -83,4 +83,5 @@ void main() {
o_color = linear_to_output(o_color);
o_color.a *= opacity;
o_color.rgb *= o_color.a;
}