Opengl, Computer Graphics, Shaders, Texture, Shading.
normalize(lightPos.xyz - pos); vec3 E = normalize(-pos); vec3 H = normalize(L+E); // Transform vertex normal into eye coordinates vec3 N = normalize(ModelView * vec4(vNormal, 0.0).xyz); // compute terms in illumination equation. // assume no atteunation float kd = max(dot(N,L), 0.0); vec4 diffuse =