Pixelize / Mosaic (overlay)

Yet another pixelize shader, this one was made specifically for full-screen overlays utilizing SCREEN_TEXTURE.

Shader code
shader_type canvas_item;
uniform float amount: hint_range(1.0, 640.0, 1.0);

void fragment() 
{
	vec2 amt = 1.0 / amount / SCREEN_PIXEL_SIZE;
	vec2 uv = round(SCREEN_UV * amt) / amt;
	vec4 c = textureLod(SCREEN_TEXTURE, uv, 0);
	
	COLOR = c;
}
Tags
3.x
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.

Related shaders

Pixelize

Mosaic/Pixelization Effect Shader

Scratch mosaic effect

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments