Materials

Every object in our world has a material. The material defines how the light that is hitting an object will be reflected and modify the color of the reflected light. OpenGL ES lets us specify the same four RGBA colors for a material as for a light source:

Ambient: This is the color that's combined with the ambient color of any light source in the scene.

Diffuse: This is the color that's combined with the diffuse color of any light source.

Specular: This is the color that's combined with the specular color of any light source for specular highlight points on an objects surface.

Emissive: We again ignore this as it has little use in our context.

Figure 11-3 illustrates the first three types of material/light source properties: ambient, diffuse, and specular.

0 0

Post a comment