Skip to content

Commit

Permalink
A little improvement to GLSL source argument modifiers.
Browse files Browse the repository at this point in the history
Still not done here.

--HG--
branch : trunk
  • Loading branch information
icculus committed Apr 5, 2008
1 parent a9f72f6 commit ec3e82c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions mojoshader.c
Expand Up @@ -1521,14 +1521,18 @@ static char *make_GLSL_sourcearg_string(Context *ctx, const int idx)
break;

case SRCMOD_COMPLEMENT:
premod_str = "1-";
premod_str = "(1.0f - (";
postmod_str = "))";
break;

case SRCMOD_X2NEGATE:
premod_str = "-";
// fall through.
premod_str = "-(";
postmod_str = " * 2.0f)";
break;

case SRCMOD_X2:
postmod_str = "_x2";
premod_str = "(";
postmod_str = " * 2.0f)";
break;

case SRCMOD_DZ:
Expand Down

0 comments on commit ec3e82c

Please sign in to comment.