mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 23:37:18 +00:00
53461d7515
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).
14 lines
227 B
GLSL
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;
|
|
}
|