CGPdocs

phong_parameters

Phong coefficients of a material: ambient, diffuse, specular and specular exponent.

Fields and methods

Members of the struct phong_parameters. Most of what you do with a CGP type goes through the free functions listed below.

Fields

float ambient = 0.3fAmbient coefficient Ka (0.3 by default): fraction of the object color shown even where the light does not reach, sent to material.phong.ambient.
float diffuse = 0.6fDiffuse coefficient Kd (0.6 by default) multiplying max(dot(N,L),0) in the default shader, sent to material.phong.diffuse.
float specular = 0.3fSpecular coefficient Ks (0.3 by default) of the white highlight, sent to material.phong.specular (0 gives a matte surface).
float specular_exponent = 64.0fShininess exponent (64 by default) of the specular term: the larger, the smaller and sharper the highlight; sent to material.phong.specular_exponent.

Functions taking a phong_parameters

None.

Functions returning a phong_parameters

None.

Operators

None.

CGP - Computer Graphics Programming.