11 lines
325 B
Plaintext
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));
|
|
}
|