Pixelate 3D Effect

Shader that creates a pixelation effect.

Shader code
shader_type canvas_item;
render_mode unshaded;

uniform sampler2D SCREEN_TEXTURE : hint_screen_texture, repeat_disable,filter_nearest;
uniform float pixel_size : hint_range(1.0, 16.0, 1.0) = 1.0;


void fragment(){
	float x = FRAGCOORD.x - mod(FRAGCOORD.x, pixel_size);
	float y = FRAGCOORD.y - mod(FRAGCOORD.y, pixel_size);
	COLOR = texture(SCREEN_TEXTURE, vec2(x,y) * SCREEN_PIXEL_SIZE);
}
	
	


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.

Related shaders

Pixelate Filter

Pixelate

Pixelate

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments