Skip to content

Commit

Permalink
Apparently LRP maps perfectly to GLSL's built-in mix() function.
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 18, 2008
1 parent de1d07f commit a7867de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mojoshader.c
Expand Up @@ -2199,7 +2199,7 @@ static void emit_GLSL_LRP(Context *ctx)
const char *src0 = make_GLSL_sourcearg_string(ctx, 0);
const char *src1 = make_GLSL_sourcearg_string(ctx, 1);
const char *src2 = make_GLSL_sourcearg_string(ctx, 2);
const char *code = make_GLSL_destarg_assign(ctx, 0, "(%s * (%s - %s)) + %s", src0, src1, src2, src2);
const char *code = make_GLSL_destarg_assign(ctx, 0, "mix(%s, %s, %s)", src2, src1, src0);
output_line(ctx, "%s", code);
} // emit_GLSL_LRP

Expand Down

0 comments on commit a7867de

Please sign in to comment.