From 53461d75156c5e2e9c2819643889e8e7ac6f364c Mon Sep 17 00:00:00 2001 From: Quantum Date: Mon, 9 Aug 2021 03:48:30 -0400 Subject: [PATCH] [client] egl: simplify desktop vertex shader In GLSL, using the / operator on two vectors of the same size divides the vector component-wise, i.e. vec2(a, b) / vec2(c, d) == vec2(a / c, b / d). --- client/renderers/EGL/shader/desktop.vert | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/client/renderers/EGL/shader/desktop.vert b/client/renderers/EGL/shader/desktop.vert index e570fd2d..5849b46f 100644 --- a/client/renderers/EGL/shader/desktop.vert +++ b/client/renderers/EGL/shader/desktop.vert @@ -8,10 +8,6 @@ uniform mat3x2 transform; void main() { - highp vec2 uvScale; - gl_Position = vec4(transform * vec3(vertex, 1.0), 0.0, 1.0); - uvScale.x = 1.0 / size.x; - uvScale.y = 1.0 / size.y; - uv = vertex * uvScale; + uv = vertex / size; }