vec4(0.5f, 0.5f, 0.5f, 0.5f) can be shorted to vec4(0.5f). trunk
authorRyan C. Gordon <icculus@icculus.org>
Thu, 03 Apr 2008 09:40:43 -0400
branchtrunk
changeset 76 b0cf9ff37f05
parent 75 1bbb06b40588
child 77 03682316f488
vec4(0.5f, 0.5f, 0.5f, 0.5f) can be shorted to vec4(0.5f).
mojoshader.c
--- a/mojoshader.c	Thu Apr 03 09:37:19 2008 -0400
+++ b/mojoshader.c	Thu Apr 03 09:40:43 2008 -0400
@@ -2022,7 +2022,7 @@
 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