you could try this diffuse per pixel lighting shader.

the first texture of the model has to be the color map, the second one the bumpmap. instead of converting the bumpmap to a normalmap within the engine you could also use a normalmap directly. then you don't need the bmap_to_normals line. there are plugins for photoshop and the gimp at the nvidia website which can convert bumpmaps to normalmaps. you could also generate normalmaps out of a high poly version of the model. ati provides a tool for that...

i think because of the normal vector bug in the current beta, the light (from the sun) seems to come from strange directions. but that could also be caused by a faulty shader, it's hard to say. i think i will wait for the next beta with correct normals before i do more shader experiments...

Code:

action myentity
{
bmap_to_normals(bmap_for_entity(my,1),16); // convert the bumpmap to a normalmap with scale factor 16
my.material=mat_diffuseperpixel;
...
}

material mat_diffuseperpixel
{
flags=tangent;
effect=
"
texture texSkin1;
texture texSkin2;
matrix matWorldViewProj;
matrix matWorld;
matrix matWorldView;
vector vecSunDir;
vector vecFog;

technique diffuseperpixel
{
pass p0
{
Texture[0]=<texSkin1>;
Texture[1]=<texSkin2>;

VertexShaderConstant[0]=<matWorldViewProj>;
VertexShaderConstant[4]=<matWorld>;
VertexShaderConstant[8]=<matWorldView>;
VertexShaderConstant[16]=<vecSunDir>;
VertexShaderConstant[17]=<vecFog>;
VertexShaderConstant[95]=(0.5f,0.0f,0.0f,0.0f);

VertexShader=
decl
{
stream 0;
float v0[3]; //position
float v3[3]; //normal
float v7[3]; //uv
float v8[3]; //tangent
}
asm
{
vs.1.1

m4x4 oPos,v0,c0
mov oT0,v7
mov oT1,v7

m3x3 r5,v8,c4 // transform tangent to world space
m3x3 r7,v3,c4 // transform normal to world space

mul r0,r5.zxyw,-r7.yzxw // tangent x normal -> binormal
mad r6,r5.yzxw,-r7.zxyw,-r0

dp3 r8.x,r5,-c16 // transform light vector to texture space
dp3 r8.y,r6,-c16
dp3 r8.z,r7,-c16
mad oD0.xyz,r8.xyz,c95.x,c95.x

mov r1.w,c17.w // r1.w=1
dp4 r0,v0,c10 // distance to camera position
add r0,r0,-c17.x // distance-fog_start
mad r0.x,-r0.x,c17.z,r1.w // 1-(distance-fog_start)*(1/(fog_end-fog_start))
max oFog.x,r0.x,c95.w // clamp with custom max value
};

PixelShader=
asm
{
ps.1.3
tex t0 // sample colormap
tex t1 // sample normalmap
dp3 r1,t1_bx2,v0_bx2 // normal . light
mul r0,t0,r1 // modulate against base color
};
}
}
";
}