Lo-res pixelart'y look in 3d with shaders?

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

Those of you who know about shaders, how can I modify the following simple pixellation screen shader to limit the color range? It creates a ‘mosaic’ effect , which is somewhat what I want, but because it doesn’t limit the colors, the final effect is just basically low res but without the retro feel. I think if this was combined with a cap on colors and higher saturation, it would be fine. I’m trying to replicate the Ex Zodiac look.

shader_type canvas_item;

uniform float size_x = 0.008;
uniform float size_y = 0.008;

void fragment() {
	vec2 uv = SCREEN_UV;
	uv -= mod(uv, vec2(size_x, size_y));

COLOR.rgb = textureLod(SCREEN_TEXTURE, uv, 0.0).rgb;


THis here https://twitter.com/BcubedLabs/status/1077345409104670720 is exactly what I’m going for.

From what I can guess, the depth of the color range needs to be limited, e.g. uses only 8-bits. Unfortunately, I can’t figure out how to limit it.

Ertain | 2020-03-13 17:45