Opengl, Computer Graphics, Shaders, Texture, Shading.
kd * diffuseProduct; float ks = pow(max(dot(N,H),0.0), shininess); // simplified phong model vec4 specular = ks * specularProduct; if(dot(L,N) < 0.0) specular = vec4(0.0,0.0,0.0, 1.0); // gl_Position is built-in uniform variable gl_Position = projection * modelView * vPosition; // output. color =