0 votes

I am currently using the pixalize shader from the 2d screen space shader demo:

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?

asked Mar 26 in Engine by TobiLa (167 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.