Skip to content
Permalink
Browse files
Apparently LRP maps perfectly to GLSL's built-in mix() function.
--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 18, 2008
1 parent de1d07f commit a7867de9c3f0fd8408bc3d69a94ebe8ed72e2e78
Showing with 1 addition and 1 deletion.
  1. +1 −1 mojoshader.c
@@ -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

0 comments on commit a7867de

Please sign in to comment.