blend-back-dpoit.frag.ts 492 B

1234567891011121314151617181920
  1. /**
  2. * Copyright (c) 2022 mol* contributors, licensed under MIT, See LICENSE file for more info.
  3. *
  4. * @author Gianluca Tomasello <giagitom@gmail.com>
  5. */
  6. export const blendBackDpoit_frag = `
  7. precision highp float;
  8. uniform sampler2D tDpoitBackColor;
  9. uniform vec2 uTexSize;
  10. void main() {
  11. vec2 coords = gl_FragCoord.xy / uTexSize;
  12. gl_FragColor = texture2D(tDpoitBackColor, coords);
  13. if (gl_FragColor.a == 0.0) {
  14. discard;
  15. }
  16. }
  17. `;