mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 07:17:23 +00:00
[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).
This commit is contained in:
parent
9b87f4ba5e
commit
53461d7515
@ -8,10 +8,6 @@ uniform mat3x2 transform;
|
|||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
highp vec2 uvScale;
|
|
||||||
|
|
||||||
gl_Position = vec4(transform * vec3(vertex, 1.0), 0.0, 1.0);
|
gl_Position = vec4(transform * vec3(vertex, 1.0), 0.0, 1.0);
|
||||||
uvScale.x = 1.0 / size.x;
|
uv = vertex / size;
|
||||||
uvScale.y = 1.0 / size.y;
|
|
||||||
uv = vertex * uvScale;
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user