cover.frag 400 B

1234567891011121314151617181920
  1. #version 310 es
  2. // SPDX-License-Identifier: Unlicense OR MIT
  3. precision mediump float;
  4. {{.Header}}
  5. layout(location = 0) in highp vec2 vCoverUV;
  6. layout(location = 1) in highp vec2 vUV;
  7. layout(binding = 1) uniform sampler2D cover;
  8. layout(location = 0) out vec4 fragColor;
  9. void main() {
  10. fragColor = {{.FetchColorExpr}};
  11. float c = min(abs(texture(cover, vCoverUV).r), 1.0);
  12. fragColor *= c;
  13. }