Expose smooth value flow as a daemon render option

This commit is contained in:
Meta Vens 2026-07-19 01:52:55 +01:00
commit a655d99bf5
6 changed files with 81 additions and 10 deletions

View file

@ -240,6 +240,7 @@ namespace GameCult.Aetheria.State.Verse
["unity.volume.quality.high.keyword"] = "HIGH_QUALITY",
["unity.volume.quality.normal.keyword"] = "MEDIUM_QUALITY",
["unity.volume.feature.flow.global.keyword"] = "FLOW_GLOBAL",
["unity.volume.feature.flow.value3d.keyword"] = "FLOW_VALUE3D",
["unity.volume.feature.noise.slope.keyword"] = "NOISE_SLOPE",
["unity.volume.texturePort.surfaceHeight"] = "_NebulaSurfaceHeight",
["unity.volume.texturePort.patchHeight"] = "_NebulaPatchHeight",
@ -325,6 +326,7 @@ namespace GameCult.Aetheria.State.Verse
["presentationRole"] = "environment.stardust.update",
["unity.particles.kernel.update"] = "UpdateParticles",
["unity.particles.feature.flow.global.keyword"] = "FLOW_GLOBAL",
["unity.particles.feature.flow.value3d.keyword"] = "FLOW_VALUE3D",
["unity.particles.feature.noise.slope.keyword"] = "NOISE_SLOPE",
["unity.particles.texturePort.surfaceHeight"] = "_NebulaSurfaceHeight",
["unity.particles.texturePort.tint"] = "_NebulaTint",

View file

@ -910,8 +910,12 @@ namespace GameCult.Aetheria.State.Verse
var aimPresentation = AimPresentation(run, zone, playerEntityId);
if (aimPresentation != null)
presentationChildren.Insert(0, aimPresentation);
presentationChildren.Insert(0, GravityFogVolume("aetheria.daemon.game.world.gravity-fog"));
presentationChildren.Insert(1, StardustParticles("aetheria.daemon.game.world.stardust"));
presentationChildren.Insert(0, GravityFogVolume(
"aetheria.daemon.game.world.gravity-fog",
frame.RenderSettings.UseValue3DFlow));
presentationChildren.Insert(1, StardustParticles(
"aetheria.daemon.game.world.stardust",
frame.RenderSettings.UseValue3DFlow));
return new AetheriaRuntimeSurfaceComponent(
id,
@ -934,7 +938,7 @@ namespace GameCult.Aetheria.State.Verse
});
}
private static AetheriaRuntimeSurfaceComponent GravityFogVolume(string id)
private static AetheriaRuntimeSurfaceComponent GravityFogVolume(string id, bool useValue3DFlow)
{
var viewport = DefaultViewport();
var props = new Dictionary<string, string>(StringComparer.Ordinal)
@ -946,7 +950,9 @@ namespace GameCult.Aetheria.State.Verse
["renderChannel"] = "world.transparent",
["compositeMode"] = "premultiplied-alpha",
["quality"] = "high",
["features"] = "flow.global;noise.slope",
["features"] = useValue3DFlow
? "flow.global;flow.value3d;noise.slope"
: "flow.global;noise.slope",
["textureWidth"] = "1024",
["textureHeight"] = "1024",
["downsample"] = "0",
@ -979,7 +985,7 @@ namespace GameCult.Aetheria.State.Verse
AetheriaRuntimeSurfaceStateBindings.FromProps(props));
}
private static AetheriaRuntimeSurfaceComponent StardustParticles(string id)
private static AetheriaRuntimeSurfaceComponent StardustParticles(string id, bool useValue3DFlow)
{
var viewport = DefaultViewport();
var props = new Dictionary<string, string>(StringComparer.Ordinal)
@ -990,7 +996,9 @@ namespace GameCult.Aetheria.State.Verse
["computeProgramAssetRef"] = "compute.environment.stardust",
["materialAssetRef"] = "material.environment.stardust",
["renderChannel"] = "world.transparent",
["features"] = "flow.global;noise.slope",
["features"] = useValue3DFlow
? "flow.global;flow.value3d;noise.slope"
: "flow.global;noise.slope",
["span"] = "256",
["threadGroupSize"] = "128",
["particleStrideBytes"] = "28",

View file

@ -94,7 +94,8 @@ namespace GameCult.Aetheria.State.Verse
asteroidMeshCount: 4,
bodyRadiusCurve: new AetheriaRuntimeExponentialCurve(0.25, 3.0, 0.0),
lightRadiusCurve: new AetheriaRuntimeExponentialCurve(0.25, 300.0, 0.0),
gravityWaveFrequencyCurve: new AetheriaRuntimeExponentialCurve(0.45, 0.2, 0.0));
gravityWaveFrequencyCurve: new AetheriaRuntimeExponentialCurve(0.45, 0.2, 0.0),
useValue3DFlow: true);
public AetheriaRuntimeDaemonRenderSettings(
AetheriaRuntimeExponentialCurve temperatureEmissionCurve,
@ -125,7 +126,8 @@ namespace GameCult.Aetheria.State.Verse
int asteroidMeshCount = int.MaxValue,
AetheriaRuntimeExponentialCurve bodyRadiusCurve = default,
AetheriaRuntimeExponentialCurve lightRadiusCurve = default,
AetheriaRuntimeExponentialCurve gravityWaveFrequencyCurve = default)
AetheriaRuntimeExponentialCurve gravityWaveFrequencyCurve = default,
bool useValue3DFlow = false)
{
TemperatureEmissionCurve = temperatureEmissionCurve;
LockIndicatorFrequency = lockIndicatorFrequency;
@ -156,6 +158,7 @@ namespace GameCult.Aetheria.State.Verse
BodyRadiusCurve = bodyRadiusCurve;
LightRadiusCurve = lightRadiusCurve;
GravityWaveFrequencyCurve = gravityWaveFrequencyCurve;
UseValue3DFlow = useValue3DFlow;
}
public AetheriaRuntimeExponentialCurve TemperatureEmissionCurve { get; }
@ -187,6 +190,7 @@ namespace GameCult.Aetheria.State.Verse
public AetheriaRuntimeExponentialCurve BodyRadiusCurve { get; }
public AetheriaRuntimeExponentialCurve LightRadiusCurve { get; }
public AetheriaRuntimeExponentialCurve GravityWaveFrequencyCurve { get; }
public bool UseValue3DFlow { get; }
public int ResolveDefaultMinimapZoomIndex()
{