Changed the brightness shaders from exposure to actual brightness calculations.

This commit is contained in:
Leon Styhre 2022-12-14 23:09:17 +01:00
parent 2e425b62af
commit f195ba72a2
2 changed files with 8 additions and 4 deletions

View file

@ -72,8 +72,10 @@ void main()
vec4 sampledColor = texture(textureSampler, texCoord);
// Brightness.
if (brightness != 0.0)
sampledColor.rgb = sampledColor.rgb * pow(2.0, brightness);
if (brightness != 0.0) {
sampledColor.rgb += 0.3 * brightness;
sampledColor.rgb *= sampledColor.a;
}
// Saturation.
if (saturation != 1.0) {

View file

@ -157,8 +157,10 @@ void main()
vec4 colorTemp = clamp(GAMMA_OUT(color), 0.0, 1.0);
// Brightness.
if (brightness != 0.0)
colorTemp.rgb = colorTemp.rgb * pow(2.0, brightness);
if (brightness != 0.0) {
colorTemp.rgb += 0.3 * brightness;
colorTemp.rgb *= colorTemp.a;
}
// Saturation.
if (saturation != 1.0) {