DKGL2 sample codes

texture.vert 463B

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