Class PhongMaterial


public class PhongMaterial
extends Material
The PhongMaterial class provides definitions of properties that represent a Phong shaded material. It describes the interaction of light with the surface of the Mesh it is applied to. The PhongMaterial reflects light in terms of a diffuse and specular component together with an ambient and a self illumination term. The color of a point on a geometric surface is mathematical function of these four components.

The color is computed by the following equation:

 for each ambient light source i {
     ambient += lightColor[i]

 for each point light source i {
     diffuse += (L[i] . N) * lightColor[i]
     specular += ((R[i] . V) ^ (specularPower * intensity(specularMap))) * lightColor[i]

 color = (ambient + diffuse) * diffuseColor * diffuseMap
             + specular * specularColor * specularMap
             + selfIlluminationMap
where lightColor[i] is the color of light source i,
L[i] is the vector from the surface to light source i,
N is the normal vector (taking into the account the bumpMap if present),
R[i] is the normalized reflection vector for L[i] about the surface normal,
and V is the normalized view vector.
JavaFX 8.0
See Also:
AmbientLight, PointLight