How to smooth alpha channel using Silverlight 3 pixel shaders?
I want some kind of HLSL filter (like this Shazzam HLSL example )
sampler2D implicitInputSampler : register(S0);
float4 main(float2 uv : TEXCOORD) : COLOR
{
float4 color = tex2D( implicitInputSampler, uv );
if( color.r + color.g + color.b < 1.9 ) {
color.rgba = 0;
}
return color;
}
in order to dial not only the color that I am trying to type, but, for example, if dark red consists of red and blue, and I type all blue, I want to get transparent red. (Probably, this picture can explain what I want) (source: narod.ru )
source
share