Slide to unlock shine shader
Made to replicate the shine/highlight effect of the “Slide to unlock” text present in iOS 1 thru 6. It’s kind of messy but it works.
Using it directly on labels produces strange results. It’s better to use this on a texture.
Shader code
shader_type canvas_item;
uniform float interval = 2.0;
void fragment() {
float shiner = mod(TIME,interval)-(interval/4.0);
COLOR.a *= 1.0 - min((clamp(abs((UV.x)-shiner),0.0,1.0)*2.0),0.7);
}
