shader_type spatial; render_mode unshaded, fog_disabled, cull_front, shadows_disabled; // The Demon Realm's open sky (demon_biome.gd, user 2026-11-16: "it shouldn't // be as closed off"): a dome about the walker, black overhead, deep red lower // down, a hot haze on the horizon (the fog's colour, so the far ground melts // into it) and a fiercer glow toward the fortress. Dark clouds drift over it, // lit red from below. uniform sampler2D clouds : filter_linear, repeat_enable; uniform vec3 glow_dir = vec3(0.0, 0.0, -1.0); uniform vec3 top_col : source_color = vec3(0.012, 0.004, 0.004); uniform vec3 mid_col : source_color = vec3(0.13, 0.025, 0.015); uniform vec3 horizon_col : source_color = vec3(0.42, 0.1, 0.035); uniform vec3 glow_col : source_color = vec3(1.0, 0.38, 0.08); varying vec3 dir; void vertex() { dir = VERTEX; } void fragment() { vec3 d = normalize(dir); float h = d.y; vec3 col = mix(horizon_col, mid_col, smoothstep(0.0, 0.22, h)); col = mix(col, top_col, smoothstep(0.18, 0.65, h)); // The glow on the horizon toward the fortress. vec2 flat_dir = normalize(d.xz + vec2(0.0001)); float toward = max(dot(flat_dir, normalize(glow_dir.xz)), 0.0); float glow = pow(toward, 5.0) * exp(-max(h, 0.0) * 6.0); col += glow_col * glow * 0.55; // Clouds on a flat ceiling far up, thinning toward the horizon. vec2 uv = d.xz / (max(h, 0.03) + 0.1) * 0.05; float n = texture(clouds, uv + vec2(TIME * 0.0035, TIME * 0.0012)).r; float n2 = texture(clouds, uv * 2.7 - vec2(TIME * 0.006, 0.0)).r; float shape = n * 0.7 + n2 * 0.3; float cover = smoothstep(0.38, 0.6, shape) * smoothstep(-0.01, 0.1, h); // Their ragged edges and undersides catch the fire below. float edge = smoothstep(0.38, 0.48, shape) * (1.0 - smoothstep(0.5, 0.66, shape)); float underlit = (1.0 - smoothstep(0.0, 0.4, h)) * 0.6 + glow + edge * 0.8; vec3 cloud = mix(vec3(0.018, 0.004, 0.003), vec3(0.5, 0.1, 0.03), clamp(underlit, 0.0, 1.0)); col = mix(col, cloud, cover * 0.92); // Below the horizon: the haze the lava sea fades into. col = mix(col, horizon_col + glow_col * glow * 0.3, smoothstep(0.0, -0.06, h)); ALBEDO = col; }