mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
a7d1264830
refactor: 修改能量恢复随机范围从0.01-0.15调整为0.01-0.1 style: 更新着色器进度范围提示从0.0-2.0改为-0.0-2.0 feat: 新增垂直颜色条组件和样式资源 chore: 恢复测试波次为普通模式
15 lines
545 B
Plaintext
15 lines
545 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;
|
|
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;
|
|
}
|
|
} |