I'm trying to create a pixelation shader which I can view through the camera2D
node
something like this but instead of black and white I need pixelation
using this answer I got a pixelation shader but how do I view it through the camera?
shader_type canvas_item;
uniform float size_x = 32.0; // blocks by x direction
uniform float size_y = 32.0; // blocks by y direction
void fragment() {
COLOR = texture(TEXTURE, vec2(floor(UV.x * size_x) / (size_x - 1.0), floor(UV.y * size_y) / (size_y - 1.0)));
}
the structure of my nodes is same as in the above video link:

The end product should maybe look something like this:
