Remove the floor from vpos calculation
authorEthan Lee <flibitijibibo@flibitijibibo.com>
Wed, 14 Aug 2019 09:33:57 -0400
changeset 1211 74c594099cba
parent 1210 c586d4590241
child 1212 124155bb9bed
Remove the floor from vpos calculation
profiles/mojoshader_profile_glsl.c
--- a/profiles/mojoshader_profile_glsl.c	Thu Jul 25 15:20:34 2019 -0400
+++ b/profiles/mojoshader_profile_glsl.c	Wed Aug 14 09:33:57 2019 -0400
@@ -1037,9 +1037,10 @@
             } // if
             else if (mt == MISCTYPE_TYPE_POSITION)
             {
+                // TODO: For half-pixel offset compensation, floor() this value!
                 push_output(ctx, &ctx->globals);
                 output_line(ctx, "uniform vec2 vposFlip;");
-                output_line(ctx, "vec4 %s = floor(vec4(gl_FragCoord.x, (gl_FragCoord.y * vposFlip.x) + vposFlip.y, gl_FragCoord.z, gl_FragCoord.w));", var);
+                output_line(ctx, "vec4 %s = vec4(gl_FragCoord.x, (gl_FragCoord.y * vposFlip.x) + vposFlip.y, gl_FragCoord.z, gl_FragCoord.w);", var);
                 pop_output(ctx);
                 return;
             } // else if