A crude and small graphics-engine I've made during computer graphics courses in late 2018.
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.

vertexShader.vert 462B

1234567891011121314151617181920
  1. #version 330 core
  2. layout (location = 0) in vec3 aPos;
  3. layout (location = 1) in vec3 aNormal;
  4. layout (location = 2) in vec2 aTexCoords;
  5. out vec3 FragPos;
  6. out vec3 Normal;
  7. out vec2 TexCoords;
  8. uniform mat4 model;
  9. uniform mat4 view;
  10. uniform mat4 projection;
  11. void main() {
  12. FragPos = vec3(model * vec4(aPos, 1.0));
  13. Normal = mat3(transpose(inverse(model))) * aNormal;
  14. TexCoords = aTexCoords;
  15. gl_Position = projection * view * vec4(FragPos, 1.0f);
  16. }