Advertisement
Guest User

Untitled

a guest
Jul 7th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. float4 NearestNeighbor(float2 texCoord)
  2. {
  3.     int idx = tex2D(TexSampler, texCoord).r * 255;
  4.  
  5.     // No need to draw mask
  6.     if (idx == 0)
  7.         discard;
  8.     float x = (palCoords.x + idx) % 1024;
  9.     float y = palCoords.y + ((idx % 1024) / 1024.0);
  10.  
  11.     float4 color = tex2D(PalSampler, float2(x / 1024.0, y / 1024.0));
  12.  
  13.     //color.a *= src_alphamul;
  14.  
  15.     return color;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement