DKGL2 sample codes

texture.vert 342B

1234567891011121314151617181920212223
  1. #version 450
  2. layout (location = 0) in vec3 inPos;
  3. layout (location = 1) in vec2 inUV;
  4. layout (binding = 0) uniform UBO
  5. {
  6. mat4 projection;
  7. mat4 model;
  8. } ubo;
  9. layout (location = 0) out vec2 outUV;
  10. out gl_PerVertex
  11. {
  12. vec4 gl_Position;
  13. };
  14. void main()
  15. {
  16. outUV = inUV;
  17. gl_Position = ubo.projection * ubo.model * vec4(inPos.xyz, 1.0);
  18. }