Screentone scene transition

In Color is the color of transition in effect
Out Color is the color of transition out effect

In Out set which color to pick, If the value greater than 0.5. The color will be Out color otherwise it will be the In color.

Position the a slide from -1.5 to 1 if it set to 1, whole screen will be reveal. If it -1.5, whole screen will be cover.

Size size of circles

Shader code
shader_type canvas_item;

uniform vec4 in_color:hint_color;
uniform vec4 out_color:hint_color;

uniform float in_out:hint_range(0.,1.)=0.;

uniform float position:hint_range(-1.5,1.) = 0.856;
uniform vec2 size = vec2(16., 16.);

void fragment(){
    vec2 a = (1./SCREEN_PIXEL_SIZE) / size;
    vec2 uv=UV;
    uv *= a;
    vec2 i_uv = floor(uv);
    vec2 f_uv = fract(uv);
    float wave = max(0.,i_uv.x/(a.x) - position);
    vec2 center = f_uv*2.-1.;
    float circle = length(center);
    circle = 1. - step(wave,circle);
    vec4 color = mix(in_color, out_color, step(0.5, in_out));
    COLOR=vec4(circle) * color;
screentone, transition
The shader code and all code snippets in this post are under CC0 license and can be used freely without the author's permission. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from vanviethieuanh

2D lightning

Related shaders

Screentone – Black spaced pixels

Glitch Transition

Lines Screen Transition

Notify of

1 Comment
Newest Most Voted
Inline Feedbacks
View all comments
Samuel Onome Harrison
Samuel Onome Harrison
2 years ago

Amazing. Thank you