fix: complete retail parity stability pass
All checks were successful
CI / linux-portable (push) Successful in 3m41s
CI / windows-gate (push) Successful in 6m49s
CI / release (push) Successful in 3m22s

This commit is contained in:
Erik 2026-08-28 20:01:39 +02:00
parent d3df4cb20a
commit f7aa8e0eb7
131 changed files with 7765 additions and 1190 deletions

View file

@ -300,6 +300,56 @@ public sealed class WorldRenderFrameBuilderTests
Assert.Contains(hiddenLight, lighting.PointSnapshot);
}
[Fact]
public void PersistentAtDay_UsesNoonLandscapeLightingWithoutChangingTheSkyClock()
{
SkyStateProvider sky = SkyStateProvider.Default();
var clock = new WorldTimeService(sky);
clock.PinnedDayFraction = 0f;
var lighting = new LightManager();
bool persistentDaylight = true;
var environment = new RuntimeWorldFrameEnvironmentPreparation(
RuntimeOptions.Parse("test-dat", _ => null),
clock,
lighting,
dispatcher: null,
environmentCells: null,
lightingUbo: null,
new WorldRenderRangeState(4, 12),
skyPes: null,
persistentDaylight: () => persistentDaylight);
WorldCameraFrame camera = CameraFrame(new FlyCamera());
WorldRootFrame roots = default;
SkyKeyframe midnight = sky.Interpolate(0f);
SkyKeyframe noon = sky.Interpolate(0.5f);
var foundation = new RenderFrameFoundation(
PortalViewportVisible: false,
Sky: midnight,
Atmosphere: default);
environment.Prepare(
in camera,
in roots,
in foundation,
activeDayGroup: null);
Assert.Equal(noon.AmbientColor, lighting.CurrentAmbient.AmbientColor);
Assert.NotNull(lighting.Sun);
Assert.Equal(noon.SunColor, lighting.Sun!.ColorLinear);
Assert.Equal(0d, clock.DayFraction, precision: 5);
persistentDaylight = false;
environment.Prepare(
in camera,
in roots,
in foundation,
activeDayGroup: null);
Assert.Equal(midnight.AmbientColor, lighting.CurrentAmbient.AmbientColor);
Assert.NotNull(lighting.Sun);
Assert.Equal(midnight.SunColor, lighting.Sun!.ColorLinear);
}
[Fact]
public void Environment_preparation_keeps_lighting_snapshot_before_ubo_upload()
{