SPEEDLINES

SPEEDLINES

SPEEDLINES

SPEEDLINES

(It’s just a noise texture zooming by really fast)

SPEEDLINES

Shader code
shader_type canvas_item;

uniform sampler2D noise;
uniform vec4 line_color_a: hint_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform vec4 line_color_b: hint_color = vec4(0.0, 1.0, 1.0, 1.0);
uniform float line_threshold = 0.6;
uniform float inverse_speed = 10.0;
uniform float line_length = 1000.0;
uniform float angle: hint_range(0.0, 360.0) = 0.0;


void fragment() {
	vec2 uv = vec2(UV.x * cos(radians(angle)) - UV.y * sin(radians(angle)), UV.x * sin(radians(angle)) + UV.y * cos(radians(angle)));
	vec4 noise_line = texture(noise, vec2(uv.x / line_length + TIME / inverse_speed, uv.y));
	vec4 color;
	if (noise_line.r < line_threshold){
		color = vec4(0.);
	} else {
		color = mix(line_color_a, line_color_b, 1.0 - noise_line.r);
	}
	COLOR = color;
}
Tags
action line, action lines, actionlines, Anime, speed line, speed lines, speedline, speedlines
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 Exuin

Moving Rainbow Gradient

Lines Screen Transition

Palette Swap (no recolor / recolor)

Related shaders

Radial Speedlines

Subscribe
Notify of
guest

2 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
PridefulOne
1 year ago

No longer works in 4.0, as hint_color was changed to source_color.

KyleKyleton
KyleKyleton
11 months ago

Use

uniform sampler2D noise : repeat_enable;

to prevent the shader from getting stuck when it reaches the end of the noise texture.