Phase 5 updates

Phase 5 · Slice 11 ·

The editor’s RenderSettings and skyboxes

  • The MCP editor keeps a scene's RenderSettings:
    • a set_render_settings command (undoable and reviewable, checked against RenderSettings' property names; null resets one);
    • scene_open reads them from .unity scenes and from JSON scenes ({"renderSettings", "objects"}), and scene_query shows the ones that differ from the defaults;
    • play mode applies them before Awake;
    • scene_save patches only the changed fields of the .unity file's RenderSettings document, or writes the JSON object form;
    • sessions handed to a new build keep them.
  • Skyboxes:
    • Skybox/Procedural uses our own sky model with Unity's parameters: tint, ground, exposure, atmosphere thickness, and a simple or high-quality sun disk following the main light;
    • Skybox/Panoramic (latitude-longitude, Unity's orientation) and Skybox/6 Sided, both with tint, exposure and rotation;
    • cameras clearing to the skybox draw it behind everything, or their background color without one;
    • in the skybox ambient mode, the ambient light (trilight, from cosine-weighted sky averages) and reflections come from the sky, integrated on the CPU and cached.
  • RenderSettings and skybox behavior:
    • RenderSettings.skybox is Default-Skybox in scenes from files, and none in scenes made with CreateScene (as Unity records);
    • a skybox material's edits show at once;
    • a scene's "skybox" is "Default-Skybox", "None", an asset, or an inline material;
    • .mat files with Unity's built-in skybox shaders import.
  • Materials take per-shader property defaults (Panoramic's exposure is 1, Procedural's 1.3).
  • 3D physics builds colliders in creation order, not hash order. Contact callback order no longer depends on handle values, as 2D physics already did.
  • render_settings now also records the skybox shaders' defaults, a script-set skybox, a scene's own skybox material (NESky.mat), and clearing it.
  • GPU tests check the procedural sky against its CPU model (within 3/255), the panorama's orientation, and the six faces with rotation. MCP e2e tests cover editing, playing and saving RenderSettings, and cameras showing the default, a tinted and no skybox.
  • Not yet: Skybox/Cubemap (no cubemap textures yet), the Skybox component on cameras, reflection probes, and fog on the skybox (Unity doesn't fog it either).
  • Next: cubemap textures (Cubemap, .hdr/.exr import), then reflection probes.