[client] egl: use a sigmoid curve for nv

This commit is contained in:
Geoffrey McRae 2022-01-26 23:03:35 +11:00
parent 3c9b9e6370
commit b0568ca404

View File

@ -37,8 +37,9 @@ void main()
if (nvGain > 0.0)
{
highp float lumi = 1.0 - (0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b);
color *= 1.0 + lumi;
highp float lumi = (0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b);
if (lumi < 0.5)
color *= atanh((1.0 - lumi) * 2.0 - 1.0) + 1.0;
color *= nvGain;
}