Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uniform sampler2D texture;
- uniform vec2 textureSize;
- varying vec2 uv;
- void main(){
- vec2 puv = uv*textureSize;
- vec2 hfw = fwidth(puv)/2.0;
- vec2 fl = floor(puv - 0.5) + 0.5;
- vec2 nnn = (fl + smoothstep(0.5 - hfw, 0.5 + hfw, puv - fl))/textureSize;
- gl_FragColor = texture2D(texture, nnn);
- }
Add Comment
Please, Sign In to add comment