Wednesday, September 02, 2009

OpenGL: Diffuse, Specular, Ambient, Emissive lights

In the OpenGL world there are different types of light types

Diffuse
--------
These type come from one direction bu are scattered equally in all directions.

Specular
--------
This type of light comes in one directions and is also bounced off in one direction

Ambient
--------
This type of light source comes from different light sources and is also scattered in different directions

Emissive
---------
This represents light originating from the object

So in general A light source has two types of properties associated with it
LR,LG,LB => the RGB components that make up the light and
MR,MG,MB => the RGB components that are reflected away
Hence the net effect of the RGB is given by a vector

(LR.MR, LG.MG, LB.MB)

if light is coming from two or more sources the light is added and next effect is
of the form

(R1 + R2, G1 + G2, B1 + B2)

No comments: