Hello there everyone, when I render with shader my 2D HUD texture' origanally trasparent parts of it get filled with white color.
struct VS_INFO
{
float4 position : POSITION;
float2 coord : TEXCOORD;
};
VS_INFO main_vs(VS_INFO input)
{
VS_INFO output;
output.position = input.position;
output.coord = input.coord;
return output;
}
uniform texture2D g_texture;
sampler2D g_texture_sampler =
sampler_state
{
Texture = <g_texture>;
};
float4 main_ps(float2 uv : TEXCOORD0) : COLOR
{
float4 sourceColor = tex2D(g_texture_sampler, uv);
return sourceColor;
}
technique T0
{
pass P0
{
VertexShader = compile vs_2_0 main_vs();
PixelShader = compile ps_2_0 main_ps();
}
}
I want 'em(parts) to be transparent after they have been rendered with shader