mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-22 03:22:30 +08:00
feat: 更新CooldownProgress着色器,添加trailAlpha参数以增强透明度控制
This commit is contained in:
@@ -3,12 +3,13 @@ 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;
|
||||
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)*0.5;
|
||||
COLOR.rgb*=1.0+(trailHeight/(progress-UV.y)-1.0)*trailAlpha;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user