1
1
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:
2025-09-06 22:45:48 +08:00
parent 5b9c87acd5
commit 2d42eaea9a
2 changed files with 15 additions and 4 deletions
+2 -1
View File
@@ -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;
}
}