pixelize.gdshader 300 B

123456789101112
  1. shader_type canvas_item;
  2. uniform sampler2D screen_texture : hint_screen_texture, filter_linear_mipmap;
  3. uniform float size_x = 0.008;
  4. uniform float size_y = 0.008;
  5. void fragment() {
  6. vec2 uv = SCREEN_UV;
  7. uv -= mod(uv, vec2(size_x, size_y));
  8. COLOR.rgb = textureLod(screen_texture, uv, 0.0).rgb;
  9. }