Publish gravity fog through generic Eve fields
This commit is contained in:
parent
84429ad6eb
commit
6f0375f4ad
22 changed files with 293 additions and 230 deletions
|
|
@ -23,7 +23,7 @@
|
|||
"org.gamecult.cultmath": "file:../../CultMath",
|
||||
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.13",
|
||||
"org.gamecult.eve.surface": "file:../../EveUnity/packages/org.gamecult.eve.surface",
|
||||
"org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1",
|
||||
"org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.2.0",
|
||||
"org.gamecult.eve.unity-scene": "file:../../EveUnity/packages/org.gamecult.eve.unity-scene",
|
||||
"org.gamecult.eve.unity-uitoolkit": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-uitoolkit#eveunity-uitoolkit-v0.1.0",
|
||||
"com.unity.modules.accessibility": "1.0.0",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using GameCult.Mesh;
|
||||
using GameCult.Eve.PluginFields;
|
||||
using MessagePack;
|
||||
using EveSurfaceDocument = GameCult.Eve.Surface.EveSurfaceDocument;
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGameViewportDocument>> _mapViewport;
|
||||
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeObjectsViewportDocument>> _objectsViewport;
|
||||
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGravityViewportDocument>> _gravityViewport;
|
||||
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeRenderSplatsViewportDocument>> _renderSplatsViewport;
|
||||
private readonly Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<EveFieldsSplatsDocument>> _renderSplatsViewport;
|
||||
private readonly Func<int, CultMeshDocumentHandle<AetheriaRuntimeZoneDetailsDocument>> _zoneDetails;
|
||||
private readonly Func<int, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> _zoneDetailsSurface;
|
||||
private readonly Func<AetheriaRuntimeInventoryPanelSurfaceRequest, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> _inventoryPanelSurface;
|
||||
|
|
@ -61,7 +62,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGameViewportDocument>> mapViewport,
|
||||
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeObjectsViewportDocument>> objectsViewport,
|
||||
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeGravityViewportDocument>> gravityViewport,
|
||||
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<AetheriaRuntimeRenderSplatsViewportDocument>> renderSplatsViewport,
|
||||
Func<AetheriaRuntimeViewportBounds, CultMeshDocumentHandle<EveFieldsSplatsDocument>> renderSplatsViewport,
|
||||
Func<int, CultMeshDocumentHandle<AetheriaRuntimeZoneDetailsDocument>> zoneDetails,
|
||||
Func<int, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> zoneDetailsSurface,
|
||||
Func<AetheriaRuntimeInventoryPanelSurfaceRequest, CultMeshDocumentHandle<AetheriaRuntimeSurfaceDocument>> inventoryPanelSurface,
|
||||
|
|
@ -229,7 +230,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
return _gravityViewport(viewport ?? new AetheriaRuntimeViewportBounds());
|
||||
}
|
||||
|
||||
public CultMeshDocumentHandle<AetheriaRuntimeRenderSplatsViewportDocument> RenderSplatsViewport(
|
||||
public CultMeshDocumentHandle<EveFieldsSplatsDocument> RenderSplatsViewport(
|
||||
AetheriaRuntimeViewportBounds viewport)
|
||||
{
|
||||
return _renderSplatsViewport(viewport ?? new AetheriaRuntimeViewportBounds());
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ namespace GameCult.Aetheria.State.Verse
|
|||
var entries = new Dictionary<string, AetheriaRuntimeAssetManifestEntry>(StringComparer.Ordinal);
|
||||
Add(entries, EnvironmentSkyboxMaterial());
|
||||
Add(entries, EnvironmentReflectionCubemap());
|
||||
Add(entries, EnvironmentGravityFogShader());
|
||||
Add(entries, EnvironmentDitherTexture());
|
||||
Add(entries, MapIcon("entity.player", "Player", "Sprites/Icons/Stroked/Ship"));
|
||||
Add(entries, MapIcon("entity.ship", "Ship", "Sprites/Icons/Stroked/Ship"));
|
||||
Add(entries, MapIcon("entity.orbital", "Orbital", "Sprites/Icons/Stroked/orbital"));
|
||||
|
|
@ -207,6 +209,90 @@ namespace GameCult.Aetheria.State.Verse
|
|||
};
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeAssetManifestEntry EnvironmentGravityFogShader()
|
||||
{
|
||||
return new AetheriaRuntimeAssetManifestEntry
|
||||
{
|
||||
Ref = new AetheriaRuntimeAssetRef
|
||||
{
|
||||
AssetKey = "shader.environment.gravity-fog",
|
||||
Kind = AetheriaRuntimeAssetKinds.Shader,
|
||||
Uri = CultMeshAssetUri("shader.environment.gravity-fog"),
|
||||
MimeType = "application/vnd.unity.shader",
|
||||
Metadata = new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
{
|
||||
["unityAssetPath"] = "Assets/Shaders/Raymarching/CloudShader.shader",
|
||||
["presentationRole"] = "environment.gravity-fog.volume",
|
||||
["unity.volume.pass.raymarch"] = "0",
|
||||
["unity.volume.pass.composite"] = "2",
|
||||
["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.noise.slope.keyword"] = "NOISE_SLOPE",
|
||||
["unity.volume.texturePort.surfaceHeight"] = "_NebulaSurfaceHeight",
|
||||
["unity.volume.texturePort.patchHeight"] = "_NebulaPatchHeight",
|
||||
["unity.volume.texturePort.patch"] = "_NebulaPatch",
|
||||
["unity.volume.texturePort.tint"] = "_NebulaTint",
|
||||
["unity.volume.texturePort.dither"] = "_DitheringTex",
|
||||
["unity.volume.texturePort.cloud"] = "_CloudTex",
|
||||
["unity.volume.vectorPort.viewportTransform"] = "_GridTransform",
|
||||
["unity.volume.matrixPort.cameraInverseViewProjection"] = "_CamInvProj",
|
||||
["unity.volume.vectorPort.cameraProjectionExtents"] = "_ProjectionExtents",
|
||||
["unity.volume.floatPort.raymarchOffset"] = "_RaymarchOffset",
|
||||
["unity.volume.vectorPort.ditherCoordinates"] = "_DitheringCoords",
|
||||
["unity.volume.floatPort.fillDensity"] = "_NebulaFillDensity",
|
||||
["unity.volume.floatPort.fillDistance"] = "_NebulaFillDistance",
|
||||
["unity.volume.floatPort.fillExponent"] = "_NebulaFillExponent",
|
||||
["unity.volume.floatPort.fillOffset"] = "_NebulaFillOffset",
|
||||
["unity.volume.floatPort.patchDensity"] = "_NebulaPatchDensity",
|
||||
["unity.volume.floatPort.floorOffset"] = "_NebulaFloorOffset",
|
||||
["unity.volume.floatPort.floorBlend"] = "_NebulaFloorBlend",
|
||||
["unity.volume.floatPort.patchBlend"] = "_NebulaPatchBlend",
|
||||
["unity.volume.floatPort.luminance"] = "_NebulaLuminance",
|
||||
["unity.volume.floatPort.extinction"] = "_ExtinctionCoefficient",
|
||||
["unity.volume.floatPort.tintLodExponent"] = "_TintLodExponent",
|
||||
["unity.volume.floatPort.safetyDistance"] = "_SafetyDistance",
|
||||
["unity.volume.floatPort.flowScale"] = "_FlowScale",
|
||||
["unity.volume.floatPort.flowAmplitude"] = "_FlowAmplitude",
|
||||
["unity.volume.floatPort.flowPeriod"] = "_FlowPeriod",
|
||||
["unity.volume.floatPort.flowSlopeAmplitude"] = "_FlowSlopeAmplitude",
|
||||
["unity.volume.floatPort.flowSwirlAmplitude"] = "_FlowSwirlAmplitude",
|
||||
["unity.volume.floatPort.noiseScale"] = "_NebulaNoiseScale",
|
||||
["unity.volume.floatPort.noiseAmplitude"] = "_NebulaNoiseAmplitude",
|
||||
["unity.volume.floatPort.noiseExponent"] = "_NebulaNoiseExponent",
|
||||
["unity.volume.floatPort.noiseSpeed"] = "_NebulaNoiseSpeed",
|
||||
["unity.volume.floatPort.noiseSlopeExponent"] = "_NebulaNoiseSlopeExponent",
|
||||
["unity.volume.floatPort.dynamicSkyBoost"] = "_DynamicSkyBoost",
|
||||
["unity.volume.floatPort.dynamicLodHigh"] = "_DynamicLodHigh",
|
||||
["unity.volume.floatPort.dynamicLodLow"] = "_DynamicLodLow",
|
||||
["unity.volume.floatPort.dynamicIntensity"] = "_DynamicIntensity",
|
||||
["unity.volume.floatPort.compositeOpacity"] = "_CompositeOpacity"
|
||||
}
|
||||
},
|
||||
Tags = new[] { "presentation", "environment", "gravity", "fog", "volume" }
|
||||
};
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeAssetManifestEntry EnvironmentDitherTexture()
|
||||
{
|
||||
return new AetheriaRuntimeAssetManifestEntry
|
||||
{
|
||||
Ref = new AetheriaRuntimeAssetRef
|
||||
{
|
||||
AssetKey = "texture.environment.volume-dither",
|
||||
Kind = AetheriaRuntimeAssetKinds.Texture,
|
||||
Uri = CultMeshAssetUri("texture.environment.volume-dither"),
|
||||
MimeType = "image/png",
|
||||
Metadata = new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
{
|
||||
["unityAssetPath"] = "Assets/Resources/LDR_LLL1_0.png",
|
||||
["presentationRole"] = "environment.volume.dither"
|
||||
}
|
||||
},
|
||||
Tags = new[] { "presentation", "environment", "volume", "pre-generated" }
|
||||
};
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeAssetManifestEntry MapIcon(
|
||||
string key,
|
||||
string label,
|
||||
|
|
|
|||
|
|
@ -655,6 +655,7 @@ 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"));
|
||||
|
||||
return new AetheriaRuntimeSurfaceComponent(
|
||||
id,
|
||||
|
|
@ -677,6 +678,40 @@ namespace GameCult.Aetheria.State.Verse
|
|||
});
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeSurfaceComponent GravityFogVolume(string id)
|
||||
{
|
||||
var viewport = DefaultViewport();
|
||||
var props = new Dictionary<string, string>(StringComparer.Ordinal)
|
||||
{
|
||||
["label"] = "Gravity-shaped volumetric fog",
|
||||
["documentRef"] = ViewportDocumentId("aetheria.viewport.render_splats", viewport),
|
||||
["documentSchema"] = AetheriaRuntimeDaemonSchemas.RenderSplatsViewport,
|
||||
["materialAssetRef"] = "shader.environment.gravity-fog",
|
||||
["renderChannel"] = "world.transparent",
|
||||
["compositeMode"] = "premultiplied-alpha",
|
||||
["quality"] = "high",
|
||||
["features"] = "flow.global;noise.slope",
|
||||
["textureWidth"] = "1024",
|
||||
["textureHeight"] = "1024",
|
||||
["downsample"] = "0",
|
||||
["layerBindings"] = "gravity.height=surfaceHeight;fog.patch_height=patchHeight;fog.patch=patch;fog.tint=tint",
|
||||
["assetTextureBindings"] = "texture.environment.volume-dither=dither",
|
||||
["vectorParameters"] = "ditherCoordinates=0,0,0,0",
|
||||
["floatParameters"] = "fillDensity=0.000000001;fillDistance=120;fillExponent=5;fillOffset=70;" +
|
||||
"patchDensity=0.35;floorOffset=-20;floorBlend=10;patchBlend=25;luminance=1;extinction=0.5;" +
|
||||
"tintLodExponent=-0.45;safetyDistance=30;flowScale=512;flowAmplitude=15;flowPeriod=8;" +
|
||||
"flowSlopeAmplitude=0;flowSwirlAmplitude=0;noiseScale=414.2167;noiseAmplitude=-36.17;" +
|
||||
"noiseExponent=-0.25;noiseSpeed=0.0025;noiseSlopeExponent=0.15;dynamicSkyBoost=2;" +
|
||||
"dynamicLodHigh=7;dynamicLodLow=2;dynamicIntensity=0.5;compositeOpacity=0.3"
|
||||
};
|
||||
return new AetheriaRuntimeSurfaceComponent(
|
||||
id,
|
||||
"field.volume3d",
|
||||
props,
|
||||
Array.Empty<AetheriaRuntimeSurfaceComponent>(),
|
||||
AetheriaRuntimeSurfaceStateBindings.FromProps(props));
|
||||
}
|
||||
|
||||
private static AetheriaRuntimeSurfaceComponent? AimPresentation(
|
||||
AetheriaRuntimeRunCheckpointCommit run,
|
||||
AetheriaRuntimeZoneSnapshotCommit zone,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using GameCult.Eve.PluginFields;
|
||||
|
||||
#nullable enable
|
||||
|
||||
|
|
@ -110,7 +111,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
};
|
||||
}
|
||||
|
||||
public static AetheriaRuntimeRenderSplatsViewportDocument RenderSplatsViewport(
|
||||
public static EveFieldsSplatsDocument RenderSplatsViewport(
|
||||
AetheriaRuntimeDaemonFrameDocument frame,
|
||||
AetheriaRuntimeViewportBounds viewport)
|
||||
{
|
||||
|
|
@ -219,7 +220,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
radius,
|
||||
radius,
|
||||
AetheriaRuntimeRenderSplatChannels.Gravity,
|
||||
AetheriaRuntimeRenderSplatFalloffs.InverseSmooth,
|
||||
AetheriaRuntimeRenderSplatFalloffs.Smooth,
|
||||
-body.GravityWellDepth,
|
||||
0,
|
||||
0,
|
||||
|
|
@ -245,7 +246,9 @@ namespace GameCult.Aetheria.State.Verse
|
|||
|
||||
if (IsBodyKind(body, "sun"))
|
||||
{
|
||||
var tintRadius = Math.Max(radius, Math.Max(32, body.BodyRadiusMultiplier * 70) *
|
||||
var tintRadius = Math.Max(
|
||||
radius,
|
||||
Math.Pow(Math.Max(0, body.Mass), 0.25) * 300 *
|
||||
Math.Max(0.01, body.SunVisual?.LightRadiusMultiplier ?? 1.0));
|
||||
splats.Add(
|
||||
layerIndices[AetheriaRuntimeRenderSplatLayerKeys.FogTint],
|
||||
|
|
@ -292,7 +295,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
AetheriaRuntimeRunCheckpointCommit.EntityRecordKey(context.RunId, zone.ZoneIndex, entity.EntityIndex));
|
||||
}
|
||||
|
||||
return new AetheriaRuntimeRenderSplatsViewportDocument
|
||||
return new EveFieldsSplatsDocument
|
||||
{
|
||||
FrameId = frame.FrameId,
|
||||
PublishedAtUtc = frame.PublishedAtUtc ?? "",
|
||||
|
|
@ -300,17 +303,23 @@ namespace GameCult.Aetheria.State.Verse
|
|||
RunId = context.RunId,
|
||||
ZoneIndex = zone.ZoneIndex,
|
||||
ZoneName = string.IsNullOrWhiteSpace(zone.Name) ? $"Zone {zone.ZoneIndex}" : zone.Name,
|
||||
Viewport = normalizedViewport,
|
||||
Viewport = new EveFieldsViewport
|
||||
{
|
||||
MinX = normalizedViewport.MinX,
|
||||
MinY = normalizedViewport.MinY,
|
||||
MaxX = normalizedViewport.MaxX,
|
||||
MaxY = normalizedViewport.MaxY
|
||||
},
|
||||
Layers = layers,
|
||||
Splats = splats.Build()
|
||||
};
|
||||
}
|
||||
|
||||
private static IReadOnlyList<AetheriaRuntimeRenderSplatLayerDefinition> BuildDefaultRenderSplatLayers()
|
||||
private static IReadOnlyList<EveFieldsSplatLayer> BuildDefaultRenderSplatLayers()
|
||||
{
|
||||
return new[]
|
||||
{
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.GravityHeight,
|
||||
DisplayName = "Gravity Height",
|
||||
|
|
@ -318,7 +327,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
BlendMode = AetheriaRuntimeRenderSplatBlendModes.Add,
|
||||
GraphicsFormat = "R16_SFloat"
|
||||
},
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.GravityWave,
|
||||
DisplayName = "Gravity Wave",
|
||||
|
|
@ -326,7 +335,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
BlendMode = AetheriaRuntimeRenderSplatBlendModes.Add,
|
||||
GraphicsFormat = "R16_SFloat"
|
||||
},
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.Visibility,
|
||||
DisplayName = "Visibility Mask",
|
||||
|
|
@ -334,7 +343,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
BlendMode = AetheriaRuntimeRenderSplatBlendModes.Max,
|
||||
GraphicsFormat = "R16_SFloat"
|
||||
},
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.FogSurfaceHeight,
|
||||
DisplayName = "Fog Surface Height",
|
||||
|
|
@ -342,7 +351,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
BlendMode = AetheriaRuntimeRenderSplatBlendModes.Add,
|
||||
GraphicsFormat = "R16_SFloat"
|
||||
},
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.FogPatchHeight,
|
||||
DisplayName = "Fog Patch Height",
|
||||
|
|
@ -350,7 +359,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
BlendMode = AetheriaRuntimeRenderSplatBlendModes.Add,
|
||||
GraphicsFormat = "R16_SFloat"
|
||||
},
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.FogPatch,
|
||||
DisplayName = "Fog Patch",
|
||||
|
|
@ -358,7 +367,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
BlendMode = AetheriaRuntimeRenderSplatBlendModes.Max,
|
||||
GraphicsFormat = "R16_SFloat"
|
||||
},
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.FogTint,
|
||||
DisplayName = "Fog Tint",
|
||||
|
|
@ -366,7 +375,7 @@ namespace GameCult.Aetheria.State.Verse
|
|||
BlendMode = AetheriaRuntimeRenderSplatBlendModes.Add,
|
||||
GraphicsFormat = "B10G11R11_UFloatPack32"
|
||||
},
|
||||
new AetheriaRuntimeRenderSplatLayerDefinition
|
||||
new EveFieldsSplatLayer
|
||||
{
|
||||
LayerKey = AetheriaRuntimeRenderSplatLayerKeys.Influence,
|
||||
DisplayName = "Influence",
|
||||
|
|
@ -1547,9 +1556,9 @@ namespace GameCult.Aetheria.State.Verse
|
|||
_sourceFlags.Add(sourceFlags);
|
||||
}
|
||||
|
||||
public AetheriaRuntimeRenderSplatSoa Build()
|
||||
public EveFieldsSplatSoa Build()
|
||||
{
|
||||
return new AetheriaRuntimeRenderSplatSoa
|
||||
return new EveFieldsSplatSoa
|
||||
{
|
||||
Count = _centerX.Count,
|
||||
CenterX = _centerX.ToArray(),
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using GameCult.Caching;
|
||||
using GameCult.Eve.PluginFields;
|
||||
using MessagePack;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace GameCult.Aetheria.State.Verse
|
||||
{
|
||||
// Aetheria owns how simulation state becomes splats. The persisted document,
|
||||
// layer, viewport, and SoA wire types are owned by GameCult.Eve.PluginFields.
|
||||
public static class AetheriaRuntimeRenderSplatChannels
|
||||
{
|
||||
public const int Visibility = 0;
|
||||
|
|
@ -50,148 +46,4 @@ namespace GameCult.Aetheria.State.Verse
|
|||
public const int Smooth = 2;
|
||||
public const int InverseSmooth = 3;
|
||||
}
|
||||
|
||||
[CultDocument("gamecult.fields.splats", "gamecult.fields.splats.v1")]
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaRuntimeRenderSplatsViewportDocument : IEveFieldsSplatsDocument
|
||||
{
|
||||
[Key(0)]
|
||||
public string Schema { get; set; } = AetheriaRuntimeDaemonSchemas.RenderSplatsViewport;
|
||||
|
||||
[Key(1)]
|
||||
public long FrameId { get; set; }
|
||||
|
||||
[Key(2)]
|
||||
public string PublishedAtUtc { get; set; } = "";
|
||||
|
||||
[Key(3)]
|
||||
public double SimulationTimeSeconds { get; set; }
|
||||
|
||||
[Key(4)]
|
||||
public string RunId { get; set; } = "";
|
||||
|
||||
[Key(5)]
|
||||
public int ZoneIndex { get; set; }
|
||||
|
||||
[Key(6)]
|
||||
public string ZoneName { get; set; } = "";
|
||||
|
||||
[Key(7)]
|
||||
public AetheriaRuntimeViewportBounds Viewport { get; set; } = new AetheriaRuntimeViewportBounds();
|
||||
|
||||
[Key(8)]
|
||||
public IReadOnlyList<AetheriaRuntimeRenderSplatLayerDefinition> Layers { get; set; } =
|
||||
Array.Empty<AetheriaRuntimeRenderSplatLayerDefinition>();
|
||||
|
||||
[Key(9)]
|
||||
public AetheriaRuntimeRenderSplatSoa Splats { get; set; } = new AetheriaRuntimeRenderSplatSoa();
|
||||
|
||||
IEveFieldsViewport IEveFieldsSplatsDocument.Viewport => Viewport;
|
||||
IReadOnlyList<IEveFieldsSplatLayer> IEveFieldsSplatsDocument.Layers => Layers;
|
||||
IEveFieldsSplatSoa IEveFieldsSplatsDocument.Splats => Splats;
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaRuntimeRenderSplatLayerDefinition : IEveFieldsSplatLayer
|
||||
{
|
||||
[Key(0)]
|
||||
public string LayerKey { get; set; } = "";
|
||||
|
||||
[Key(1)]
|
||||
public string DisplayName { get; set; } = "";
|
||||
|
||||
[Key(2)]
|
||||
public int Channel { get; set; }
|
||||
|
||||
[Key(3)]
|
||||
public string BlendMode { get; set; } = AetheriaRuntimeRenderSplatBlendModes.Add;
|
||||
|
||||
[Key(4)]
|
||||
public string GraphicsFormat { get; set; } = "R16_SFloat";
|
||||
|
||||
[Key(5)]
|
||||
public bool ClearBeforeDraw { get; set; } = true;
|
||||
|
||||
[Key(6)]
|
||||
public double ClearR { get; set; }
|
||||
|
||||
[Key(7)]
|
||||
public double ClearG { get; set; }
|
||||
|
||||
[Key(8)]
|
||||
public double ClearB { get; set; }
|
||||
|
||||
[Key(9)]
|
||||
public double ClearA { get; set; }
|
||||
}
|
||||
|
||||
[MessagePackObject]
|
||||
public sealed class AetheriaRuntimeRenderSplatSoa : IEveFieldsSplatSoa
|
||||
{
|
||||
[Key(0)]
|
||||
public int Count { get; set; }
|
||||
|
||||
[Key(1)]
|
||||
public IReadOnlyList<double> CenterX { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(2)]
|
||||
public IReadOnlyList<double> CenterY { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(3)]
|
||||
public IReadOnlyList<double> HalfExtentX { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(4)]
|
||||
public IReadOnlyList<double> HalfExtentY { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(5)]
|
||||
public IReadOnlyList<double> RotationCos { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(6)]
|
||||
public IReadOnlyList<double> RotationSin { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(7)]
|
||||
public IReadOnlyList<int> Channel { get; set; } = Array.Empty<int>();
|
||||
|
||||
[Key(8)]
|
||||
public IReadOnlyList<int> Falloff { get; set; } = Array.Empty<int>();
|
||||
|
||||
[Key(9)]
|
||||
public IReadOnlyList<double> ValueR { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(10)]
|
||||
public IReadOnlyList<double> ValueG { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(11)]
|
||||
public IReadOnlyList<double> ValueB { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(12)]
|
||||
public IReadOnlyList<double> ValueA { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(13)]
|
||||
public IReadOnlyList<string> SourceKey { get; set; } = Array.Empty<string>();
|
||||
|
||||
[Key(14)]
|
||||
public IReadOnlyList<int> LayerIndex { get; set; } = Array.Empty<int>();
|
||||
|
||||
[Key(15)]
|
||||
public IReadOnlyList<int> SourceKind { get; set; } = Array.Empty<int>();
|
||||
|
||||
[Key(16)]
|
||||
public IReadOnlyList<double> FrequencyX { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(17)]
|
||||
public IReadOnlyList<double> FrequencyY { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(18)]
|
||||
public IReadOnlyList<double> PhaseX { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(19)]
|
||||
public IReadOnlyList<double> PhaseY { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(20)]
|
||||
public IReadOnlyList<double> AnimationSpeed { get; set; } = Array.Empty<double>();
|
||||
|
||||
[Key(21)]
|
||||
public IReadOnlyList<double> SourceFlags { get; set; } = Array.Empty<double>();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -324,11 +324,13 @@
|
|||
"dependencies": {}
|
||||
},
|
||||
"org.gamecult.eve.plugin-fields": {
|
||||
"version": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1",
|
||||
"version": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.2.0",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {},
|
||||
"hash": "0b099274a4e2b4c301eced4322166837792f585a"
|
||||
"dependencies": {
|
||||
"org.gamecult.cultlib": "1.0.13"
|
||||
},
|
||||
"hash": "382a23d8f8a07e4b5eef5f81f84655861a858367"
|
||||
},
|
||||
"org.gamecult.eve.surface": {
|
||||
"version": "file:../../EveUnity/packages/org.gamecult.eve.surface",
|
||||
|
|
@ -344,9 +346,10 @@
|
|||
"source": "local",
|
||||
"dependencies": {
|
||||
"org.gamecult.cultlib": "1.0.13",
|
||||
"org.gamecult.eve.plugin-fields": "0.1.1",
|
||||
"org.gamecult.eve.surface": "0.2.1",
|
||||
"com.unity.mathematics": "1.3.2"
|
||||
"org.gamecult.eve.plugin-fields": "0.2.0",
|
||||
"org.gamecult.eve.surface": "0.2.2",
|
||||
"com.unity.mathematics": "1.3.2",
|
||||
"com.unity.modules.particlesystem": "1.0.0"
|
||||
}
|
||||
},
|
||||
"org.gamecult.eve.unity-uitoolkit": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue