初次提交

This commit is contained in:
2026-07-20 10:56:52 +08:00
commit 7bcc0026e0
462 changed files with 50191 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
// 竞技场地面网格:暗色基底 + 细网格线 + 中心放射暗角,提供空间参照与氛围
// 应用于覆盖竞技场的大 ColorRect/Polygon2DUV 0-1 映射全幅)
shader_type canvas_item;
uniform float grid_cells = 100.0;
void fragment() {
vec2 g = UV * grid_cells;
vec2 f = abs(fract(g) - 0.5);
float minor = smoothstep(0.47, 0.5, max(f.x, f.y));
// 粗线(每 10 格)
vec2 g2 = UV * (grid_cells / 10.0);
vec2 f2 = abs(fract(g2) - 0.5);
float major = smoothstep(0.46, 0.5, max(f2.x, f2.y));
vec3 base = vec3(0.085, 0.088, 0.115);
vec3 minorC = vec3(0.125, 0.130, 0.165);
vec3 majorC = vec3(0.180, 0.185, 0.240);
vec3 col = mix(base, minorC, minor);
col = mix(col, majorC, major);
// 径向渐暗(边缘更暗,聚焦中心)
float vig = 1.0 - smoothstep(0.25, 0.75, length(UV - vec2(0.5)));
col *= mix(0.6, 1.15, vig);
COLOR = vec4(col, 1.0);
}
+1
View File
@@ -0,0 +1 @@
uid://c0qkjbreng77e
+12
View File
@@ -0,0 +1,12 @@
// 子弹发光圆:加法混合 + 软核 + 外发光(bullet-heaven 弹幕质感)
// 应用于 BulletManager 的 MultiMeshInstance2D(单位 QuadMeshUV 0-1
shader_type canvas_item;
render_mode blend_add;
void fragment() {
float d = length(UV - vec2(0.5)) * 2.0; // 0=中心 1=边缘
float core = smoothstep(1.0, 0.45, d); // 实心核
float glow = smoothstep(1.0, 0.0, d) * 0.5; // 外发光晕
float a = clamp(core + glow, 0.0, 1.0);
COLOR = vec4(COLOR.rgb, COLOR.a * a);
}
+1
View File
@@ -0,0 +1 @@
uid://verwtea1o32v
+16
View File
@@ -0,0 +1,16 @@
// 敌人实体圆:普通 alpha 混合 + 软边 + 高光边缘(区别于发光子弹)
// 应用于 EnemyManager 的 MultiMeshInstance2Dper-instance 颜色经 COLOR 传入)
shader_type canvas_item;
void fragment() {
float d = length(UV - vec2(0.5)) * 2.0; // 0=中心 1=边缘
float body = smoothstep(1.0, 0.82, d); // 软边实心圆
// 内高光:靠上方偏亮,营造球体体积感
vec2 hi = UV - vec2(0.38, 0.34);
float spec = smoothstep(0.42, 0.0, length(hi)) * 0.35;
vec3 col = COLOR.rgb + spec;
// 暗边描线
float rim = smoothstep(0.72, 0.95, d) * 0.25;
col = mix(col, col * 0.55, rim);
COLOR = vec4(col, COLOR.a * body);
}
+1
View File
@@ -0,0 +1 @@
uid://b0vpvsbw3klw2