Retro Screen Lines

uhm. idk how to describe this one.

 

anyways uhm lets go look to the params,

lineCount is how many black lines there should be.

timeSpeed is how fast it moves.

and darknessMult is how visible the lines are.

Shader code
shader_type canvas_item;

uniform int lineCount : hint_range(2, 9000) = 70;
uniform float darknessMult : hint_range(0.0, 1.0) = 0.25;
uniform float timeSpeed : hint_range(1.0, 65.0) = 6.5;

void fragment() {
	float wave = cos(UV.y*PI*float(lineCount)+(TIME*timeSpeed));
	float slowwave = cos(UV.y*PI*float(lineCount/50)+(TIME*timeSpeed/2.5));
	float square = round(wave);
	vec4 retroLines = vec4(
			square,
			square,
			square,
			((-square)*darknessMult)
		);
	vec4 darkwaves = vec4(0.0,0.0,0.0,((-slowwave)*darknessMult/2.0));
	COLOR = (darkwaves + retroLines) / 5.0;
}
Tags
lines, retro, screen
The shader code and all code snippets in this post are under MIT license and can be used freely. Images and videos, and assets depicted in those, do not fall under this license. For more info, see our License terms.

More from imakeshaders

Vignette

Stepped Gradient

Related shaders

Lines Screen Transition

Scan lines

Speed Lines Shader for Godot 4

Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments