You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 rivejä
475 B

  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 inColor;
  6. layout (binding = 0) uniform UBO
  7. {
  8. mat4 projectionMatrix;
  9. mat4 modelMatrix;
  10. mat4 viewMatrix;
  11. } ubo;
  12. layout (location = 0) out vec3 outColor;
  13. void main()
  14. {
  15. outColor = inColor;
  16. gl_Position = ubo.projectionMatrix * ubo.viewMatrix * ubo.modelMatrix * vec4(inPos.xyz, 1.0);
  17. }