Ok, I tried to lightmap it. Seems my GeForce 3 64MB card won't do it. Now I know this is wrong because my retail games get away with it.
So how do you light map w/o using shaders? Every time I try to use the fixed function pipeline or more than one sampler - I get no results. It's as if only sampler 0 is supported on my display driver.
This is a render state that has the light map in the alpha component of the texture. Doesn't work.
Code:
// Set the base texture operation and args.
// Set the color operation.
Device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
// Set argument 1 to the color operation.
Device->SetTextureStageState(0, D3DTSS_COLORARG1,
D3DTA_TEXTURE | D3DTA_ALPHAREPLICATE);
And this is the other method. Again, doesn't work.
Code:
// This example assumes that d3dDevice is a valid pointer to an
// IDirect3DDevice9 interface and that lptexLightMap is a valid
// pointer to a texture that contains RGB light map data.
// Set the light map texture as the first texture.
Device->SetTexture(0, Texture);
Device->SetTextureStageState( 0,D3DTSS_COLOROP, D3DTOP_MODULATE );
Device->SetTextureStageState( 0,D3DTSS_COLORARG1, D3DTA_TEXTURE );
Device->SetTextureStageState( 0,D3DTSS_COLORARG2, D3DTA_DIFFUSE );
Code:
// This example assumes that d3dDevice is a valid pointer to an
// IDirect3DDevice9 interface.
// lptexBaseTexture is a valid pointer to a texture.
// lptexDiffuseLightMap is a valid pointer to a texture that contains
// RGB diffuse light map data.
// Set the base texture.
Device->SetTexture(0,Texture);
// Set the base texture operation and args.
Device->SetTextureStageState(0,D3DTSS_COLOROP,
D3DTOP_MODULATE );
Device->SetTextureStageState(0,D3DTSS_COLORARG1, D3DTA_TEXTURE );
Device->SetTextureStageState(0,D3DTSS_COLORARG2, D3DTA_DIFFUSE );
// Set the diffuse light map.
Device->SetTexture(1,LightMap );
// Set the blend stage.
Device->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_MODULATE );
Device->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE );
Device->SetTextureStageState(1, D3DTSS_COLORARG2, D3DTA_CURRENT );
Last two right out of the SDK with my variables added. Still nothing.
Help, please.