Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float4 NearestNeighbor(float2 texCoord)
- {
- int idx = tex2D(TexSampler, texCoord).r * 255;
- // No need to draw mask
- if (idx == 0)
- discard;
- float x = (palCoords.x + idx) % 1024;
- float y = palCoords.y + ((idx % 1024) / 1024.0);
- float4 color = tex2D(PalSampler, float2(x / 1024.0, y / 1024.0));
- //color.a *= src_alphamul;
- return color;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement