Files
uniqlone/assets/foreground_invert.gdshader
2026-06-13 16:08:36 -04:00

11 lines
325 B
Plaintext

shader_type canvas_item;
uniform float transition : hint_range(0.0, 1.0) = 0.0;
uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest;
void fragment() {
vec4 c = texture(screen_texture, SCREEN_UV);
vec3 inverted = vec3(1.0) - c.rgb;
COLOR.rgb = mix(c.rgb, inverted, vec3(transition));
}