how to view pixelation through camera2D?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By CakeLover

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:

enter image description here

The end product should maybe look something like this:
enter image description here

:bust_in_silhouette: Reply From: rossunger

I tried that but I can’t get it to pixelate

remember the pixelation should be seen through the camera

CakeLover | 2022-02-06 15:44