Work on assignment 4
[opengl.git] / fragment.glsl
diff --git a/fragment.glsl b/fragment.glsl
deleted file mode 100644 (file)
index cffd8a0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-#version 330
-in vec4 color;
-in vec3 normal;
-in vec3 fragPos;
-uniform vec3 lightPos;
-uniform vec3 viewPos;
-uniform vec4 lightColor; 
-out vec4 FragColor;
-
-void main() {
-       float ambient = 0.1;
-       float specularStrength = 0.5;
-       vec3 lightDir = normalize(fragPos - lightPos);
-       float diffuse = max(0, dot(-normal, lightDir));
-
-       vec3 viewDir = normalize(fragPos - viewPos);
-       vec3 reflectDir = reflect(-lightDir, normal);
-       float specular = pow(max(0, dot(viewDir, reflectDir)), 128);
-
-       vec4 lighting = (ambient + diffuse + specular) * lightColor;
-
-       FragColor = lighting * color;
-}