fix: complete retail parity stability pass
This commit is contained in:
parent
d3df4cb20a
commit
f7aa8e0eb7
131 changed files with 7765 additions and 1190 deletions
|
|
@ -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()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue