mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-11 22:27:12 +08:00
feat(子弹效果): 增强彩虹子弹和光枪的视觉效果
- 修改彩虹子弹的着色器参数和颜色处理 - 更新光枪的着色器和材质参数 - 调整熊角色攻击时的子弹数量 - 优化粒子效果和材质设置
This commit is contained in:
@@ -8,6 +8,7 @@ uniform float wave_frequency : hint_range(1.0, 20.0) = 8.0; // 波频率
|
||||
uniform float wave_amplitude : hint_range(0.1, 2.0) = 0.5; // 波幅度
|
||||
uniform float wave_width : hint_range(0.01, 0.5) = 0.1; // 波宽度
|
||||
uniform float edge_nonalpha:hint_range(0.0, 1.0, 0.01)=0.25;
|
||||
uniform float alpha:hint_range(0.0, 1.0, 0.01)=1.0;
|
||||
void fragment() {
|
||||
vec2 uv = UV - vec2(0.5, 0.0);
|
||||
float dist = abs(uv.x) / width;
|
||||
@@ -21,4 +22,5 @@ void fragment() {
|
||||
vec3 base_color = mix(vec3(1.0), laser_color.rgb, 1.0 - laser_intensity);
|
||||
vec3 color = base_color + vec3(wave_intensity);
|
||||
COLOR = vec4(color,smoothstep(0,1.0-edge_nonalpha,(0.5-x_dist)/0.5));
|
||||
COLOR.a*=alpha;
|
||||
}
|
||||
@@ -1,8 +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,0.5);
|
||||
COLOR=mix(COLOR,mixed,mixProgress);
|
||||
}
|
||||
Reference in New Issue
Block a user