Posted By: Espér
Outline-Shader + Alpha-Skin at Models???? - 04/01/09 17:05
ok.. after bumping, i try my luck here...
I use this shadercode ( thx to cowabanga ):
Now i recognized:
If i use a model, with an alpha-TGA File as Skin.. the complete model is Transparent like the alpha.. but completely black...
Any idea how to add the Alpha-TGA Support to that shader???
I use this shadercode ( thx to cowabanga ):
Code:
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(0.5,float3(0.0,0,0)); // thickness , rgb
}
}
Now i recognized:
If i use a model, with an alpha-TGA File as Skin.. the complete model is Transparent like the alpha.. but completely black...
Any idea how to add the Alpha-TGA Support to that shader???
