Skip to content

Commit

Permalink
vec4(0.5f, 0.5f, 0.5f, 0.5f) can be shorted to vec4(0.5f).
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 3, 2008
1 parent f332e60 commit b068c79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader.c
Expand Up @@ -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

Expand Down

0 comments on commit b068c79

Please sign in to comment.