idk cache I guess

This commit is contained in:
Alessandro Mauri 2023-02-21 22:05:28 +01:00
parent dcce0ed11b
commit e80d426872
No known key found for this signature in database
GPG key ID: 2B7BF9531FF03BE8
22 changed files with 198 additions and 3793 deletions

View file

@ -0,0 +1,20 @@
#version 330 core
// viewsize.x = viewport width in pixels; viewsize.y = viewport height in pixels
uniform vec2 viewsize;
// both position and and uv are in pixels
layout(location = 0) in vec2 position;
layout(location = 1) in vec2 uv;
out vec2 texture_coord;
void main()
{
vec4 pos = vec4(position.x, position.y, 0.0f, 1.0f);
vec2 v = viewsize / 2;
pos.xy = (pos.xy - v) / v;
gl_Position = pos;
texture_coord = uv / viewsize;
}