mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-07-11 12:32:54 +08:00
feat: 添加VerticalSoften着色器,增强透明度控制逻辑
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
shader_type canvas_item;
|
||||
uniform vec2 percent=vec2(0,1);
|
||||
void fragment(){
|
||||
COLOR=vec4(0,0,0,1);
|
||||
if(UV.y<percent.x){
|
||||
COLOR.a*=UV.y/percent.x;
|
||||
}else if(UV.y>percent.y){
|
||||
COLOR.a*=1.0-(distance(UV.y,percent.y))/(1.0-percent.y);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user