LookingGlass/client/renderers/EGL/shader/desktop.vert
Quantum 53461d7515 [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).
2021-08-09 17:51:13 +10:00

14 lines
227 B
GLSL

#version 300 es
layout(location = 0) in vec2 vertex;
out highp vec2 uv;
uniform highp vec2 size;
uniform mat3x2 transform;
void main()
{
gl_Position = vec4(transform * vec3(vertex, 1.0), 0.0, 1.0);
uv = vertex / size;
}