Advertisement
Guest User

sf

a guest
Aug 5th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. struct VS_OUT
  2. {
  3.     float4 PosH : SV_POSITION;
  4.     float2 Tex  : TEXCOORD;
  5. };
  6.  
  7. SamplerState Sampler : register(s0);
  8.  
  9. Texture2D DiffuseMap;
  10.  
  11. void main(VS_OUT pin)
  12. {
  13.     float4 Diffuse = DiffuseMap.Sample(Sampler, pin.Tex);
  14.  
  15.     //clip pixels having alpha value < 0.15 (nearly transparent)
  16.     clip(Diffuse.a - 0.15f);
  17.  
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement