stencil_mask.swsl 235 B

12345678
  1. void fragment() {
  2. // Bypasses zTexture because only alpha is queried.
  3. if (texture2D(TEXTURE, UV).a == 0.0) {
  4. discard; // Discard if no alpha so that there's a hole in the stencil buffer.
  5. }
  6. COLOR = vec4(0.0);
  7. }