#include <vecskill>
//float4 vecSkill41;
texture entSkin1;
texture entSkin2;
const float4x4 matWorldViewProj;
sampler sBaseTex = sampler_state { Texture = <entSkin1>; MipFilter = Linear; };
sampler sSkin2 = sampler_state { Texture = <entSkin2>; MipFilter = None; };
void VSshade(in float4 InPos : POSITION,in float2 InTex : TEXCOORD0, out float4 OutPos : POSITION, out float2 OutTex : TEXCOORD0)
{
OutPos = mul(InPos, matWorldViewProj);
OutTex = InTex;
}
float4 transperens_PS(in float2 InTex : TEXCOORD0): COLOR
{
float3 color = tex2D(sSkin2,InTex);
if(color.x <= vecSkill41.x)
{
return tex2D(sBaseTex,InTex);
}
else
{
return float4(0,0,0,0);
}
}
technique filter
{
pass one
{
VertexShader = compile vs_1_0 VSshade();
PixelShader = compile ps_1_0 transperens_PS();
}
}