vertex_shader.glsl 393 B

123456789101112131415161718192021
  1. #version 300 es
  2. layout (location = 0) in vec3 aPos;
  3. layout (location = 1) in vec2 tCoords;
  4. layout (location = 2) in vec3 tNorm;
  5. out vec2 tcoords;
  6. out vec3 tnorm;
  7. uniform mat4 view;
  8. uniform mat4 pers;
  9. uniform mat4 trans;
  10. uniform mat4 roth;
  11. uniform mat4 rotv;
  12. void main() {
  13. tcoords = tCoords;
  14. tnorm = tNorm;
  15. gl_Position = pers*rotv*roth*view*trans*vec4(aPos.x, aPos.y, aPos.z, 1.0);
  16. }