mojoshader.c
changeset 1098 ef8be3b15633
parent 1097 cc3b4d123312
child 1099 aef946714f39
equal deleted inserted replaced
1097:cc3b4d123312 1098:ef8be3b15633
  3805 
  3805 
  3806         case SRCMOD_SIGNNEGATE:
  3806         case SRCMOD_SIGNNEGATE:
  3807             premod_str = "-";
  3807             premod_str = "-";
  3808             // fall through.
  3808             // fall through.
  3809         case SRCMOD_SIGN:
  3809         case SRCMOD_SIGN:
  3810             output_line(ctx, "SUB %s, %s, { 0.5, 0.5, 0.5, 0.5 };",
  3810             output_line(ctx,
  3811                         regtype_str, buf);
  3811                 "MAD %s, %s, { 2.0, 2.0, 2.0, 2.0 }, { -1.0, -1.0, -1.0, -1.0 };",
  3812             output_line(ctx, "MUL %s, %s, { 2.0, 2.0, 2.0, 2.0 };",
  3812                 regtype_str, buf);
  3813                         regtype_str, regtype_str);
       
  3814             break;
  3813             break;
  3815 
  3814 
  3816         case SRCMOD_COMPLEMENT:
  3815         case SRCMOD_COMPLEMENT:
  3817             output_line(ctx, "SUB %s, { 1.0, 1.0, 1.0, 1.0 }, %s;",
  3816             output_line(ctx, "SUB %s, { 1.0, 1.0, 1.0, 1.0 }, %s;",
  3818                         regtype_str, buf);
  3817                         regtype_str, buf);