fragment_code = '''
    #version 330
 
    // in vec3 newColor;
    
    in vec3 newNormal;  // Surface normal
    in vec3 vertPos;       // Vertex position
 
    void main() {
        float Ka = 0.5;   // Ambient reflection coefficient
        float Kd = 0.5;   // Diffuse reflection coefficient
        float Ks = 0.5;   // Specular reflection coefficient
        vec3 ambientColor = vec3(0.0, 1.0, 0.0);
        vec3 diffuseColor = vec3(0.0, 0.0, 1.0);
        vec3 specularColor = vec3(1.0, 0.0, 0.0);
        vec3 lightPos = vec3(0.0, 0.0, -5.0);
        float shininessVal = 64;
        
        vec3 N = normalize(normalInterp);
        vec3 L = normalize(lightPos - vertPos);
        
        // Lambert's cosine law
        float lambertian = max(dot(N, L), 0.0);
        float specular = 0.0;

        if(lambertian > 0.0) {
            vec3 R = reflect(-L, N);      // Reflected light vector
            vec3 V = normalize(-vertPos); // Vector to viewer
            // Compute the specular term
            float specAngle = max(dot(R, V), 0.0);
            specular = pow(specAngle, shininessVal);
        }
  
        gl_FragColor = vec4(Ka * ambientColor +
            Kd * lambertian * diffuseColor +
            Ks * specular * specularColor, 1.0);
    }
'''
