18 lines
312 B
Plaintext
18 lines
312 B
Plaintext
shader_type canvas_item;
|
|
|
|
uniform bool useTexture = false;
|
|
uniform float progress = 0;
|
|
uniform vec3 color;
|
|
uniform sampler2D tex;
|
|
|
|
void fragment() {
|
|
if (distance(UV, vec2(0.5, 0.5)) > 0.8 - progress){
|
|
COLOR = vec4(color, 1.0);
|
|
if (useTexture){
|
|
COLOR = texture(tex, UV);
|
|
}
|
|
}else{
|
|
COLOR.a = 0.0;
|
|
}
|
|
}
|