Pixelate 3D Effect

Shader that creates a pixelation effect.

Shader code
shader_type canvas_item;

uniform float Pixel_Size : hint_range(1.0, 32.0) = 8.0;
uniform sampler2D SCREEN_TEXTURE : hint_screen_texture;

void fragment() {
    vec2 screen_res = vec2(1.0) / SCREEN_PIXEL_SIZE; 
    vec2 uv = SCREEN_UV;

    uv = floor(uv * screen_res / Pixel_Size) * Pixel_Size / screen_res;

    COLOR = texture(SCREEN_TEXTURE, uv);
}
Tags
pixelate
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from AivanWorld

OldSchoolDiffuseShader

CrossHairPoint (Round) : Godot 4.3

Screen Warping

Related shaders

Pixelate Screen Effect

Scratch pixelate effect

Pixelate Postprocess

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments