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.

25 lines
544 B

  1. #version 330
  2. // Input vertex attributes
  3. in vec3 vertexPosition;
  4. in vec2 vertexTexCoord;
  5. in vec3 vertexNormal;
  6. in vec4 vertexColor;
  7. // Input uniform values
  8. uniform mat4 mvpMatrix;
  9. // Output vertex attributes (to fragment shader)
  10. out vec2 fragTexCoord;
  11. out vec4 fragColor;
  12. // NOTE: Add here your custom variables
  13. void main()
  14. {
  15. // Send vertex attributes to fragment shader
  16. fragTexCoord = vertexTexCoord;
  17. fragColor = vertexColor;
  18. // Calculate final vertex position
  19. gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
  20. }