mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-24 20:42:30 +08:00
feat(核弹): 添加核弹警告背景并调整爆炸效果
为核弹添加半透明警告背景环,调整爆炸震动强度从500降至300 新增填充环和光照着色器,用于视觉效果 将核弹作为公鸡角色的默认武器
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
shader_type canvas_item;
|
||||
uniform float inner:hint_range(0.0, 1.0, 0.01)=0.5;
|
||||
uniform float outer:hint_range(0.0, 1.0, 0.01)=0.75;
|
||||
uniform float alpha:hint_range(0.0, 1.0, 0.1)=0.5;
|
||||
void fragment() {
|
||||
vec2 center=vec2(0.5);
|
||||
float dist=distance(UV,center)*2.0;
|
||||
if(dist<inner){
|
||||
COLOR.a*=alpha;
|
||||
}else{
|
||||
COLOR.a*=float(inner<dist&&dist<outer);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
shader_type canvas_item;
|
||||
uniform vec4 color:source_color;
|
||||
uniform float mixProgress:hint_range(0.0, 1.0, 0.01)=0.5;
|
||||
void fragment() {
|
||||
float maxDistance=0.5;
|
||||
float dist=distance(UV,vec2(0.5));
|
||||
vec4 mixed=vec4(color.rgb,smoothstep(0,1,(maxDistance-dist)/maxDistance));
|
||||
COLOR=mix(COLOR,mixed,mixProgress);
|
||||
}
|
||||
Reference in New Issue
Block a user