pixelize.shader 222 B

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