litColor = SurfaceColor * max(dot(normDelta, LightDir), 0.0);
vec3 reflectDir = reflect(LightDir, normDelta);
- float spec = max(dot(normalize(EyeDir), reflectDir), 0.0);
+ float spec = max(dot(EyeDir, reflectDir), 0.0);
spec *= SpecularFactor;
litColor = min(litColor + spec, vec3(1.0));
v.z = dot(LightPosition, n);
LightDir = normalize(v);
-/* v.x = dot(EyeDir, t);
- v.y = dot(EyeDir, b);
- v.z = dot(EyeDir, n);
- EyeDir = normalize(EyeDir);
-*/
+ v.x = dot(EyeDir, t);
+ v.y = dot(EyeDir, b);
+ v.z = dot(EyeDir, n);
+ EyeDir = normalize(v);
}