From 810c038a2dc99134617ca10e8b5ffcade2f64808 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 14 Aug 2019 09:33:57 -0400 Subject: [PATCH] Remove the floor from vpos calculation --- profiles/mojoshader_profile_glsl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/profiles/mojoshader_profile_glsl.c b/profiles/mojoshader_profile_glsl.c index e20c1be8..d473f7b4 100644 --- a/profiles/mojoshader_profile_glsl.c +++ b/profiles/mojoshader_profile_glsl.c @@ -1037,9 +1037,10 @@ void emit_GLSL_attribute(Context *ctx, RegisterType regtype, int regnum, } // 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