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.

20 lines
438 B

  1. #version 330
  2. // Input vertex attributes
  3. in vec3 vertexPosition;
  4. // Input uniform values
  5. uniform mat4 matProjection;
  6. uniform mat4 matView;
  7. // Output vertex attributes (to fragment shader)
  8. out vec3 fragPosition;
  9. void main()
  10. {
  11. // Calculate fragment position based on model transformations
  12. fragPosition = vertexPosition;
  13. // Calculate final vertex position
  14. gl_Position = matProjection*matView*vec4(vertexPosition, 1.0);
  15. }