Files
net-gunner/visuals/shaders/lowres-text.gdshader

30 lines
749 B
Plaintext

shader_type canvas_item;
uniform float tracks : hint_range(1, 200, 1) = 1;
uniform float vshift = 0;
uniform float max_offset = 1;
float random (vec2 uv) {
return fract(sin(dot(uv.xy,
vec2(12.9898,78.233))) * 43758.5453123);
}
void vertex() {
}
void fragment() {
// Called for every pixel the material is visible on.
vec2 uv = floor(UV * tracks);
vec2 rv = vec2(0.0, round(UV.y * 4.0) / 4.0 * 2.0);
rv.y += TIME;
float r = random(rv);
float r2 = random(-rv);
float brightness = .5 + .5 * r * mod(uv.y, 2.0) / 2.0;
COLOR.rgb = COLOR.rgb * brightness;
}
//void light() {
// // Called for every pixel for every light affecting the CanvasItem.
// // Uncomment to replace the default light processing function with this one.
//}