mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-06-29 23:12:28 +08:00
feat(武器系统): 添加七彩矢武器及其相关资源
添加新的七彩矢武器系统,包括武器脚本、子弹特效、着色器和动画资源 为Rooster角色添加新武器选项 实现光效追踪和颜色渐变效果 调整窗口模式为2(全屏)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
shader_type canvas_item;
|
||||
uniform vec4 color:source_color;
|
||||
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);
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
shader_type canvas_item;
|
||||
uniform float k : hint_range(-10.0, 10.0) = 1.0;
|
||||
uniform vec4 color : source_color = vec4(1.0);
|
||||
uniform float scale : hint_range(10.0, 500.0) = 100.0;
|
||||
void fragment() {
|
||||
vec2 pos = (UV - 0.5) * scale;
|
||||
float y1 = k / pos.x;
|
||||
float y2 = -k / pos.x;
|
||||
bool in_region = false;
|
||||
if (pos.x > 0.0) {
|
||||
if ((pos.y > y2 && pos.y < y1) || (pos.y < y2 && pos.y > y1)) {
|
||||
in_region = true;
|
||||
}
|
||||
}
|
||||
else if (pos.x < 0.0) {
|
||||
if ((pos.y > y1 && pos.y < y2) || (pos.y < y1 && pos.y > y2)) {
|
||||
in_region = true;
|
||||
}
|
||||
}
|
||||
if (in_region) {
|
||||
COLOR = color;
|
||||
} else {
|
||||
COLOR = vec4(0.0);
|
||||
}
|
||||
COLOR.a*=(0.5-distance(UV,vec2(0.5)))/0.5;
|
||||
}
|
||||
Reference in New Issue
Block a user