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);
}
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.

Related shaders

Slide Down & Up Text Effect

[2D]Radial Shine ver 1.0

Radial Shine Highlight

guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments