Final.frag.glsl 706 B

1234567891011121314151617181920212223242526272829
  1. // Copyright (C) 2009-2016, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. // The final pass
  6. #pragma anki type frag
  7. #pragma anki include "shaders/Common.glsl"
  8. #pragma anki include "shaders/Pack.glsl"
  9. layout(binding = 0) uniform sampler2D u_tex;
  10. layout(location = 0) in highp vec2 in_texCoord;
  11. layout(location = 0) out vec3 out_color;
  12. void main()
  13. {
  14. vec3 col = textureLod(u_tex, in_texCoord, 0.0).rgb;
  15. /*vec2 depth = textureRt(u_tex, in_texCoord).rg;
  16. float zNear = 0.2;
  17. float zFar = 200.0;
  18. depth = (2.0 * zNear) / (zFar + zNear - depth * (zFar - zNear));
  19. vec3 col = vec3(depth.rg, 0.0);*/
  20. out_color = col;
  21. }