Snippets

Joseph Chow blinn Phong Specular shading

Created by Joseph Chow
1
2
3
4
float blinnPhongSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float shininess ) {
  vec3 H = normalize(viewDirection + lightDirection);
  return pow(max(0.0, dot(surfaceNormal, H)), shininess);
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.