hcut.swsl 298 B

12345678910111213
  1. light_mode unshaded;
  2. const highp float c = 0.3;
  3. const highp float alphaModifier = 0.2;
  4. const bool below = true;
  5. void fragment()
  6. {
  7. highp vec4 tex = zTexture(UV);
  8. highp float modifier = (UV.y > c ^^ !below) ? 1.0 : alphaModifier;
  9. COLOR = vec4(tex.x, tex.y, tex.z, tex.w * modifier);
  10. }