SHADERS for absolute N00BS  in Godot @CallousCoder
SHADERS for absolute N00BS  in Godot  @CallousCoder
Uploaded October 2023 | Updated September 2026, 8 hours ago
Today we will start you off with a 2D fragment #shader in #GODOT by writing very simple pixelate and chromatic aberration shader. If you can't follow this, you may need to go back to high school and learn more #maths

Code:

shader_type canvas_item;
uniform float pixel = 0.008;

vec4 pixelate(sampler2D t, vec2 uv, float p_fact){
uv += -1.*mod(uv, p_fact).xy;
vec4 color = texture(t, uv);
return color;
}

void fragment() {
vec2 uv = FRAGCOORD.xy / (1.0 / SCREEN_PIXEL_SIZE);

vec4 color = pixelate(TEXTURE, uv, pixel);

//chormatic ab
float ab_r = texture(TEXTURE, vec2(uv.x-sin(TIME*2.)*0.05, uv.y)).r;
float ab_b = texture(TEXTURE, vec2(uv.x+sin(TIME*5.)*0.05, uv.y)).b;

//eliptical mask
vec2 trans = 2.0 * uv - 1.0;
float mask = smoothstep(1.0, 0.1, dot(trans, trans));

color.r = mix(ab_r, color.r, mask);
color.b = mix(ab_b, color.b, mask);
COLOR = color;
}
SHADERS for absolute N00BS  in GodotSpecial Effects Silent Ice and Safe Glass GlassZig beginner part 2 Coding Game Genie code encoder (catch, parseInt, bit wise operations)Bargain, partially working SNES with none working Chinese EverdriveC64 Assembly Lesson 10 Raster Interrupts and SID TunesPitrex on the VectrexC64 Assembly lesson 3: push and pullA Big Message and a Gift to the Retro Geeksif (i % 2 0) MUST GO! RIGHT?!Installing IDE2IC and Gotek in classic 486RabbitMQ in Rust (RUSTY RABBITS)Arcade Outrun Longplay Every Stage (hacked machine)
CallousCoder |

SHADERS for absolute N00BS in Godot

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER