float4x4 matWorldViewProj;
texture entSkin1;
texture entSkin2;
sampler SKIN = sampler_state { texture = <entSkin1>;};
sampler LIGHT = sampler_state { texture = <entSkin2>;};
float4 VS ( in float4 P : position,
in float2 T1 : texcoord0,
in float2 T2 : texcoord1,
out float4 tex : texcoord0) : position {
tex.xy = T1;
tex.zw = T2;
return mul(P,matWorldViewProj);}
float4 PS ( in float4 tex : texcoord0) : color {
float4 color = tex2D(SKIN,tex.xy);
color = lerp (color,color*tex2D(LIGHT,tex.zw),color.a);
return color;}
technique t{ pass p{
zWriteEnable = 1;
AlphaBlendEnable = 0;
VertexShader = compile vs_2_0 VS();
PixelShader = compile ps_2_0 PS(); }}