Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | TobiLa |
Hey,
I am currently using the pixalize shader from the 2d screen space shader demo:
https://godotengine.org/asset-library/asset/122
I additionally want to have only 16 or 8 bit colors, but I have no idea how to do this, but I suspect this would only be a few lines of additional shader code.
shader_type canvas_item;
uniform float size_x = 0.006;
uniform float size_y = 0.006;
void fragment() {
vec2 uv = SCREEN_UV;
uv -= mod(uv, vec2(size_x, size_y));
COLOR.rgb = textureLod(SCREEN_TEXTURE, uv, 0.0).rgb;
}
Can someone help me out?