mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-11-29 01:24:11 +01:00
[hud] Pre-multiply alpha before color space conversion
Derp.
This commit is contained in:
parent
3756e83ae4
commit
757081a55a
@ -26,6 +26,6 @@ void main() {
|
||||
}
|
||||
|
||||
o_color.a *= opacity;
|
||||
o_color = linear_to_output(o_color);
|
||||
o_color.rgb *= o_color.a;
|
||||
o_color = linear_to_output(o_color);
|
||||
}
|
||||
|
@ -63,6 +63,6 @@ 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;
|
||||
o_color = linear_to_output(o_color);
|
||||
}
|
||||
|
@ -81,7 +81,8 @@ void main() {
|
||||
float diff = (diff_lo + diff_hi) + y_delta;
|
||||
o_color = mix(bg_color, line_color, clamp(diff / y_delta, 0.0f, 1.0f));
|
||||
|
||||
o_color = linear_to_output(o_color);
|
||||
o_color.a *= opacity;
|
||||
o_color.rgb *= o_color.a;
|
||||
|
||||
o_color = linear_to_output(o_color);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user