mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-27 22:41:56 +08:00
77f3d5e4a1
- 移除进度值的clamp限制,允许超出范围效果 - 为冷却进度着色器添加边缘高光和拖尾效果 - 调整图标容器圆角和最小尺寸 - 更新材质参数以支持新的着色器效果
16 lines
550 B
Plaintext
16 lines
550 B
Plaintext
shader_type canvas_item;
|
|
uniform float progress:hint_range(0.0, 2.0, 0.01)=0.5;
|
|
uniform float backAlpha:hint_range(0.0, 1.0, 0.01)=0.25;
|
|
uniform float edgeHeight:hint_range(0.0, 1.0, 0.01)=0.05;
|
|
uniform float trailHeight:hint_range(0.0, 1.0, 0.01)=0.3;
|
|
void fragment() {
|
|
COLOR=texture(TEXTURE,UV);
|
|
if(UV.y>=progress){
|
|
COLOR.a*=backAlpha;
|
|
}else if(distance(UV.y,progress)<edgeHeight){
|
|
COLOR.rgb*=255.0;
|
|
}else if(progress-UV.y<=trailHeight){
|
|
COLOR.rgb*=1.0+(trailHeight/(progress-UV.y)-1.0)*0.5;
|
|
//COLOR.a*=(progress-UV.y)/trailHeight;
|
|
}
|
|
} |