Nenhuma descrição

123456789101112131415161718192021222324252627
  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 vec3 inNormal;
  6. layout (location = 2) in vec2 inUV;
  7. layout (binding = 0) uniform UBO
  8. {
  9. mat4 projection;
  10. mat4 model;
  11. } ubo;
  12. layout (location = 0) out vec3 outUVW;
  13. out gl_PerVertex
  14. {
  15. vec4 gl_Position;
  16. };
  17. void main()
  18. {
  19. outUVW = inPos;
  20. gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
  21. }