blit-screen.effect 836 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
  2. CCEffect %{
  3. techniques:
  4. - passes:
  5. - vert: vs
  6. frag: fs
  7. pass: post-process
  8. rasterizerState:
  9. cullMode: none
  10. depthStencilState:
  11. depthTest: false
  12. depthWrite: false
  13. blendState:
  14. targets:
  15. - blend: true
  16. blendSrc: one
  17. blendDst: one_minus_src_alpha
  18. blendSrcAlpha: one
  19. blendDstAlpha: zero
  20. }%
  21. CCProgram vs %{
  22. #include <./chunks/vs>
  23. }%
  24. CCProgram fs %{
  25. precision highp float;
  26. // #include <builtin/uniforms/cc-global>
  27. in vec2 v_uv;
  28. uniform UBO {
  29. vec4 inputViewPort;
  30. };
  31. #pragma rate inputTexture pass
  32. uniform sampler2D inputTexture;
  33. layout(location = 0) out vec4 fragColor;
  34. void main () {
  35. fragColor = texture(inputTexture, v_uv);
  36. }
  37. }%