Add wipe to stomachs
This commit is contained in:
1 parent
b7542cd706
commit
2cc144229f
2 files changed
+46
-2
No files matched your search
@@ -0,0 +1,19 @@
|
||||
shader_type canvas_item;
|
||||
|
||||
uniform float percent;
|
||||
|
||||
float atan2(in float y, in float x) {
|
||||
bool s = (abs(x) > abs(y));
|
||||
if (s) {
|
||||
return 3.14159/2.0 - atan(x,y);
|
||||
} else {
|
||||
return atan(y,x);
|
||||
}
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
float angle = atan2((UV.y - 0.5) , (UV.x - 0.5));
|
||||
float alpha = step(percent * 3.14159 * 2.25, angle + 3.14159);
|
||||
vec4 color = texture(TEXTURE, UV);
|
||||
COLOR = vec4(color.rgb, color.a * alpha);
|
||||
}
|
||||
Reference in new issue
Block a user