small fix to specular lightning

This commit is contained in:
Hugo Willaume 2018-11-28 10:50:50 +09:00
parent 9e895bbcfd
commit c0ab49c388

View File

@ -35,7 +35,7 @@ void main(void)
vec3 diffuse = Kd * Ld * max(dot(L, N), 0.0);
vec3 ambient = Ka * La;
vec3 specular = Ks * Ls * pow(max(dot(L, N), 0.0), 50.0);
vec3 specular = Ks * Ls * pow(max(dot(R, V), 0.0), 50.0);
f_color = diffuse + ambient + specular;
gl_Position = mvp * vec4(coord3d, 1.0f);