ImageRender.frag 684 B

12345678910111213141516171819202122232425
  1. #version 450
  2. layout(location = 0) in vec2 tex_coord;
  3. layout(location = 1) in vec4 bounds;
  4. layout(location = 2) in vec2 pos;
  5. layout(location = 0) out vec4 fsout_Color;
  6. layout(set = 1, binding = 0) uniform texture2D Tex;
  7. layout(set = 1, binding = 1) uniform sampler Sampler;
  8. void main()
  9. {
  10. // float left = bounds.x;
  11. // float top = bounds.y;
  12. // float right = bounds.z;
  13. // float bottom = bounds.w;
  14. //
  15. // if(!(left <= pos.x && right >= pos.x &&
  16. // top <= pos.y && bottom >= pos.y))
  17. // {
  18. // discard;
  19. // }
  20. fsout_Color =texture(sampler2D(Tex, Sampler), tex_coord);
  21. //fsout_Color = vec4(fsout_Color.z, fsout_Color.w,fsout_Color.x,fsout_Color.y);
  22. }