LANTERN realignment P3: one look everywhere + scene surgery

- PostFX_Lantern.asset: the ONE shared grade (ACES, bloom 0.6 cool-tinted for the
  HDR gloam, vignette 0.28, faint teal filter) applied to Game, DevSandbox, and
  ArtStaging; PostFX_DarkSciFi / PostFX_Daylight / Sky_DaytimeProcedural deleted.
- Env_SeabedKit.prefab: ArtStaging's environment (seabed, flora, rocks, marine
  snow, caustics, warm pool, gloam fill, key light, StagingAmbiance animator)
  prefab-ized and placed in Game + DevSandbox; ArtStaging connected to it.
- Scene surgery: old DevSandbox.unity deleted; Gym.unity RENAMED DevSandbox.unity
  (GUID preserved -> GymSub wiring + the F1/F2 dev scripts that gate on the
  'DevSandbox' name come back to life). SyntyWorld root deleted from DevSandbox;
  BaseBiome/ExpeditionBiome/Slot1 deleted from Game.
- RenderSettings unified: no skybox, Exp2 teal fog {0.02,0.10,0.12} @ 0.035, flat
  near-black ambient {0.03,0.055,0.08}; camera clearFlags -> solid deep-water.
- ScenePolicy.IsGameplayScene() replaces the six scene.name=="Game" string gates
  (Game + DevSandbox share the dynamic look; menu/ArtStaging untouched).
- WorldAtmosphereSystem rewritten as water-column murk (LANTERN defaults; biome
  variants re-meant to kelp/trench/gloam-bloom; Ground_Arid tint block deleted).

390 green; Play-verified in Game: murk values live, warm-vs-cold reads, no errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-15 16:12:00 -07:00
parent 77de740b63
commit c58439d33a
21 changed files with 7628 additions and 95935 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 1d4b5e92ac7b6ea4880d30545df94704 guid: 48885d98d8dbc3c47943402d0a455f21
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
+38 -79157
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1,5 +1,6 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 48885d98d8dbc3c47943402d0a455f21 guid: 0ebe15ac3d1a57d45ac9492075ce1fdb
folderAsset: yes
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:
@@ -1,8 +1,8 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: e1cd63d2feef80f45a168f477934722f guid: 853083b81213dfe438063c6d6d41e564
NativeFormatImporter: folderAsset: yes
DefaultImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 2100000
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -1,8 +1,7 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 669d41422347ed94785dd2515084828f guid: a56e554160baf224282f9467d6a5dfa0
NativeFormatImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 11400000
userData: userData:
assetBundleName: assetBundleName:
assetBundleVariant: assetBundleVariant:
@@ -1,200 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-4441572633185463556
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 97c23e3b12dc18c42a140437e53d3951, type: 3}
m_Name: Tonemapping
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.Tonemapping
active: 1
mode:
m_OverrideState: 1
m_Value: 1
neutralHDRRangeReductionMode:
m_OverrideState: 0
m_Value: 2
acesPreset:
m_OverrideState: 0
m_Value: 3
hueShiftAmount:
m_OverrideState: 0
m_Value: 0
detectPaperWhite:
m_OverrideState: 0
m_Value: 0
paperWhite:
m_OverrideState: 0
m_Value: 300
detectBrightnessLimits:
m_OverrideState: 0
m_Value: 1
minNits:
m_OverrideState: 0
m_Value: 0.005
maxNits:
m_OverrideState: 0
m_Value: 1000
--- !u!114 &-3245916173682126434
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
m_Name: Bloom
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.Bloom
active: 1
skipIterations:
m_OverrideState: 0
m_Value: 1
threshold:
m_OverrideState: 1
m_Value: 1.2
intensity:
m_OverrideState: 1
m_Value: 0.5
scatter:
m_OverrideState: 1
m_Value: 0.65
clamp:
m_OverrideState: 1
m_Value: 10
tint:
m_OverrideState: 1
m_Value: {r: 0.85, g: 0.92, b: 1, a: 1}
highQualityFiltering:
m_OverrideState: 1
m_Value: 1
filter:
m_OverrideState: 0
m_Value: 0
downscale:
m_OverrideState: 0
m_Value: 0
maxIterations:
m_OverrideState: 0
m_Value: 6
dirtTexture:
m_OverrideState: 0
m_Value: {fileID: 0}
dimension: 1
dirtIntensity:
m_OverrideState: 0
m_Value: 0
--- !u!114 &-2801731409977683993
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3}
m_Name: Vignette
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.Vignette
active: 1
color:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0, a: 1}
center:
m_OverrideState: 0
m_Value: {x: 0.5, y: 0.5}
intensity:
m_OverrideState: 1
m_Value: 0.2
smoothness:
m_OverrideState: 1
m_Value: 0.4
rounded:
m_OverrideState: 0
m_Value: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: PostFX_Daylight
m_EditorClassIdentifier: Unity.RenderPipelines.Core.Runtime::UnityEngine.Rendering.VolumeProfile
components:
- {fileID: -3245916173682126434}
- {fileID: -4441572633185463556}
- {fileID: 5577075502713826208}
- {fileID: -2801731409977683993}
- {fileID: 7928249266562162677}
--- !u!114 &5577075502713826208
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 66f335fb1ffd8684294ad653bf1c7564, type: 3}
m_Name: ColorAdjustments
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.ColorAdjustments
active: 1
postExposure:
m_OverrideState: 1
m_Value: 0.85
contrast:
m_OverrideState: 1
m_Value: 4
colorFilter:
m_OverrideState: 1
m_Value: {r: 0.93, g: 0.96, b: 1, a: 1}
hueShift:
m_OverrideState: 1
m_Value: 0
saturation:
m_OverrideState: 1
m_Value: 4
--- !u!114 &7928249266562162677
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 558a8e2b6826cf840aae193990ba9f2e, type: 3}
m_Name: ShadowsMidtonesHighlights
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.ShadowsMidtonesHighlights
active: 1
shadows:
m_OverrideState: 1
m_Value: {x: 0.87619054, y: 0.952381, z: 1, w: -0.02}
midtones:
m_OverrideState: 1
m_Value: {x: 0.9607844, y: 0.98039216, z: 1, w: 0}
highlights:
m_OverrideState: 1
m_Value: {x: 1, y: 0.9433963, z: 0.8679246, w: 0}
shadowsStart:
m_OverrideState: 1
m_Value: 0
shadowsEnd:
m_OverrideState: 1
m_Value: 0.3
highlightsStart:
m_OverrideState: 1
m_Value: 0.55
highlightsEnd:
m_OverrideState: 1
m_Value: 1
@@ -61,7 +61,7 @@ MonoBehaviour:
m_Value: 1 m_Value: 1
intensity: intensity:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 0.55 m_Value: 0.6
scatter: scatter:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 0.65 m_Value: 0.65
@@ -70,7 +70,7 @@ MonoBehaviour:
m_Value: 65472 m_Value: 65472
tint: tint:
m_OverrideState: 1 m_OverrideState: 1
m_Value: {r: 0.8, g: 0.9, b: 1, a: 1} m_Value: {r: 0.75, g: 0.95, b: 1, a: 1}
highQualityFiltering: highQualityFiltering:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 1 m_Value: 1
@@ -105,13 +105,13 @@ MonoBehaviour:
active: 1 active: 1
color: color:
m_OverrideState: 1 m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0, a: 1} m_Value: {r: 0, g: 0.02, b: 0.04, a: 1}
center: center:
m_OverrideState: 0 m_OverrideState: 0
m_Value: {x: 0.5, y: 0.5} m_Value: {x: 0.5, y: 0.5}
intensity: intensity:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 0.32 m_Value: 0.28
smoothness: smoothness:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 0.4 m_Value: 0.4
@@ -128,7 +128,7 @@ MonoBehaviour:
m_Enabled: 1 m_Enabled: 1
m_EditorHideFlags: 0 m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3} m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: PostFX_DarkSciFi m_Name: PostFX_Lantern
m_EditorClassIdentifier: Unity.RenderPipelines.Core.Runtime::UnityEngine.Rendering.VolumeProfile m_EditorClassIdentifier: Unity.RenderPipelines.Core.Runtime::UnityEngine.Rendering.VolumeProfile
components: components:
- {fileID: -3245916173682126434} - {fileID: -3245916173682126434}
@@ -150,16 +150,16 @@ MonoBehaviour:
active: 1 active: 1
postExposure: postExposure:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 0.25 m_Value: 0.35
contrast: contrast:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 12 m_Value: 10
colorFilter: colorFilter:
m_OverrideState: 1 m_OverrideState: 1
m_Value: {r: 0.93, g: 0.96, b: 1, a: 1} m_Value: {r: 0.88, g: 0.97, b: 1, a: 1}
hueShift: hueShift:
m_OverrideState: 0 m_OverrideState: 0
m_Value: 0 m_Value: 0
saturation: saturation:
m_OverrideState: 1 m_OverrideState: 1
m_Value: 8 m_Value: 6
@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 09ca16b0a83161346aaa963465d1ec16 guid: 96601eff473f9834cb459b40d0bbae14
NativeFormatImporter: NativeFormatImporter:
externalObjects: {} externalObjects: {}
mainObjectFileID: 11400000 mainObjectFileID: 11400000
@@ -1,38 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Sky_DaytimeProcedural
m_Shader: {fileID: 106, guid: 0000000000000000f000000000000000, type: 0}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords:
- _SUNDISK_HIGH_QUALITY
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AtmosphereThickness: 1
- _Exposure: 1.1
- _SunDisk: 2
- _SunSize: 0.04
- _SunSizeConvergence: 5
m_Colors:
- _GroundColor: {r: 0.6039216, g: 0.54901963, b: 0.4392157, a: 1}
- _SkyTint: {r: 0.65882355, g: 0.78431374, b: 0.9098039, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -72,7 +72,7 @@ namespace ProjectM.Client
protected override void OnUpdate() protected override void OnUpdate()
{ {
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != "Game") { Hide(); return; } if (!ScenePolicy.IsGameplayScene()) { Hide(); return; }
if (_cam == null) _cam = Camera.main; if (_cam == null) _cam = Camera.main;
if (_cam == null) return; if (_cam == null) return;
if (!AmbientLifeConfig.Enabled) { Hide(); return; } if (!AmbientLifeConfig.Enabled) { Hide(); return; }
@@ -69,7 +69,7 @@ namespace ProjectM.Client
protected override void OnUpdate() protected override void OnUpdate()
{ {
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != "Game") return; if (!ScenePolicy.IsGameplayScene()) return;
if (!DecalConfig.Enabled) { if (_tracked.Count > 0) ClearAll(); return; } if (!DecalConfig.Enabled) { if (_tracked.Count > 0) ClearAll(); return; }
EntityManager.CompleteDependencyBeforeRO<BlightClutter>(); EntityManager.CompleteDependencyBeforeRO<BlightClutter>();
@@ -55,7 +55,7 @@ namespace ProjectM.Client
protected override void OnUpdate() protected override void OnUpdate()
{ {
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != "Game") return; if (!ScenePolicy.IsGameplayScene()) return;
var cfg = DynamicLightConfig.Instance; var cfg = DynamicLightConfig.Instance;
bool enabled = cfg == null || cfg.Enabled; bool enabled = cfg == null || cfg.Enabled;
if (!enabled) if (!enabled)
@@ -50,7 +50,7 @@ namespace ProjectM.Client
protected override void OnUpdate() protected override void OnUpdate()
{ {
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != "Game") return; if (!ScenePolicy.IsGameplayScene()) return;
if (_root == null) return; if (_root == null) return;
var cfg = RoomDressingConfig.Instance; var cfg = RoomDressingConfig.Instance;
@@ -0,0 +1,19 @@
using UnityEngine.SceneManagement;
namespace ProjectM.Client
{
/// <summary>
/// The ONE place client presentation systems ask "is this a gameplay-look scene?" — replaces the old
/// scattered <c>scene.name == "Game"</c> string gates (LANTERN realignment: Game and DevSandbox share
/// the same look; MainMenu/ArtStaging stay untouched by the dynamic look systems).
/// </summary>
public static class ScenePolicy
{
/// <summary>True in the scenes that carry the LANTERN gameplay look (Game + DevSandbox).</summary>
public static bool IsGameplayScene()
{
var name = SceneManager.GetActiveScene().name;
return name == "Game" || name == "DevSandbox";
}
}
}
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: f4e4ab296b48b204f866c561e9acd11d
@@ -62,7 +62,7 @@ namespace ProjectM.Client
protected override void OnUpdate() protected override void OnUpdate()
{ {
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != "Game") { Pending.Clear(); return; } if (!ScenePolicy.IsGameplayScene()) { Pending.Clear(); return; }
if (!DecalConfig.Enabled) if (!DecalConfig.Enabled)
{ {
Pending.Clear(); Pending.Clear();
@@ -4,31 +4,26 @@ using UnityEngine;
namespace ProjectM.Client namespace ProjectM.Client
{ {
/// <summary> /// <summary>
/// Client-only ATMOSPHERE cross-fade for the two-region world. A managed presentation system /// Client-only water-column ATMOSPHERE for the LANTERN seabed (deep-sea murk). A managed presentation
/// (SystemBase, main thread, NO Burst) in <see cref="PresentationSystemGroup"/> that OBSERVES the /// system (SystemBase, main thread, NO Burst) in <see cref="PresentationSystemGroup"/> that OBSERVES the
/// follow-camera's world-space X and lerps <see cref="RenderSettings"/> fog + Trilight sky-ambient between /// follow-camera's world-space X and lerps <see cref="RenderSettings"/> fog + flat ambient between the
/// the lush cyan meadow base (origin) and the hostile orange arid expedition (+1000 X) — mirroring /// base-shelf murk (origin) and the deeper out-shelf murk (+1000 X) — mirroring HudSystem's region split
/// HudSystem's region split at camera X &gt; 500. The directional light + skybox + post-FX volume stay /// at camera X &gt; 500. The skybox stays empty and the post-FX volume GLOBAL; only fog colour/density +
/// GLOBAL; only fog colour/density + ambient sky colour shift per region. Pure presentation: never mutates /// ambient shift per region. Pure presentation: never mutates the simulation. Knobs live in
/// the simulation, no ECS query (camera + RenderSettings only). Knobs live in /// <see cref="WorldAtmosphereConfig"/> (falls back to baked LANTERN-murk defaults when absent). Gated by
/// <see cref="WorldAtmosphereConfig"/> (falls back to baked defaults when absent). Guarded to the gameplay /// <see cref="ScenePolicy.IsGameplayScene"/> so it never restyles the menu or ArtStaging. Per-room-biome
/// "Game" scene so it never restyles the menu. Fog enable/mode + equator/ground ambient are baked into the /// murk variants key on the replicated RunInfo.CurrentBiome (re-meant to depth/water flavors — the old
/// scene; this only drives the per-region deltas. Phase 1.5b: also drives a per-room-biome tint on the /// meadow/arid/blight palettes died in the LANTERN realignment).
/// expedition ground quads (MaterialPropertyBlock — the material asset is never touched).
/// </summary> /// </summary>
[WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation)] [WorldSystemFilter(WorldSystemFilterFlags.ClientSimulation)]
[UpdateInGroup(typeof(PresentationSystemGroup))] [UpdateInGroup(typeof(PresentationSystemGroup))]
public partial class WorldAtmosphereSystem : SystemBase public partial class WorldAtmosphereSystem : SystemBase
{ {
Camera _cam; Camera _cam;
MeshRenderer[] _ground;
MaterialPropertyBlock _mpb;
Color _groundCur;
static readonly int BaseColorId = Shader.PropertyToID("_BaseColor");
protected override void OnUpdate() protected override void OnUpdate()
{ {
if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name != "Game") return; if (!ScenePolicy.IsGameplayScene()) return;
if (_cam == null) _cam = Camera.main; if (_cam == null) _cam = Camera.main;
if (_cam == null) return; if (_cam == null) return;
@@ -36,39 +31,34 @@ namespace ProjectM.Client
float boundary = cfg != null ? cfg.BoundaryX : 500f; float boundary = cfg != null ? cfg.BoundaryX : 500f;
float half = cfg != null ? Mathf.Max(1f, cfg.BlendHalfWidth) : 80f; float half = cfg != null ? Mathf.Max(1f, cfg.BlendHalfWidth) : 80f;
Color baseFog = cfg != null ? cfg.BaseFogColor : new Color(0.09f, 0.13f, 0.14f, 1f); // LANTERN murk defaults (match the ArtStaging source-of-truth hues; density is the play-readability knob).
float baseDen = cfg != null ? cfg.BaseFogDensity : 0.010f; Color baseFog = cfg != null ? cfg.BaseFogColor : new Color(0.02f, 0.10f, 0.12f, 1f);
Color baseAmb = cfg != null ? cfg.BaseAmbientSky : new Color(0.32f, 0.38f, 0.48f, 1f); float baseDen = cfg != null ? cfg.BaseFogDensity : 0.035f;
Color expFog = cfg != null ? cfg.ExpeditionFogColor : new Color(0.24f, 0.13f, 0.06f, 1f); Color baseAmb = cfg != null ? cfg.BaseAmbientSky : new Color(0.03f, 0.055f, 0.08f, 1f);
float expDen = cfg != null ? cfg.ExpeditionFogDensity : 0.016f; Color expFog = cfg != null ? cfg.ExpeditionFogColor : new Color(0.015f, 0.075f, 0.10f, 1f);
Color expAmb = cfg != null ? cfg.ExpeditionAmbientSky : new Color(0.45f, 0.31f, 0.20f, 1f); float expDen = cfg != null ? cfg.ExpeditionFogDensity : 0.04f;
// Step 14 (expedition redesign): the EXPEDITION-side palette keys on the replicated per-room biome Color expAmb = cfg != null ? cfg.ExpeditionAmbientSky : new Color(0.02f, 0.045f, 0.07f, 1f);
// (RunInfo.CurrentBiome) so every room re-themes — the camera-X blend still owns the base↔run fade.
// Palettes are code consts (cosmetic; per-biome config knobs can layer on later without churn). // Per-room murk flavors (cosmetic code consts; all stay inside the deep-sea band — hue shifts are
// Phase 1.5: all palettes moved to the dark-ambient set (dynamic lights carry readability). // subtle, value stays dark so dynamic lights keep carrying readability).
// Ground tints are ABSOLUTE _BaseColor values (the MPB replaces the authored arid sand tint).
Color groundTarget = new Color(0.60f, 0.56f, 0.50f, 1f); // authored arid sand (Mat_Ground_Arid_Dark)
bool haveRun = SystemAPI.TryGetSingleton<ProjectM.Simulation.RunInfo>(out var runInfo); bool haveRun = SystemAPI.TryGetSingleton<ProjectM.Simulation.RunInfo>(out var runInfo);
if (haveRun && runInfo.Lifecycle != ProjectM.Simulation.RunLifecycle.Staging) if (haveRun && runInfo.Lifecycle != ProjectM.Simulation.RunLifecycle.Staging)
{ {
switch (runInfo.CurrentBiome) switch (runInfo.CurrentBiome)
{ {
case ProjectM.Simulation.RoomBiomeId.Meadow: case ProjectM.Simulation.RoomBiomeId.Meadow: // kelp shallows: a touch greener
expFog = new Color(0.10f, 0.16f, 0.10f, 1f); expDen = 0.012f; expFog = new Color(0.02f, 0.10f, 0.09f, 1f); expDen = 0.035f;
expAmb = new Color(0.30f, 0.42f, 0.32f, 1f); expAmb = new Color(0.025f, 0.06f, 0.06f, 1f);
groundTarget = new Color(0.47f, 0.55f, 0.43f, 1f);
break; break;
case ProjectM.Simulation.RoomBiomeId.Cavern: case ProjectM.Simulation.RoomBiomeId.Cavern: // crush-dark trench: colder + denser
expFog = new Color(0.06f, 0.08f, 0.12f, 1f); expDen = 0.020f; expFog = new Color(0.01f, 0.05f, 0.08f, 1f); expDen = 0.05f;
expAmb = new Color(0.24f, 0.28f, 0.38f, 1f); expAmb = new Color(0.015f, 0.035f, 0.06f, 1f);
groundTarget = new Color(0.42f, 0.46f, 0.55f, 1f);
break; break;
case ProjectM.Simulation.RoomBiomeId.Blight: case ProjectM.Simulation.RoomBiomeId.Blight: // gloam bloom: a sick green-violet cast
expFog = new Color(0.13f, 0.07f, 0.15f, 1f); expDen = 0.022f; expFog = new Color(0.045f, 0.075f, 0.09f, 1f); expDen = 0.045f;
expAmb = new Color(0.32f, 0.24f, 0.38f, 1f); expAmb = new Color(0.045f, 0.05f, 0.075f, 1f);
groundTarget = new Color(0.52f, 0.42f, 0.58f, 1f);
break; break;
// Arid keeps the config/default burnt-dusk orange + sand ground above. // default keeps the config/fallback out-shelf murk above.
} }
} }
@@ -79,27 +69,6 @@ namespace ProjectM.Client
RenderSettings.fogColor = Color.Lerp(baseFog, expFog, t); RenderSettings.fogColor = Color.Lerp(baseFog, expFog, t);
RenderSettings.fogDensity = Mathf.Lerp(baseDen, expDen, t); RenderSettings.fogDensity = Mathf.Lerp(baseDen, expDen, t);
RenderSettings.ambientSkyColor = Color.Lerp(baseAmb, expAmb, t); RenderSettings.ambientSkyColor = Color.Lerp(baseAmb, expAmb, t);
// Per-room-biome ground tint (expedition quads only; the meadow base keeps its authored material).
if (_ground == null)
{
var found = new System.Collections.Generic.List<MeshRenderer>();
foreach (var mr in Object.FindObjectsByType<MeshRenderer>(FindObjectsSortMode.None))
if (mr.gameObject.name == "Ground_Arid") found.Add(mr);
if (found.Count > 0)
{
_ground = found.ToArray();
_mpb = new MaterialPropertyBlock();
_groundCur = groundTarget; // snap on first sight — no lerp from black
}
}
if (_ground != null)
{
_groundCur = Color.Lerp(_groundCur, groundTarget, 1f - Mathf.Exp(-2.5f * UnityEngine.Time.deltaTime));
_mpb.SetColor(BaseColorId, _groundCur);
for (int i = 0; i < _ground.Length; i++)
if (_ground[i] != null) _ground[i].SetPropertyBlock(_mpb);
}
} }
} }
} }