laughs in french
This commit is contained in:
parent
884d5a1987
commit
a697fec5d1
6 changed files with 97 additions and 35 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue