Remove Unity render settings fallback

This commit is contained in:
Meta Vens 2026-07-05 21:29:34 +01:00
commit 0b7ed068ec
6 changed files with 30 additions and 137 deletions

View file

@ -2169,9 +2169,6 @@ static void RequireDaemonRenderQueryAuthority(string root)
? File.ReadAllText(gameplayInputShellPath)
: throw new InvalidOperationException("Cannot verify daemon render query authority; AetheriaUnityGameplayInputShell.cs is missing.");
var renderSettingsBridgePath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityRenderSettingsBridge.cs");
var renderSettingsBridge = File.Exists(renderSettingsBridgePath)
? File.ReadAllText(renderSettingsBridgePath)
: throw new InvalidOperationException("Cannot verify daemon render query authority; AetheriaUnityRenderSettingsBridge.cs is missing.");
var cockpitHudShellPath = Path.Combine(root, "Assets", "Scripts", "Gameplay", "AetheriaUnityCockpitHudShell.cs");
var cockpitHudShell = File.Exists(cockpitHudShellPath)
? File.ReadAllText(cockpitHudShellPath)
@ -2180,7 +2177,7 @@ static void RequireDaemonRenderQueryAuthority(string root)
var gameplayBootShell = File.Exists(gameplayBootShellPath)
? File.ReadAllText(gameplayBootShellPath)
: throw new InvalidOperationException("Cannot verify daemon render query authority; AetheriaUnityGameplayBootShell.cs is missing.");
var unityRenderPresentation = actionGameManager + "\n" + targetPresentation + "\n" + pilotFrameController + "\n" + gameplayInputShell + "\n" + renderSettingsBridge + "\n" + cockpitHudShell + "\n" + gameplayBootShell;
var unityRenderPresentation = actionGameManager + "\n" + targetPresentation + "\n" + pilotFrameController + "\n" + gameplayInputShell + "\n" + cockpitHudShell + "\n" + gameplayBootShell;
var canonicalSnapshotPath = Path.Combine(root, "Aetheria.State", "Documents", "AetheriaRuntimeStateDocuments.cs");
var canonicalSnapshot = File.Exists(canonicalSnapshotPath)
@ -2741,24 +2738,31 @@ static void RequireDaemonRenderQueryAuthority(string root)
if (!schematicDisplay.Contains("public void SetRenderSettings(AetheriaRuntimeDaemonRenderSettings renderSettings)", StringComparison.Ordinal) ||
!schematicDisplay.Contains("_renderSettings?.NormalizeThermalRisk(", StringComparison.Ordinal) ||
!gameplayBootShell.Contains("CockpitHudShell.SetRenderSettings(ZoneRenderer.RenderSettings)", StringComparison.Ordinal) ||
!gameplayBootShell.Contains("runtimeState?.DaemonFrame?.Latest()", StringComparison.Ordinal) ||
!gameplayBootShell.Contains("render/game-feel settings are daemon authority", StringComparison.Ordinal) ||
!cockpitHudShell.Contains("public sealed class AetheriaUnityCockpitHudShell", StringComparison.Ordinal) ||
!cockpitHudShell.Contains("public void SetRenderSettings(AetheriaRuntimeDaemonRenderSettings renderSettings)", StringComparison.Ordinal) ||
!cockpitHudShell.Contains("SchematicDisplay?.SetRenderSettings(renderSettings)", StringComparison.Ordinal) ||
!cockpitHudShell.Contains("TargetSchematicDisplay?.SetRenderSettings(renderSettings)", StringComparison.Ordinal) ||
!renderSettingsBridge.Contains("settings.GameplaySettings.HypothermiaTemperature", StringComparison.Ordinal) ||
!renderSettingsBridge.Contains("settings.GameplaySettings.HeatstrokeTemperature", StringComparison.Ordinal))
!cockpitHudShell.Contains("TargetSchematicDisplay?.SetRenderSettings(renderSettings)", StringComparison.Ordinal))
{
throw new InvalidOperationException(
"HUD thermal presentation no longer flows through the shared daemon render settings bridge.");
"HUD thermal presentation must flow through daemon-frame render settings, not Unity-local render tuning.");
}
if (File.Exists(renderSettingsBridgePath) ||
unityRenderPresentation.Contains("AetheriaUnityRenderSettingsBridge", StringComparison.Ordinal) ||
unityRenderPresentation.Contains("local Unity Settings fallback", StringComparison.Ordinal) ||
actionGameManager.Contains("TargetSpottedBlinkFrequency", StringComparison.Ordinal) ||
actionGameManager.Contains("TargetSpottedBlinkOffset", StringComparison.Ordinal))
{
throw new InvalidOperationException(
"Unity render/game-feel boot must not preserve the local render-settings bridge or fallback; daemon frame settings are authoritative.");
}
var requiredActionGameManagerRenderSymbols = new[]
{
"public static class AetheriaUnityRenderSettingsBridge",
"public static AetheriaRuntimeDaemonRenderSettings Build(",
"AetheriaUnityRenderSettingsBridge.Build(",
"public sealed class AetheriaUnityCockpitHudShell",
"public sealed class AetheriaUnityGameplayBootShell",
"runtimeState?.DaemonFrame?.Latest()",
"CockpitHudShell.SetRenderSettings(ZoneRenderer.RenderSettings)",
"renderSettings.NormalizeDetectionProgress(",
"renderSettings.ResolveTargetSpottedFillEnabled(",
@ -2773,30 +2777,6 @@ static void RequireDaemonRenderQueryAuthority(string root)
"ZoneRenderer.RenderSettings.ResolveDefaultMinimapZoomIndex()",
"ZoneRenderer.RenderSettings.ResolveNextMinimapZoomIndex(_zoomLevelIndex)",
"ZoneRenderer.RenderSettings.ResolveMinimapDistance(_zoomLevelIndex)",
"new AetheriaRuntimeExponentialLerp(",
"settings.GameplaySettings.TargetDetectionInfoThreshold",
"settings.GameplaySettings.SevereHeatstrokeRiskThreshold",
"settings.GameplaySettings.LockIndicatorNoiseAmplitude",
"settings.HeatstrokePhasingFloor",
"settings.HeatstrokePhasingFrequency",
"TargetSpottedBlinkFrequency",
"TargetSpottedBlinkOffset",
"settings.MinimapZoomLevels",
"settings.DefaultMinimapZoom",
"settings.WormholeDistanceRatio",
"settings.DefaultViewDistance",
"settings.MinimapIconSize",
"settings.MinimapAsteroidSize",
"settings.IconSize",
"settings.MinimapZoneGravityRange",
"settings.PlanetSettings.AsteroidVerticalOffset",
"settings.PlanetRotationSpeed",
"settings.PlanetSettings.ZoneDepthExponent",
"settings.PlanetSettings.ZoneDepth + settings.PlanetSettings.ZoneBoundaryFog",
"settings.AsteroidMeshCount",
"settings.PlanetSettings.BodyRadius",
"settings.PlanetSettings.LightRadius",
"settings.PlanetSettings.WaveFrequency",
"ZoneRenderer.BodySettingsCollections = Settings.BodySettingsCollections;"
};
@ -2806,7 +2786,7 @@ static void RequireDaemonRenderQueryAuthority(string root)
if (missingActionGameManagerRenderSymbols.Length > 0)
{
throw new InvalidOperationException(
"Unity target/render presentation no longer bridges Unity render tuning through shared daemon render settings: " +
"Unity target/render presentation no longer consumes daemon-owned render settings: " +
string.Join(", ", missingActionGameManagerRenderSymbols));
}
@ -9767,7 +9747,8 @@ static void RequireClientTargetBootAuthority(string root)
"new AetheriaUnityLoadoutItemFactory(itemManager, runtimeCatalog)",
"ZoneRenderer.SetDroppedPickupItemFactory(loadoutItemFactory.CreateLoadoutItem)",
"ZoneRenderer.BodySettingsCollections = Settings.BodySettingsCollections",
"AetheriaUnityRenderSettingsBridge.Build(",
"runtimeState?.DaemonFrame?.Latest()",
"render/game-feel settings are daemon authority",
"CockpitHudShell.SetRenderSettings(ZoneRenderer.RenderSettings)",
"AetheriaUnityRuntimeClientProvider.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap",
"public readonly struct AetheriaUnityGameplayBootResult"
@ -17248,7 +17229,8 @@ static void RequireRuntimeStateReaderOwnsUnityStateAcquisition(string root)
"new AetheriaUnityLoadoutItemFactory(itemManager, runtimeCatalog)",
"ZoneRenderer.SetDroppedPickupItemFactory(loadoutItemFactory.CreateLoadoutItem)",
"ZoneRenderer.BodySettingsCollections = Settings.BodySettingsCollections",
"AetheriaUnityRenderSettingsBridge.Build(",
"runtimeState?.DaemonFrame?.Latest()",
"render/game-feel settings are daemon authority",
"CockpitHudShell.SetRenderSettings(ZoneRenderer.RenderSettings)",
"AetheriaUnityRuntimeClientProvider.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap",
"public readonly struct AetheriaUnityGameplayBootResult"

View file

@ -352,7 +352,6 @@ $menuShell = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityMenuShell.cs"
$gameplayInputShell = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityGameplayInputShell.cs"
$pilotOperationController = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityPilotOperationController.cs"
$runtimeClientProvider = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityRuntimeClientProvider.cs"
$renderSettingsBridge = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityRenderSettingsBridge.cs"
$cockpitHudShell = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityCockpitHudShell.cs"
$gameplayBootShell = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityGameplayBootShell.cs"
$sceneWiring = Read-Text "Assets\Scripts\Gameplay\AetheriaUnityGameplaySceneWiring.cs"
@ -398,7 +397,8 @@ Assert-Contains $gameplayBootShell "new ItemManager(" "Gameplay boot shell shoul
Assert-Contains $gameplayBootShell "new AetheriaUnityLoadoutItemFactory(itemManager, runtimeCatalog)" "Gameplay boot shell should construct the loadout item factory."
Assert-Contains $gameplayBootShell "ZoneRenderer.SetDroppedPickupItemFactory(loadoutItemFactory.CreateLoadoutItem)" "Gameplay boot shell should configure dropped pickup factory binding."
Assert-Contains $gameplayBootShell "ZoneRenderer.BodySettingsCollections = Settings.BodySettingsCollections" "Gameplay boot shell should configure renderer body settings."
Assert-Contains $gameplayBootShell "AetheriaUnityRenderSettingsBridge.Build(" "Gameplay boot shell should configure daemon render settings."
Assert-Contains $gameplayBootShell "runtimeState?.DaemonFrame?.Latest()" "Gameplay boot shell should read render/game-feel settings from the daemon frame."
Assert-Contains $gameplayBootShell "render/game-feel settings are daemon authority" "Gameplay boot shell should fail instead of using Unity-local render settings fallback."
Assert-Contains $gameplayBootShell "CockpitHudShell.SetRenderSettings(ZoneRenderer.RenderSettings)" "Gameplay boot shell should configure cockpit HUD render settings."
Assert-Contains $gameplayBootShell "AetheriaUnityRuntimeClientProvider.PlayerSettings.GraphicsSettings.ShowAsteroidsInMinimap" "Gameplay boot shell should apply minimap asteroid visibility."
Assert-Contains $gameplayBootShell "public readonly struct AetheriaUnityGameplayBootResult" "Gameplay boot shell should return the Unity adapters needed by scene composition."
@ -455,13 +455,10 @@ Assert-NotContains $currentEntityBinder "ResolveDaemonZone" "Current-entity bind
Assert-Contains $currentEntityPresentation "AetheriaRuntimeZoneRenderDocument zoneRender" "Docked presentation must consume the typed zone-render document for body lookups."
Assert-Contains $currentEntityPresentation "AetheriaRuntimeZoneRenderBodyPose" "Docked presentation must resolve body look-at through typed render body poses."
Assert-NotContains $currentEntityPresentation "AetheriaRuntimeZoneSnapshotCommit daemonZone" "Docked presentation must not receive raw zone snapshots."
Assert-Contains $gameplayBootShell "AetheriaUnityRenderSettingsBridge.Build(" "Gameplay boot shell should delegate daemon render-settings lowering to the render settings bridge."
Assert-Contains $renderSettingsBridge "public static class AetheriaUnityRenderSettingsBridge" "Unity render settings lowering should live outside ActionGameManager."
Assert-Contains $renderSettingsBridge "public static AetheriaRuntimeDaemonRenderSettings Build(" "Unity render settings bridge should expose focused render-settings lowering."
Assert-Contains $renderSettingsBridge "new AetheriaRuntimeDaemonRenderSettings(" "Unity render settings bridge should construct the shared daemon render settings."
Assert-Contains $renderSettingsBridge "settings.GameplaySettings.HypothermiaTemperature" "Unity render settings bridge should lower thermal HUD thresholds."
Assert-Contains $renderSettingsBridge "settings.GameplaySettings.HeatstrokeTemperature" "Unity render settings bridge should lower thermal HUD thresholds."
Assert-Contains $renderSettingsBridge "settings.MinimapZoomLevels?.Select(level => (double)level).ToArray()" "Unity render settings bridge should lower minimap zoom levels explicitly."
Assert-NotContains $gameplayBootShell "AetheriaUnityRenderSettingsBridge" "Gameplay boot shell must not preserve Unity-local render settings lowering."
Assert-NotContains $gameplayBootShell "local Unity Settings fallback" "Gameplay boot shell must not preserve Unity-local render settings fallback."
Assert-NotContains $actionGameManager "TargetSpottedBlinkFrequency" "ActionGameManager must not own daemon render/game-feel tuning."
Assert-NotContains $actionGameManager "TargetSpottedBlinkOffset" "ActionGameManager must not own daemon render/game-feel tuning."
Assert-Contains $actionGameManager "SceneWiring.ConfigureRuntimeInputScreenShell(MenuShell)" "ActionGameManager should delegate runtime input-screen handoff to scene wiring."
Assert-Contains $sceneWiring "MainMenu?.SetRuntimeInputScreenShell(menuShell.CanOpenRuntimeInputScreen, menuShell.ShowRuntimeInputScreen)" "Scene wiring should inject Unity menu-shell input-screen callbacks into MainMenu."
Assert-Contains $actionGameManager "GameplayInputShell.Bootstrap();" "ActionGameManager should bootstrap Unity gameplay input through the dedicated input shell."

View file

@ -167,8 +167,6 @@ public class ActionGameManager : MonoBehaviour
Settings = Settings,
ZoneRenderer = ZoneRenderer,
CockpitHudShell = CockpitHudShell,
TargetSpottedBlinkFrequency = TargetSpottedBlinkFrequency,
TargetSpottedBlinkOffset = TargetSpottedBlinkOffset,
Log = Debug.Log
};
private AetheriaUnityGameplaySceneWiring SceneWiring =>
@ -212,8 +210,6 @@ public class ActionGameManager : MonoBehaviour
public GameSettings Settings;
//public string StarterShipTemplate = "Longinus";
public float2 Sensitivity;
public float TargetSpottedBlinkFrequency = 20;
public float TargetSpottedBlinkOffset = -.25f;
[Header("Postprocessing")]
public Volume DeathPost;

View file

@ -11,8 +11,6 @@ public sealed class AetheriaUnityGameplayBootShell
public GameSettings Settings { get; set; }
public ZoneRenderer ZoneRenderer { get; set; }
public AetheriaUnityCockpitHudShell CockpitHudShell { get; set; }
public float TargetSpottedBlinkFrequency { get; set; }
public float TargetSpottedBlinkOffset { get; set; }
public Action<string> Log { get; set; }
public AetheriaUnityGameplayBootResult Boot()
@ -79,17 +77,11 @@ public sealed class AetheriaUnityGameplayBootShell
private AetheriaRuntimeDaemonRenderSettings ResolveDaemonRenderSettings(AetheriaClientState runtimeState)
{
var frame = runtimeState?.DaemonFrame?.Latest();
if (frame?.RenderSettings != null)
{
Log?.Invoke($"Aetheria render/game-feel settings: daemon frame {frame.FrameId}");
return frame.RenderSettings;
}
if (frame == null)
throw new InvalidOperationException("Aetheria daemon frame is required before gameplay boot; render/game-feel settings are daemon authority.");
Log?.Invoke("Aetheria render/game-feel settings: local Unity Settings fallback; daemon frame unavailable.");
return AetheriaUnityRenderSettingsBridge.Build(
Settings,
TargetSpottedBlinkFrequency,
TargetSpottedBlinkOffset);
Log?.Invoke($"Aetheria render/game-feel settings: daemon frame {frame.FrameId}");
return frame.RenderSettings;
}
private AetheriaRuntimeStateBootReport SyncRemoteReplicaBeforeBoot(AetheriaRuntimeStateBootReport stateBoot)

View file

@ -1,72 +0,0 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
using System.Linq;
using GameCult.Aetheria.State.Verse;
public static class AetheriaUnityRenderSettingsBridge
{
public static AetheriaRuntimeDaemonRenderSettings Build(
GameSettings settings,
float targetSpottedBlinkFrequency,
float targetSpottedBlinkOffset)
{
var emissionCurve = settings.GameplaySettings.TemperatureEmissionCurve;
var bodyIconSizeCurve = settings.IconSize;
var bodyRadiusCurve = settings.PlanetSettings.BodyRadius;
var lightRadiusCurve = settings.PlanetSettings.LightRadius;
var gravityWaveFrequencyCurve = settings.PlanetSettings.WaveFrequency;
return new AetheriaRuntimeDaemonRenderSettings(
new AetheriaRuntimeExponentialCurve(
emissionCurve.Exponent,
emissionCurve.Multiplier,
emissionCurve.Constant),
new AetheriaRuntimeExponentialLerp(
settings.GameplaySettings.LockIndicatorFrequency.Exponent,
settings.GameplaySettings.LockIndicatorFrequency.Minimum,
settings.GameplaySettings.LockIndicatorFrequency.Maximum),
new AetheriaRuntimeExponentialLerp(
settings.GameplaySettings.LockSpinSpeed.Exponent,
settings.GameplaySettings.LockSpinSpeed.Minimum,
settings.GameplaySettings.LockSpinSpeed.Maximum),
settings.GameplaySettings.ConvergenceMinimumDistance,
settings.GameplaySettings.HypothermiaTemperature,
settings.GameplaySettings.HeatstrokeTemperature,
settings.GameplaySettings.SevereHeatstrokeRiskThreshold,
settings.GameplaySettings.TargetDetectionInfoThreshold,
settings.GameplaySettings.LockIndicatorNoiseAmplitude,
settings.HeatstrokePhasingFloor,
settings.HeatstrokePhasingFrequency,
targetSpottedBlinkFrequency,
targetSpottedBlinkOffset,
settings.MinimapZoomLevels?.Select(level => (double)level).ToArray(),
settings.DefaultMinimapZoom,
settings.WormholeDistanceRatio,
settings.DefaultViewDistance,
settings.MinimapIconSize,
settings.MinimapAsteroidSize,
new AetheriaRuntimeExponentialCurve(
bodyIconSizeCurve.Exponent,
bodyIconSizeCurve.Multiplier,
bodyIconSizeCurve.Constant),
settings.MinimapZoneGravityRange,
settings.PlanetSettings.AsteroidVerticalOffset,
settings.PlanetRotationSpeed,
settings.PlanetSettings.ZoneDepthExponent,
settings.PlanetSettings.ZoneDepth + settings.PlanetSettings.ZoneBoundaryFog,
settings.AsteroidMeshCount,
new AetheriaRuntimeExponentialCurve(
bodyRadiusCurve.Exponent,
bodyRadiusCurve.Multiplier,
bodyRadiusCurve.Constant),
new AetheriaRuntimeExponentialCurve(
lightRadiusCurve.Exponent,
lightRadiusCurve.Multiplier,
lightRadiusCurve.Constant),
new AetheriaRuntimeExponentialCurve(
gravityWaveFrequencyCurve.Exponent,
gravityWaveFrequencyCurve.Multiplier,
gravityWaveFrequencyCurve.Constant));
}
}

View file

@ -1,2 +0,0 @@
fileFormatVersion: 2
guid: 0d5dc044370e0c340b28db46e4bfeca7