X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=input.frag;fp=input.frag;h=4bc055e8baec0a00f2552cea2bc65bc732e04ad8;hp=0000000000000000000000000000000000000000;hb=d3cf1194740dbecde06f5e721a7e1910437a7666;hpb=f6acc0d1d488567e651220ffd327591c1443f49b diff --git a/input.frag b/input.frag new file mode 100644 index 0000000..4bc055e --- /dev/null +++ b/input.frag @@ -0,0 +1,10 @@ +uniform sampler2D PREFIX(tex); + +vec4 FUNCNAME(vec2 tc) { + // OpenGL's origin is bottom-left, but most graphics software assumes + // a top-left origin. Thus, for inputs that come from the user, + // we flip the y coordinate. + tc.y = 1.0f - tc.y; + + return texture2D(PREFIX(tex), tc); +}