czm_phong

czm_phong

Computes a color using the Phong lighting model.

Parameters:
Name Type Description
toEye vec3 A normalized vector from the fragment to the eye in eye coordinates.
material czm_material The fragment's material.
Returns:
vec4 The computed color.
Example
vec3 positionToEyeEC = // ...
czm_material material = // ...
gl_FragColor = czm_phong(normalize(positionToEyeEC), material);
See:
  • czm_getMaterial
Source: