You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, the specular term is forced to zero if the diffuse term is zero because N · L (from diffuse lighting) is negative. This ensures that specular highlights do not appear on geometry that faces away from the light.
From http://developer.download.nvidia.com/CgTutorial/cg_tutorial_chapter05.html:
So line 9 should read:
return pow(step(0.0, dot(surfaceNormal, lightDirection)) * max(0.0, dot(viewDirection, R)), shininess);
Or something like that.
The text was updated successfully, but these errors were encountered: