Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. sampler2D textureSampler : register(s0);
  2.  
  3. float4 backgroundColor;
  4.  
  5. float4 PixelShaderFunction(float2 coords : TEXCOORD0) : COLOR0
  6. {
  7. float4 cutoutColor = tex2D(textureSampler, coords);
  8.  
  9. float4 finalColor = cutoutColor;
  10.  
  11. if (cutoutColor.r > 0 || cutoutColor.g > 0 || cutoutColor.b > 0)
  12. finalColor = cutoutColor.a = 0;
  13. else
  14. finalColor = backgroundColor;
  15.  
  16. return finalColor;
  17. }
  18.  
  19. technique Technique0
  20. {
  21. pass Pass0
  22. {
  23. PixelShader = compile ps_3_0 PixelShaderFunction();
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement