mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
refactor(UI): 调整技能图标布局并优化冷却效果
修改技能图标面板的锚点设置以改善布局 将冷却进度着色器逻辑反转并优化视觉效果 统一材质管理方式,移除重复的材质复制
This commit is contained in:
@@ -5,11 +5,15 @@ 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;
|
||||
uniform float trailAlpha:hint_range(0.0, 1.0, 0.01)=0.5;
|
||||
void fragment() {
|
||||
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)*trailAlpha;
|
||||
if(UV.y>=1.0-progress){
|
||||
if(1.0-progress+trailHeight-UV.y>0.0){
|
||||
float dist=distance(UV.y,1.0-progress);
|
||||
COLOR=vec4(1);
|
||||
COLOR.a=(trailHeight-dist)/trailHeight*trailAlpha;
|
||||
}else{
|
||||
COLOR.a*=backAlpha;
|
||||
}
|
||||
}else if(distance(UV.y,1.0-progress)<edgeHeight){
|
||||
COLOR=vec4(1.0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user