Add centered main menu with bokeh backdrop and Escape navigation

This commit is contained in:
Codex
2026-10-30 12:31:52 +02:00
parent 1a90e1ad21
commit 2df499ab7a
10 changed files with 208 additions and 42 deletions
+18 -1
View File
@@ -2,6 +2,10 @@ shader_type canvas_item;
uniform float katya = 0.0;
uniform float mother = 0.0;
uniform float energy = 0.0;
uniform float menu_bokeh = 0.0;
float seed(float n) {
return fract(sin(n * 127.1) * 43758.5453);
}
void fragment() {
vec2 uv = UV;
vec3 base = vec3(0.004, 0.004, 0.006);
@@ -14,7 +18,20 @@ void fragment() {
vec3 pink = vec3(0.60,0.16,0.34) * katya;
vec3 violet = vec3(0.35,0.17,0.65) * mother;
vec3 glow = pink * left + violet * right;
base += glow * (0.23 + wave*0.13);
base += glow * (0.23 + wave*0.13*(1.0-menu_bokeh));
base += vec3(0.004,0.003,0.006)*exp(-length((uv-0.5)*1.5));
if (menu_bokeh > 0.0) {
float aspect = SCREEN_PIXEL_SIZE.y / SCREEN_PIXEL_SIZE.x;
for (int i = 0; i < 18; i++) {
float n = float(i) + 1.0;
vec2 center = vec2(seed(n),seed(n+21.0));
center += vec2(sin(TIME*0.055+n),cos(TIME*0.045+n*1.7))*0.025;
float radius = mix(0.025,0.08,seed(n+43.0));
float distance = length((uv-center)*vec2(aspect,1.0));
float disc = 1.0-smoothstep(radius*0.3,radius*1.65,distance);
vec3 tint = mix(vec3(0.58,0.20,0.36),vec3(0.35,0.23,0.62),seed(n+62.0));
base += tint*disc*0.20*menu_bokeh;
}
}
COLOR = vec4(base,1.0);
}