Publish gravity fog through generic Eve fields

This commit is contained in:
Meta Vens 2026-07-15 20:17:05 +01:00
commit 6f0375f4ad
22 changed files with 293 additions and 230 deletions

View file

@ -149,6 +149,7 @@ internal sealed class AetheriaDaemonYmirSmokeChecks
Action[] checks =
[
PositiveGravityDepthAttractsAndProjectsAsAWell,
VolumeSurfaceKeepsNativeShaderAbiInAssetVariant,
YmirMovesProjectileAndReportsStableContact,
InstantWeaponRequestSurvivesLockAcquisition,
ConstantWeaponRunsOnDaemonThroughYmirBeamContact,
@ -202,6 +203,32 @@ internal sealed class AetheriaDaemonYmirSmokeChecks
RunCheck(check);
}
private static void VolumeSurfaceKeepsNativeShaderAbiInAssetVariant()
{
var player = Entity(0, 0, "player");
var run = new AetheriaRuntimeRunCheckpointCommit
{
RunId = "volume-program-ownership-smoke",
CurrentZoneIndex = 0,
CurrentEntityKey = "zone.0.entity.0",
Zones = [new AetheriaRuntimeZoneSnapshotCommit { ZoneIndex = 0, Entities = [player] }]
};
var surface = AetheriaRuntimeDaemonGameSurfaceBuilder.Build(
new AetheriaRuntimeDaemonFrameDocument { FrameId = 1, Run = run },
new AetheriaRuntimeDaemonHealthDocument(),
AetheriaRuntimeDaemonCommandBoundaryDocument.Create("daemon"));
var volume = Flatten(surface.Surface.Root).Single(node => node.Kind == "field.volume3d");
Require(volume.Props.Values.All(value => value == null || !value.Contains("_Nebula", StringComparison.Ordinal)) &&
volume.Props["layerBindings"].Contains("gravity.height=surfaceHeight", StringComparison.Ordinal),
"portable Eve volume surfaces must name logical ports rather than Unity shader properties");
var shader = AetheriaRuntimeAssets.ProjectManifest(null).Assets.Single(asset =>
asset.Ref.AssetKey == "shader.environment.gravity-fog");
Require(shader.Ref.Metadata["unity.volume.texturePort.surfaceHeight"] == "_NebulaSurfaceHeight" &&
shader.Ref.Metadata["unity.volume.pass.raymarch"] == "0",
"provider asset metadata must own the concrete Unity volume-program ABI projected into runtime variants");
}
private static AetheriaYmirWorldPhysics NewPhysics()
{
AetheriaYmirWorldPhysics physics = new();