[client] egl: make use of glsl's textureSize function

This commit is contained in:
Geoffrey McRae
2021-11-12 07:41:59 +11:00
parent a21eee26ab
commit 8167ef2c4a
2 changed files with 2 additions and 9 deletions

View File

@@ -14,7 +14,6 @@ out vec4 color;
uniform sampler2D sampler1;
uniform int scaleAlgo;
uniform ivec2 textureSize;
uniform float nvGain;
uniform int cbMode;
@@ -24,7 +23,8 @@ void main()
switch (scaleAlgo)
{
case EGL_SCALE_NEAREST:
color = texelFetch(sampler1, ivec2(uv * vec2(textureSize)), 0);
vec2 ts = vec2(textureSize(sampler1, 0));
color = texelFetch(sampler1, ivec2(uv * ts), 0);
break;
case EGL_SCALE_LINEAR: