prosperon/source/shaders/gridvert.glsl

23 lines
360 B
Plaintext
Raw Normal View History

2022-06-21 23:16:14 -05:00
#version 330
layout (location = 0) in vec2 pos;
2023-05-12 13:22:05 -05:00
out vec2 apos;
2023-02-13 08:30:35 -06:00
2022-06-21 23:16:14 -05:00
layout (std140) uniform Projection {
mat4 projection;
};
2023-05-12 13:22:05 -05:00
uniform vec2 offset;
uniform vec2 dimen;
2023-05-12 13:22:05 -05:00
2022-06-21 23:16:14 -05:00
void main()
{
2023-05-12 13:22:05 -05:00
// vec4 ipos = inverse(projection) * vec4(pos, 0.f, 1.f);
apos = pos * dimen;
// apos += offset;
2023-05-12 13:22:05 -05:00
// apos = pos + offset;
2022-06-21 23:16:14 -05:00
gl_Position = vec4(pos, 0.f, 1.f);
2023-02-13 08:30:35 -06:00
}