From 705250f23db465e12a859010e4d7f423e73eedec Mon Sep 17 00:00:00 2001 From: Quantum Date: Mon, 9 Aug 2021 16:04:57 -0400 Subject: [PATCH] [client] egl: correct assign to gl_Position in basic.vert gl_Position is expected to be using homogeneous coordinates, which requires w to be a coordinate scale factor, usually 1.0. z should also be set in order for depth to be well-defined. Therefore, we should set gl_Position.zw to vec2(0.0, 1.0). --- client/renderers/EGL/shader/basic.vert | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/renderers/EGL/shader/basic.vert b/client/renderers/EGL/shader/basic.vert index d7bca668..cffa56ca 100644 --- a/client/renderers/EGL/shader/basic.vert +++ b/client/renderers/EGL/shader/basic.vert @@ -9,6 +9,6 @@ out vec2 iFragCoord; void main() { - gl_Position.xy = uVertex; - iFragCoord = uUV; + gl_Position = vec4(uVertex, 0.0, 1.0); + iFragCoord = uUV; }