X-Git-Url: https://git.lukelau.me/?p=opengl.git;a=blobdiff_plain;f=vertex.glsl;h=e7a74dd8f1adfc9bf818565b7778b02a79900199;hp=e2d30b74d109577a524be5636ecfb94365e7c432;hb=5a4d005b668b98d44ef20391ecddaf6bfc2ee70f;hpb=c5d984e4904ae7b286bf095a1c640cc25cebe9be diff --git a/vertex.glsl b/vertex.glsl index e2d30b7..e7a74dd 100644 --- a/vertex.glsl +++ b/vertex.glsl @@ -8,6 +8,7 @@ uniform mat4 projection; out vec4 color; out vec3 normal; out vec3 fragPos; +out vec3 normalEye; void main() { vec4 pos = model * vec4(vPosition, 1.f); @@ -15,4 +16,5 @@ void main() { fragPos = vec3(pos); color = vColor; normal = vNormal; + normalEye = vec3(view * vec4(normal, 0.0)); }