Hi everyone,
I'm new to the concept of shaders, so I apologize in advance if this question is basic and/or stupid.
I'm using a bumpmap effect from the AUM magazine (the code is below). I've noticed that adjusting the ambience of the engine via the camera.ambient command does not affect any blocks using the bumpmap effect. Is there any way around this? I've created a lightning-like effect using the ambient command, but only models show the changed ambience unless I turn off the bump mapping code.
Thanks in advance for your assistance!

The bump map effect, in an .FX file:
Code:
matrix matWorldViewProj;
matrix matWorld;
texture mtlSkin1;
texture entSkin1;
texture entSkin2;
texture entSkin3;
vector vecLight;
technique dot3map
{
pass p0
{
Texture[0] = <mtlSkin1>;
Texture[1] = <entSkin2>;
Texture[2] = <entSkin1>;
Texture[3] = <entSkin3>;
TextureFactor = 0xFFFFFFFF;
COLOROP[0] = DotProduct3;
COLORARG1[0] = Texture;
COLORARG2[0] = TFactor;
TexCoordIndex[0] = 1;
COLOROP[1] = Modulate;
COLORARG1[1] = Texture;
COLORARG2[1] = Current;
TexCoordIndex[1] = 0;
magFilter[2]=Linear;
minFilter[2]=Linear;
mipFilter[2]=Linear;
COLOROP[2] = AddSigned;
COLORARG1[2] = Texture;
COLORARG2[2] = Current;
TexCoordIndex[2] = 1;
magFilter[3]=Linear;
minFilter[3]=Linear;
mipFilter[3]=Linear;
COLOROP[3] = AddSigned;
COLORARG1[3] = Texture;
COLORARG2[3] = Current;
TexCoordIndex[3] = 1;
}
}
The game's code:
Code:
bmap cementDOT3 = <cementDOT3.tga>;
material cement
{
skin1 = cementDOT3;
flags = tangent;
}
starter load_shaders()
{
d3d_automaterial=1;
effect_load(cement,"bumpmap.fx");
wait(5);
}