mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-10 16:04:04 +00:00
171cd4a840
Introduce arena_02 (Nebula) and arena_03 (Asteroid Field) alongside arena_01, listed in a new ArenaRegistry (scripts/arena_registry.gd) as the single source of truth for available arenas. Free Play lets the player pick an arena from the main menu; Match/Spectate each pick one at random per session; Training keeps its own fixed arena_01. Nebula gets an RL-style visual treatment: a near-invisible glass boundary material shared by all arenas, a baked equirect nebula sky texture, a drifting-dust particle system, and a Blender-modeled station/debris/planet decoration set. GameMode gains a _get_arena_scene_path() hook so modes can instantiate their arena in code instead of hardcoding it in the scene.
18 lines
590 B
Plaintext
18 lines
590 B
Plaintext
shader_type sky;
|
|
|
|
// Procedural dusty void: dim rocky-belt haze with a warm horizon glow, sparser
|
|
// stars than arena_01 for a grittier, more enclosed feel.
|
|
void sky() {
|
|
vec3 dir = EYEDIR;
|
|
vec3 col = vec3(0.015, 0.012, 0.01);
|
|
col += vec3(0.09, 0.05, 0.02) * pow(1.0 - abs(dir.y), 4.0);
|
|
vec3 cell = floor(dir * 220.0);
|
|
float h = fract(sin(dot(cell, vec3(12.9898, 78.233, 45.164))) * 43758.5453);
|
|
if (h > 0.9985) {
|
|
vec3 in_cell = fract(dir * 220.0) - 0.5;
|
|
float star = smoothstep(0.35, 0.0, length(in_cell));
|
|
col += vec3(star * (0.4 + fract(h * 999.0)) * 0.8);
|
|
}
|
|
COLOR = col;
|
|
}
|