From b068c7924f9e41a32b0167ceb07fe42b57f1348f Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 3 Apr 2008 09:40:43 -0400 Subject: [PATCH] vec4(0.5f, 0.5f, 0.5f, 0.5f) can be shorted to vec4(0.5f). --HG-- branch : trunk --- mojoshader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mojoshader.c b/mojoshader.c index 2a56103d..dc791f38 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -2022,7 +2022,7 @@ static void emit_GLSL_BREAKC(Context *ctx) static void emit_GLSL_MOVA(Context *ctx) { const char *src0 = make_GLSL_sourcearg_string(ctx, 0); - const char *code = make_GLSL_destarg_assign(ctx, 0, "ivec4(floor(%s + vec4(0.5f, 0.5f, 0.5f, 0.5f)))", src0); + const char *code = make_GLSL_destarg_assign(ctx, 0, "ivec4(floor(%s + vec4(0.5f)))", src0); output_line(ctx, "%s", code); } // emit_GLSL_MOVA