Pixelize

Pixelizes a texture to the given resolution

Uniforms:
Resolution: The resolution to be scaled down to

Note:
I am trying to get a screen-reading version working as I think that would have more use

Shader code
shader_type canvas_item;

// --- Uniforms --- //
uniform float resolution: hint_range(0.0, 128.0, 1.0) = 32.0;

// --- Functions --- //
void fragment() {
	COLOR = texture(TEXTURE, round(UV * (resolution + 1.0) - (UV - 0.5)) / (resolution + 1.0));
}
Tags
downscale, pixel, pixel-art, pixelize
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 KingToot

Burn/Dissolve

Invert Color

Radial Blur

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments