[client] egl: make nightvision enhance luminosity before gain

This commit is contained in:
Geoffrey McRae
2019-03-31 00:08:52 +11:00
parent d6805cfa0f
commit 1fbba5cf2d
4 changed files with 14 additions and 3 deletions

View File

@@ -10,6 +10,11 @@ uniform highp float nvGain;
void main()
{
color = texture(sampler1, uv);
if (nv == 1)
{
highp float lumi = 1.0 - (0.2126 * color.r + 0.7152 * color.g + 0.0722 * color.b);
color *= 1.0 + lumi;
color *= nvGain;
}
}