glsl: Implemented SRCMOD_BIAS and SRCMOD_BIASNEGATE.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 17 Apr 2012 03:08:51 -0400
changeset 1094 c2009ce6278d
parent 1093 81cf6fbca68d
child 1095 bc3d2c6e06cf
glsl: Implemented SRCMOD_BIAS and SRCMOD_BIASNEGATE.
mojoshader.c
--- a/mojoshader.c	Tue Apr 17 02:51:58 2012 -0400
+++ b/mojoshader.c	Tue Apr 17 03:08:51 2012 -0400
@@ -1945,11 +1945,13 @@
             break;
 
         case SRCMOD_BIASNEGATE:
-            premod_str = "-";
-            // fall through.
+            premod_str = "-(";
+            postmod_str = " - 0.5)";
+            break;
+
         case SRCMOD_BIAS:
-            fail(ctx, "SRCMOD_BIAS unsupported"); return buf; // !!! FIXME
-            postmod_str = "_bias";
+            premod_str = "(";
+            postmod_str = " - 0.5)";
             break;
 
         case SRCMOD_SIGNNEGATE: