Sunday, March 25, 2007
#define D3DCOLOR_COLORVALUE(r, g, b, a)
D3DCOLOR_RGBA((DWORD)((r)*255.f), (DWORD)((g)*255.f), (DWORD)((b)*255.f), (DWORD)((a)*255.f))
Friday, March 23, 2007
There are three main types of illumination models.
- Emissive - The object "emits" its own light (ie. neon sign)
- Ambient - A an object is lit by an outside source, based on the material properties of the object, it will reflect this light, which will subsequently be reflected by other objects, until eventually all objects are lit.
- Direct Lighting - This is further broken into two subcategories (positional and directional). Positional is where the light is coming from one defined point in space. Directional is where the light comes from a source that is infinately far away (ie. sun).
We can set emissive at the object level, on frame advance, and we can also set the ambient level at the device level. So we are really focusing on direct lighting. With direct lighting two other illumination types are introduced, diffuse light and specular light.
- Diffuse Light - the full intensity of the light, scaled by the cosine of the angle between the normals of the light source and the object face. Lambert's Law dictates this.
- Specular Light - used to highlight an object to give the illusion of shiny and smooth surface.
This leads to the basic lighting equation used by DirectX.
I = A + D + S + E
A = Ambient Light
D = Diffuse Light
S = Specular Light
E = Emissive Light
Friday, March 16, 2007
UPDATE: The slide audio is availabe here for a fee!
Tuesday, March 6, 2007
UPDATE from GDC! From theZman
Monday, March 5, 2007
Sunday, March 4, 2007
Friday, March 2, 2007
Managed Code Performance Part 1
Managed Code Performance Part 2