czm_getLambertDiffuse

czm_getLambertDiffuse

Calculates the intensity of diffusely reflected light.

Parameters:
Name Type Description
lightDirectionEC vec3 Unit vector pointing to the light source in eye coordinates.
normalEC vec3 The surface normal in eye coordinates.
Returns:
float The intensity of the diffuse reflection.
Example
float diffuseIntensity = czm_getLambertDiffuse(lightDirectionEC, normalEC);
float specularIntensity = czm_getSpecular(lightDirectionEC, toEyeEC, normalEC, 200);
vec3 color = (diffuseColor * diffuseIntensity) + (specularColor * specularIntensity);
See:
Source: