Add basics of materials
[opengl.git] / vertex.glsl
index e2d30b74d109577a524be5636ecfb94365e7c432..f886c9bf2650af8771ec501cbc0a601b21091861 100644 (file)
@@ -2,12 +2,15 @@
 in vec3 vPosition;
 in vec4 vColor;
 in vec3 vNormal;
+in vec2 vTexCoord;
 uniform mat4 model;
 uniform mat4 view;
 uniform mat4 projection;
 out vec4 color;
 out vec3 normal;
 out vec3 fragPos;
+out vec3 normalEye;
+out vec2 texCoord;
 
 void main() {
        vec4 pos = model * vec4(vPosition, 1.f);
@@ -15,4 +18,6 @@ void main() {
        fragPos = vec3(pos);
        color = vColor;
        normal = vNormal;
+       normalEye = vec3(view * vec4(normal, 0.0));
+       texCoord = vTexCoord;
 }