Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sampler2D textureSampler : register(s0);
- float4 backgroundColor;
- float4 PixelShaderFunction(float2 coords : TEXCOORD0) : COLOR0
- {
- float4 cutoutColor = tex2D(textureSampler, coords);
- float4 finalColor = cutoutColor;
- if (cutoutColor.r > 0 || cutoutColor.g > 0 || cutoutColor.b > 0)
- finalColor = cutoutColor.a = 0;
- else
- finalColor = backgroundColor;
- return finalColor;
- }
- technique Technique0
- {
- pass Pass0
- {
- PixelShader = compile ps_3_0 PixelShaderFunction();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement