From 7e7d4e4d1a412eafd164ec1357febfb6c71ff6b1 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 6 Apr 2008 09:26:27 -0400 Subject: [PATCH] Implemented POW in GLSL profile. --HG-- branch : trunk --- mojoshader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mojoshader.c b/mojoshader.c index 65bcd385..f93c4cdc 100644 --- a/mojoshader.c +++ b/mojoshader.c @@ -2336,7 +2336,10 @@ static void emit_GLSL_DCL(Context *ctx) static void emit_GLSL_POW(Context *ctx) { - fail(ctx, "unimplemented."); // !!! FIXME + const char *src0 = make_GLSL_sourcearg_string(ctx, 0); + const char *src1 = make_GLSL_sourcearg_string(ctx, 1); + const char *code = make_GLSL_destarg_assign(ctx, 0, "pow(abs(%s), %s))", src0, src1); + output_line(ctx, "%s", code); } // emit_GLSL_POW static void emit_GLSL_CRS(Context *ctx)