texture mtlSkin1;
texture TargetMap;
float4 vecSkill41;
float3 vecViewPort;
float4x4 matWorldViewProj;
sampler targetmap = sampler_state
{
texture = (TargetMap);
MinFilter = linear;
MagFilter = linear;
MipFilter = linear;
AddressU = Wrap;
AddressV = Wrap;
};
sampler bumpTex = sampler_state
{
texture = (mtlSkin1);
MinFilter = linear;
MagFilter = linear;
MipFilter = linear;
AddressU = Clamp;
AddressV = Clamp;
};
struct VS_INPUT
{
float4 Position : POSITION;
float2 tex0 : TEXCOORD0;
};
struct VS_OUTPUT
{
float4 PosWorld : POSITION;
float2 tex0 : TEXCOORD0;
};
VS_OUTPUT vs_main( VS_INPUT In )
{
VS_OUTPUT Out;
float4 Position = mul(In.Position, matWorldViewProj);
Out.PosWorld = Position;
Out.tex0 = In.tex0.xy;
return Out;
}
float4 ps_main( VS_OUTPUT In,in float4 vScreenPos : VPOS) : COLOR
{
float2 TexcoordScreen = ( vScreenPos.xy + 0.5) / (vecViewPort.xy);
float2 pixel = ((tex2D(bumpTex, In.tex0).rg) -0.5-(1/254))*( 0.001 * vecSkill41.x );
float4 pixel2 = tex2D(targetmap,((TexcoordScreen.xy) + (pixel.xy ) ));
return pixel2;
}
technique tech_00
{
pass pass_00
{
vertexshader = compile vs_3_0 vs_main();
pixelshader = compile ps_3_0 ps_main();
}
}
technique fallback { pass one { } }