laughs in french

This commit is contained in:
Alessandro Mauri 2023-02-23 23:39:34 +01:00
parent 884d5a1987
commit a697fec5d1
No known key found for this signature in database
GPG key ID: 2B7BF9531FF03BE8
6 changed files with 97 additions and 35 deletions

View file

@ -13,14 +13,14 @@ out vec2 uv;
void main()
{
// matrix to change from image coordinates to opengl coordinates
mat2 transform = mat2(vec2(0.0f, -1.0f), vec2(1.0f, 0.0f));
vec2 v = vec2(float(viewsize.x), float(viewsize.y));
vec2 h = v/2.0f;
vec2 p = ((position-h)/ h);
// vec2 p = vec2(position.x*2.0f/v.x - 1.0f, position.y*2.0f/v.y - 1.0f);
vec2 p = vec2(position.x*2.0/v.x - 1.0, 1.0 - position.y*2.0/v.y);
vec4 pos = vec4(p.x, p.y, 0.0f, 1.0f);
gl_Position = pos;
uv = vec2(txcoord.x / float(texturesize.x), (float(texturesize.y) - txcoord.y) / float(texturesize.y));
// since the texture is a GL_TEXTURE_RECTANGLE the coordintes do not need to
// be normalized
uv = vec2(txcoord.x, txcoord.y);
}