Draw a real sky, horizon haze and sky ambient #79

Open
opened 2026-10-20 08:49:25 +00:00 by sermuns · 2 comments
Owner

The sky is an unlit sphere filled with the fog color
(liuverse-render/src/renderer.rs), plus one unlit moon sphere. Daytime fog is
switched off entirely (fog_on = !(frame.daytime || frame.rts)), and the
procedural sky and sun disc are in ARCHITECTURE.md's Dropped list. Ambient is one
flat color multiplied into every surface.

The result is the biggest single limit on the look: a flat blue backdrop, a hard
line where the baked ground ends, and roofs that shade exactly like the walls
under them.

What it needs:

  • A sky pipeline that shades the existing sky sphere (or a fullscreen triangle
    using view_proj_inv) from the view ray: zenith-to-horizon gradient, sun disc
    with a glow, stars at night.
  • One color source, so the horizon color feeds fog_color and the daytime haze.
    Keep haze on by day and only fade its strength; the current hard horizon exists
    because fog is binary.
  • Hemispheric ambient: sky color for upward normals, a ground-bounce color for
    downward ones, replacing G.ambient in the shared fragment. Near-free and it
    gives every roof, slab underside and facade readable form.

Do this before the sky is asked to do reflections (#91) or weather (#48).

Related: #7 is the broad lighting revamp this is the cheap half of. #39 and #64
are what night should look like once there is a sky to be dark. #48 would fall from it.

The sky is an unlit sphere filled with the fog color (`liuverse-render/src/renderer.rs`), plus one unlit moon sphere. Daytime fog is switched off entirely (`fog_on = !(frame.daytime || frame.rts)`), and the procedural sky and sun disc are in ARCHITECTURE.md's Dropped list. Ambient is one flat color multiplied into every surface. The result is the biggest single limit on the look: a flat blue backdrop, a hard line where the baked ground ends, and roofs that shade exactly like the walls under them. What it needs: - A `sky` pipeline that shades the existing sky sphere (or a fullscreen triangle using `view_proj_inv`) from the view ray: zenith-to-horizon gradient, sun disc with a glow, stars at night. - One color source, so the horizon color feeds `fog_color` and the daytime haze. Keep haze on by day and only fade its strength; the current hard horizon exists because fog is binary. - Hemispheric ambient: sky color for upward normals, a ground-bounce color for downward ones, replacing `G.ambient` in the shared fragment. Near-free and it gives every roof, slab underside and facade readable form. Do this before the sky is asked to do reflections (#91) or weather (#48). Related: #7 is the broad lighting revamp this is the cheap half of. #39 and #64 are what night should look like once there is a sky to be dark. #48 would fall from it.
sermuns added this to the Rendering milestone 2026-10-20 08:49:25 +00:00
Author
Owner

The sky is real now. The haze and the ambient are not.

The sky is its own pipeline: a zenith-to-horizon gradient under a procedural 360 degree cloud panorama that drifts with the view and fades into the fog color at the horizon (9869e30; the panorama is painted at startup, so no bytes ship). The palette now blends with the day and night fade, so the sky fades with the light (#92).

What is still missing is the rest of this issue:

  • The daytime haze. Fog is still switched off entirely during the day, so the hard line where the baked ground ends is still there in daylight.
  • The hemispheric ambient. One flat ambient color still multiplies into every surface, so roofs and slab undersides shade exactly like the walls above them.
  • The sun disc and the stars. The sun disc is on the dropped list.
The sky is real now. The haze and the ambient are not. The sky is its own pipeline: a zenith-to-horizon gradient under a procedural 360 degree cloud panorama that drifts with the view and fades into the fog color at the horizon (`9869e30`; the panorama is painted at startup, so no bytes ship). The palette now blends with the day and night fade, so the sky fades with the light (#92). What is still missing is the rest of this issue: - The daytime haze. Fog is still switched off entirely during the day, so the hard line where the baked ground ends is still there in daylight. - The hemispheric ambient. One flat ambient color still multiplies into every surface, so roofs and slab undersides shade exactly like the walls above them. - The sun disc and the stars. The sun disc is on the dropped list.
Author
Owner

Status check: unchanged. The sky pipeline (zenith gradient, drifting cloud panorama, horizon fading into fog_color, day/night palette blend) holds, but the rest is still open: daytime fog is still switched off entirely, ambient is still one flat color scaled by the baked ao channel, and there are no stars and no sun disc — the disc sits on ARCHITECTURE.md's dropped list.

Status check: unchanged. The sky pipeline (zenith gradient, drifting cloud panorama, horizon fading into `fog_color`, day/night palette blend) holds, but the rest is still open: daytime fog is still switched off entirely, ambient is still one flat color scaled by the baked `ao` channel, and there are no stars and no sun disc — the disc sits on ARCHITECTURE.md's dropped list.
Sign in to join this conversation.
No description provided.