No Description

debug.vert 527B

123456789101112131415161718192021222324
  1. #version 450
  2. #extension GL_ARB_separate_shader_objects : enable
  3. #extension GL_ARB_shading_language_420pack : enable
  4. layout (location = 0) in vec3 inPos;
  5. layout (location = 1) in vec2 inUV;
  6. layout (binding = 0) uniform UBO
  7. {
  8. mat4 projection;
  9. mat4 modelview;
  10. } ubo;
  11. layout (location = 0) out vec3 outUV;
  12. void main()
  13. {
  14. outUV = vec3(inUV.st, gl_InstanceIndex);
  15. vec4 tmpPos = vec4(inPos, 1.0);
  16. tmpPos.y += gl_InstanceIndex;
  17. tmpPos.xy *= vec2(1.0/4.0, 1.0/3.0);
  18. gl_Position = ubo.projection * ubo.modelview * tmpPos;
  19. }