poisson_diverg.frag 660 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright (C) 2020, Inria
  3. * GRAPHDECO research group, https://team.inria.fr/graphdeco
  4. * All rights reserved.
  5. *
  6. * This software is free for non-commercial, research and evaluation use
  7. * under the terms of the LICENSE.md file.
  8. *
  9. * For inquiries contact sibr@inria.fr and/or George.Drettakis@inria.fr
  10. */
  11. #version 420
  12. layout(binding = 0) uniform sampler2D synth;
  13. layout(location= 0) out vec4 out_constraint;
  14. void main(void) {
  15. vec4 I = texelFetch(synth, ivec2(gl_FragCoord.xy), 0);
  16. // hole - perform Poisson synthesis here
  17. if (all(lessThan(I.xyz,vec3(0.01))))
  18. out_constraint = vec4(0);
  19. else
  20. out_constraint = I;
  21. }