I have A7 Pro. I'm using the very basic bump map code on some blocks in my level. As expected, the level runs very slowly. That's the reason I had never used block-based materials in the past.
However, with A7's new create meshes feature (in the map compiler), I'm hoping that it will be possible. Of "create meshes", the manual states:
"Lets the engine render static meshes, rather than blocks. Recommended when more than 8 dynamic lights should be visible at the same time, or when shaders are applied to level surfaces f.i. with the d3d_automaterial function. In this mode the level rendering can be greatly sped up by combining block groups to single meshes."
This sounded like it might speed up the bump mapping, so I decided to give it a try. The good news is that it does speed up the level insanely...the bad news is that the bump map code doesn't look right now. As you can see below in the screenshot, it looks as if it somehow messes up the static light map calculations, although I could be wrong.
I'm hoping that one of you coding geniuses out there can help me out, as I know very little about shaders. Do you have any idea what could be causing the change? Is bump mapping just not possible in mesh mode?
For reference, here is the bump map code I am using, along with two pictures of my level:
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;
}
}
Screenshot when "create meshes" is off:
www.upforums.com/temp2.jpgScreenshot when "create meshes" is on:
www.upforums.com/temp1.jpg