Guide4 min read4 sections

Authored skies and hemisphere light

docs/SKY.mdSource updated 2026-10-25
Markdown
On this page 4 sections

Places can now carry a static authored sky: a zenith-to-horizon gradient, a lower ground reflection, a soft sun disc/glow and diffuse ambient light shaped by the surface normal. The sky shares the place's existing sun direction and brightness. It is rendered in the owned WebGPU pipeline on the main thread and in the graphics Worker, including destination portal views.

#In the editor

For changing daylight, use the shared day/night cycle. An enabled cycle overrides the static sky and broad lighting while retaining their saved values.

Open Atmosphere and choose Quiet morning, Golden hour or After dark. A mood now fills both the existing atmosphere controls and its matching sky. Under Sky & horizon, enable or disable the sky, choose the four colors and adjust sun radius, glow and sky light. The existing sun direction/brightness controls affect both the sky and directional lighting.

Preview atmosphere stages the change in the atelier. Save persists it; Apply activates the saved revision for the shared development room. Published worlds retain the authored sky through their immutable place-content manifest. Closing the dialog or discarding a preview does not save it. Saved undo/redo restores the previous sky and, when required, the prior source format.

Disabling the sky restores the retained flat fog background and removes its diffuse contribution. Other atmosphere settings remain as authored. Sky light controls surface illumination, independently of the background's gradient. Colors retain their original numeric values when a saved dialog is reopened; merely viewing the color pickers does not quantize the saved source.

#Source and compatibility

World format 18, compiler sky-world.18, adds optional place.sky:

ts
sky: {
  zenith: [.055, .22, .42],
  horizon: [.63, .78, .81],
  ground: [.12, .16, .13],
  sunColor: [1, .91, .72],
  sunSize: .55,
  sunGlow: .65,
  intensity: .3,
}

All color components must be finite RGB values from 0 to 1. sunSize is an angular radius in degrees, from 0.05 to 3. sunGlow and intensity are finite values from 0 to 4. Unknown fields, sparse/invalid colors and nonfinite values reject. A sky needs a nonzero sun direction. Values are copied at admission.

The public authoring command is {kind:'set-sky', place, value}; value:null removes it. The command uses ordinary preview, review, disjoint-merge and saved-history transactions. Concurrent changes to the same sky conflict; unrelated place/object edits retain their normal merge rules. Capturing an object arrangement omits the surrounding place's sky, like its other ambient effects.

World formats 1–17 remain readable and reject a sky field. Presentation format 11 carries the optional sky; earlier presentation profiles remain accepted and cannot carry it. Producers select the necessary profile. Texture/model/content-manifest and checkpoint wire formats do not change. A compiled format-18 checkpoint binds the new compiler/content signature, while live compatible sky changes preserve gameplay entities and state.

#Rendering contract

The sky is one fullscreen triangle at far depth, without depth writes. Ordinary scene geometry occludes it. It is evaluated from the camera's direction and field of view: translating the camera cannot move the sky. Each portal's destination camera/environment controls its own sky, and the destination retains the existing linear-HDR composition path.

The sky contributes a bounded diffuse hemisphere term to existing PBR lighting; its sun color also tints the existing directional light. Fog, material occlusion, shadowing, particles and tone mapping retain their existing roles. The gradient and glow have no simulation clock, random seed or gameplay authority.

There are no sky textures, per-edit GPU allocations or new frame targets. The existing global uniform buffer grows by 112 bytes per renderer. An enabled sky adds one draw call; disabled skies retain the prior draw count. The sky pipeline participates in the existing complete shader-bundle validation and last-good replacement mechanism. Device reconstruction uses the accepted presentation environment.

This is a static artistic sky and diffuse lighting capability. HDR environment maps, specular image-based lighting, clouds, weather, physical atmospheric scattering and named-device performance qualification remain open. It does not complete the renderer/environment milestones or the final character/environment art pass.

#Acceptance

Acceptance evidence records schema/legacy admission, checkpoint/live-revision preservation, saved undo across restart, arrangement compatibility, real main/Worker pixel studies, editor controls, shared publication and graphics recovery. Native checks distinguish depth occlusion, diffuse-light influence, view rotation, translation invariance and exact device reconstruction. The rendered terrace is a diagnostic scene, not the final game art direction.

End of Sky