float4x4 matWorldViewProj;
struct VS_IN
{
float4 pos : POSITION;
float4 nrm : NORMAL;
};
struct VS_OUT
{
float4 oPos : POSITION;
float4 oC0 : COLOR0;
float4 oC1 : COLOR1;
};
VS_OUT OutlineVS (VS_IN In, uniform float scale, uniform float3 rgb)
{
VS_OUT Out;
In.pos.xyz += In.nrm.xyz*scale;
Out.oPos = mul(In.pos,matWorldViewProj);
Out.oC0 = Out.oC1 = float4(rgb,1.0);
return Out;
}
technique test
{
pass p1
{
CullMode = CCW;
}
pass p0
{
CullMode = CW;
VertexShader = compile vs_2_0 OutlineVS(1,float3(0.0,0,0)); // thickness , rgb
}
}