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.

28 lines
709 B

  1. /*******************************************************************************************
  2. *
  3. * rPBR [shader] - Equirectangular to cubemap vertex shader
  4. *
  5. * Copyright (c) 2017 Victor Fisac
  6. *
  7. **********************************************************************************************/
  8. #version 330
  9. // Input vertex attributes
  10. in vec3 vertexPosition;
  11. // Input uniform values
  12. uniform mat4 projection;
  13. uniform mat4 view;
  14. // Output vertex attributes (to fragment shader)
  15. out vec3 fragPos;
  16. void main()
  17. {
  18. // Calculate fragment position based on model transformations
  19. fragPos = vertexPosition;
  20. // Calculate final vertex position
  21. gl_Position = projection*view*vec4(vertexPosition, 1.0);
  22. }