projects
/
opengl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
e7a74dd8f1adfc9bf818565b7778b02a79900199
[opengl.git]
/
vertex.glsl
1
#version 330
2
in vec3 vPosition;
3
in vec4 vColor;
4
in vec3 vNormal;
5
uniform mat4 model;
6
uniform mat4 view;
7
uniform mat4 projection;
8
out vec4 color;
9
out vec3 normal;
10
out vec3 fragPos;
11
out vec3 normalEye;
12
13
void main() {
14
vec4 pos = model * vec4(vPosition, 1.f);
15
gl_Position = projection * view * pos;
16
fragPos = vec3(pos);
17
color = vColor;
18
normal = vNormal;
19
normalEye = vec3(view * vec4(normal, 0.0));
20
}