summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/reflex.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/reflex.c b/src/reflex.c
index cb46ff4..f426762 100644
--- a/src/reflex.c
+++ b/src/reflex.c
@@ -107,15 +107,14 @@ getReflexFragmentFunction (CompScreen * s, CompTexture * texture,
ok &= addTempHeaderOpToFunctionData (data, "image");
ok &= addTempHeaderOpToFunctionData (data, "coord");
- ok &= addTempHeaderOpToFunctionData (data, "div");
ok &= addTempHeaderOpToFunctionData (data, "mask");
ok &= addFetchOpToFunctionData (data, "output", NULL, target);
ok &= addColorOpToFunctionData (data, "output", "output");
snprintf (str, 1024,
- "MUL coord, fragment.position, program.env[%d];"
- "ADD coord, coord, program.env[%d];", param, param + 1);
+ "MAD coord, fragment.position, program.env[%d],"
+ " program.env[%d];", param, param + 1);
ok &= addDataOpToFunctionData (data, str);
snprintf (str, 1024,
@@ -124,10 +123,8 @@ getReflexFragmentFunction (CompScreen * s, CompTexture * texture,
snprintf (str, 1024,
"MUL_SAT mask, output.a, program.env[%d].r;"
- "SUB div.a, 1.0, output.a;"
- "MUL image, image, div.a;"
- "MUL image, image, mask.a;"
- "ADD output, output, image;", param + 2);
+ "MAD image, -output.a, image, image;"
+ "MAD output, image, mask.a, output;", param + 2);
ok &= addDataOpToFunctionData (data, str);
if (!ok)