Fixed a premultiplied alpha shader issue that lead to artifacting when brightness was adjusted.

This commit is contained in:
Leon Styhre 2022-12-15 19:13:37 +01:00
parent dcc99cf352
commit c63fd2e72b
2 changed files with 2 additions and 0 deletions

View file

@ -73,6 +73,7 @@ void main()
// Brightness.
if (brightness != 0.0) {
sampledColor.rgb /= sampledColor.a;
sampledColor.rgb += 0.3 * brightness;
sampledColor.rgb *= sampledColor.a;
}

View file

@ -158,6 +158,7 @@ void main()
// Brightness.
if (brightness != 0.0) {
colorTemp.rgb /= colorTemp.a;
colorTemp.rgb += 0.3 * brightness;
colorTemp.rgb *= colorTemp.a;
}