Restore Stardust temporal coverage
This commit is contained in:
parent
68c12f2201
commit
d8a01339cc
10 changed files with 92 additions and 17 deletions
|
|
@ -253,6 +253,9 @@ internal sealed class AetheriaDaemonYmirSmokeChecks
|
|||
stardust.Props["particleStrideBytes"] == "28" &&
|
||||
stardust.Props["viewportAnchor"] == "active-camera.xz" &&
|
||||
stardust.Props["layerBindings"] == "fog.surface_height=surfaceHeight;fog.tint=tint" &&
|
||||
stardust.Props["materialAssetTextureBindings"] == "texture.environment.volume-dither=dither" &&
|
||||
stardust.Props["materialViewportTextureScaleBindings"] == "ditherCoordinates=dither" &&
|
||||
stardust.Props["materialRenderFrameIndexPort"] == "frameIndex" &&
|
||||
stardust.Props["cellWorldSize"] == "6" &&
|
||||
stardust.Props["gravityTexelsPerCell"] == "8" &&
|
||||
stardust.Props["viewportSnapLayer"] == "fog.surface_height" &&
|
||||
|
|
@ -302,6 +305,9 @@ internal sealed class AetheriaDaemonYmirSmokeChecks
|
|||
stardustCompute.Ref.Metadata["unity.particles.intPort.span"] == "span" &&
|
||||
stardustMaterial.Ref.Metadata["unity.particles.bufferPort.particles"] == "particles" &&
|
||||
stardustMaterial.Ref.Metadata["unity.particles.bufferPort.quadPoints"] == "quadPoints" &&
|
||||
stardustMaterial.Ref.Metadata["unity.particles.texturePort.dither"] == "_DitheringTex" &&
|
||||
stardustMaterial.Ref.Metadata["unity.particles.vectorPort.ditherCoordinates"] == "_DitheringCoords" &&
|
||||
stardustMaterial.Ref.Metadata["unity.particles.intPort.frameIndex"] == "_FrameNumber" &&
|
||||
stardustColors.Ref.Metadata["unityAssetPath"] == "Assets/Resources/Gradients/blackbody.png",
|
||||
"provider asset metadata must own the exact Stardust compute/render ABI and authored color ramp");
|
||||
var fogVolume = Flatten(surface.Surface.Root)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,6 @@
|
|||
"org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.15",
|
||||
"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.3",
|
||||
"org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.2",
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.56"
|
||||
"org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.57"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@
|
|||
"hash": "140e1bd963a0033e66777a3b2c5fe6e9c97dfe32"
|
||||
},
|
||||
"org.gamecult.eve.unity-scene": {
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.56",
|
||||
"version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.57",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
"com.unity.render-pipelines.universal": "17.4.0",
|
||||
"com.unity.modules.particlesystem": "1.0.0"
|
||||
},
|
||||
"hash": "dfa843cde2c0d9328bb2fa342c9378bf3cdfe6f4"
|
||||
"hash": "0974154fa7c7982c9a8ea0ca006d2698a53e1235"
|
||||
},
|
||||
"com.unity.modules.assetbundle": {
|
||||
"version": "1.0.0",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Aetheria.Editor
|
||||
|
|
@ -18,6 +20,39 @@ namespace Aetheria.Editor
|
|||
public float Size;
|
||||
}
|
||||
|
||||
internal static void VerifyTemporalDitherMaterial(Material material, bool requireAuthoredSource)
|
||||
{
|
||||
if (material == null || material.shader == null)
|
||||
throw new ArgumentNullException(nameof(material));
|
||||
if (!material.HasProperty("_DitheringTex"))
|
||||
throw new InvalidOperationException("Stardust render material has no temporal dither texture port.");
|
||||
var shaderPath = AssetDatabase.GetAssetPath(material.shader);
|
||||
var source = string.IsNullOrWhiteSpace(shaderPath) || !File.Exists(shaderPath)
|
||||
? ""
|
||||
: File.ReadAllText(shaderPath);
|
||||
if (string.IsNullOrWhiteSpace(source))
|
||||
{
|
||||
if (requireAuthoredSource)
|
||||
throw new InvalidOperationException("Stardust authored shader source is unavailable for verification.");
|
||||
return;
|
||||
}
|
||||
var required = new[]
|
||||
{
|
||||
"_FrameNumber",
|
||||
"SAMPLE_TEXTURE2D",
|
||||
"clip(alpha - dither",
|
||||
"Blend One Zero",
|
||||
"ZWrite On"
|
||||
};
|
||||
foreach (var token in required)
|
||||
if (!source.Contains(token, StringComparison.Ordinal))
|
||||
throw new InvalidOperationException(
|
||||
$"Stardust render shader lost required temporal coverage token '{token}'.");
|
||||
if (source.Contains("_AlphaClip", StringComparison.Ordinal))
|
||||
throw new InvalidOperationException(
|
||||
"Stardust render shader regressed to a fixed alpha threshold instead of temporal coverage.");
|
||||
}
|
||||
|
||||
internal static void VerifyOneCellShift(ComputeShader program)
|
||||
{
|
||||
if (program == null) throw new ArgumentNullException(nameof(program));
|
||||
|
|
|
|||
|
|
@ -53,6 +53,11 @@ namespace Aetheria.Editor
|
|||
.ToArray();
|
||||
if (assetNames.Length == 0)
|
||||
throw new InvalidOperationException("Aetheria Eve bundle has no provider Unity assets.");
|
||||
var authoredStardustMaterial = AssetDatabase.LoadAssetAtPath<Material>(
|
||||
"Assets/Shaders/Compute/Stardust/Stardust.mat");
|
||||
AetheriaStardustContinuityVerifier.VerifyTemporalDitherMaterial(
|
||||
authoredStardustMaterial,
|
||||
requireAuthoredSource: true);
|
||||
|
||||
var manifest = BuildPipeline.BuildAssetBundles(
|
||||
output,
|
||||
|
|
@ -593,6 +598,9 @@ namespace Aetheria.Editor
|
|||
"Assets/Shaders/Compute/Stardust/Stardust.mat");
|
||||
if (stardustMaterial == null || stardustMaterial.shader == null || !stardustMaterial.shader.isSupported)
|
||||
throw new InvalidOperationException("Aetheria Eve bundle has no supported Stardust render material.");
|
||||
AetheriaStardustContinuityVerifier.VerifyTemporalDitherMaterial(
|
||||
stardustMaterial,
|
||||
requireAuthoredSource: false);
|
||||
var stardustColors = LoadAuthoredAsset<Texture2D>(bundle, assetNames,
|
||||
"Assets/Resources/Gradients/blackbody.png");
|
||||
if (stardustColors == null)
|
||||
|
|
|
|||
|
|
@ -7,15 +7,15 @@ Shader "Aetheria/Stardust (Compute)"
|
|||
_DistanceIntensityExponent ("Distance Intensity Exponent", Float) = 1
|
||||
_EmissionGain ("Emission Gain", Range(0, 1)) = 0.3
|
||||
_Power ("Power", Float) = 2
|
||||
_AlphaClip ("Alpha Clip", Range(0, 1)) = 0.05
|
||||
[HideInInspector] _DitheringTex ("Dithering Texture", 2D) = "white" {}
|
||||
}
|
||||
|
||||
SubShader
|
||||
{
|
||||
Tags
|
||||
{
|
||||
"Queue" = "Transparent"
|
||||
"RenderType" = "Transparent"
|
||||
"Queue" = "AlphaTest"
|
||||
"RenderType" = "TransparentCutout"
|
||||
"IgnoreProjector" = "True"
|
||||
"RenderPipeline" = "UniversalPipeline"
|
||||
}
|
||||
|
|
@ -25,9 +25,9 @@ Shader "Aetheria/Stardust (Compute)"
|
|||
Name "Stardust"
|
||||
Tags { "LightMode" = "UniversalForward" }
|
||||
|
||||
Blend One One
|
||||
Blend One Zero
|
||||
Cull Off
|
||||
ZWrite Off
|
||||
ZWrite On
|
||||
|
||||
HLSLPROGRAM
|
||||
#pragma vertex Vert
|
||||
|
|
@ -52,13 +52,18 @@ Shader "Aetheria/Stardust (Compute)"
|
|||
float _Power;
|
||||
float _DistanceSizeExponent;
|
||||
float _DistanceIntensityExponent;
|
||||
float _AlphaClip;
|
||||
CBUFFER_END
|
||||
|
||||
TEXTURE2D(_DitheringTex);
|
||||
SAMPLER(sampler_DitheringTex);
|
||||
float4 _DitheringCoords;
|
||||
int _FrameNumber;
|
||||
|
||||
struct Varyings
|
||||
{
|
||||
float4 positionCS : SV_POSITION;
|
||||
float2 uv : TEXCOORD0;
|
||||
float4 screenPosition : TEXCOORD1;
|
||||
float4 color : COLOR;
|
||||
};
|
||||
|
||||
|
|
@ -76,6 +81,7 @@ Shader "Aetheria/Stardust (Compute)"
|
|||
|
||||
output.positionCS = mul(UNITY_MATRIX_P, viewPosition + float4(quadPoint, 0.0));
|
||||
output.uv = quadPoints[vertexId].xy + 0.5;
|
||||
output.screenPosition = ComputeScreenPos(output.positionCS);
|
||||
output.color = float4(
|
||||
particles[instanceId].color * _TintColor.rgb,
|
||||
100.0 * pow(100.0, _DistanceIntensityExponent) / pow(dist, _DistanceIntensityExponent));
|
||||
|
|
@ -92,8 +98,14 @@ Shader "Aetheria/Stardust (Compute)"
|
|||
float4 Frag(Varyings input) : SV_Target
|
||||
{
|
||||
float emission = PowerPulse(length(input.uv - float2(0.5, 0.5)) * 2.0, _Power);
|
||||
clip(emission * input.color.a - _AlphaClip);
|
||||
return float4(input.color.rgb * emission * exp(_EmissionGain * 5.0), 1.0);
|
||||
float2 screenUv = input.screenPosition.xy / input.screenPosition.w;
|
||||
half dither = frac(SAMPLE_TEXTURE2D(
|
||||
_DitheringTex,
|
||||
sampler_DitheringTex,
|
||||
screenUv * _DitheringCoords.xy).r + _FrameNumber * 1.61803398875);
|
||||
float alpha = emission * input.color.a;
|
||||
clip(alpha - dither - 0.001 * (1.0 - ceil(alpha)));
|
||||
return input.color * emission * exp(_EmissionGain * 5.0);
|
||||
}
|
||||
ENDHLSL
|
||||
}
|
||||
|
|
|
|||
|
|
@ -411,7 +411,10 @@ namespace GameCult.Aetheria.State.Verse
|
|||
["presentationRole"] = "environment.stardust.render",
|
||||
["unity.particles.pass.render"] = "0",
|
||||
["unity.particles.bufferPort.particles"] = "particles",
|
||||
["unity.particles.bufferPort.quadPoints"] = "quadPoints"
|
||||
["unity.particles.bufferPort.quadPoints"] = "quadPoints",
|
||||
["unity.particles.texturePort.dither"] = "_DitheringTex",
|
||||
["unity.particles.vectorPort.ditherCoordinates"] = "_DitheringCoords",
|
||||
["unity.particles.intPort.frameIndex"] = "_FrameNumber"
|
||||
}
|
||||
},
|
||||
Tags = new[] { "presentation", "environment", "stardust", "particles", "material" }
|
||||
|
|
|
|||
|
|
@ -781,6 +781,9 @@ namespace GameCult.Aetheria.State.Verse
|
|||
["layerTargetDescriptors"] = "fog.surface_height=2,2,false,bilinear;" +
|
||||
"fog.tint=0.5,0.5,true,trilinear",
|
||||
["assetTextureBindings"] = "texture.environment.stardust-colors=hue",
|
||||
["materialAssetTextureBindings"] = "texture.environment.volume-dither=dither",
|
||||
["materialViewportTextureScaleBindings"] = "ditherCoordinates=dither",
|
||||
["materialRenderFrameIndexPort"] = "frameIndex",
|
||||
["viewportAnchor"] = "active-camera.xz",
|
||||
["cellWorldSize"] = "6",
|
||||
["gravityTexelsPerCell"] = "8",
|
||||
|
|
|
|||
|
|
@ -1102,7 +1102,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
- Inputs: the same typed `gamecult.eve.fields.splats.v1` document used by the
|
||||
fog volume; gravity surface height and gravity-derived tint (not patch or
|
||||
patch-height layers); the provider compute shader, material, and blackbody
|
||||
color texture; active camera XZ; and daemon simulation time.
|
||||
color texture; the provider dither texture; active camera XZ; daemon
|
||||
simulation time; and the client render-frame index used only for temporal
|
||||
coverage.
|
||||
- Outputs: `field.particles3d` names the provider programs, logical field and
|
||||
asset ports, the 256-by-256 row-major particle grid, 128-thread dispatch,
|
||||
28-byte particle stride, exact fossil values, and camera-followed viewport
|
||||
|
|
@ -1128,7 +1130,9 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
generic lowerers call the same viewport-frame resolver and receive identical
|
||||
`EveFieldsViewport` bounds.
|
||||
- Derived state: GPU buffers, generated quads, raster targets, keywords, and
|
||||
draw calls are client presentation state. They cannot feed simulation.
|
||||
draw calls are client presentation state. The viewport-scaled dither
|
||||
coordinates and render-frame index are also presentation state; they cannot
|
||||
feed particle identity, phase, position, or simulation.
|
||||
- Forbidden writers: EveUnity cannot reseed, pool, randomly initialize, move,
|
||||
recolor, or CPU-generate particles. Aetheria cannot publish per-particle rows
|
||||
or make the field a gameplay body set.
|
||||
|
|
@ -1143,9 +1147,13 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
all seven particle floats bit-identical while the same buffer slot changes
|
||||
identity. The released witness must record 65,536 particles, one compute
|
||||
dispatch and one pilot-camera draw while the map camera remains isolated.
|
||||
The released `0.3.56` witness additionally requires the live fog and particle
|
||||
The released `0.3.57` witness additionally requires the live fog and particle
|
||||
grid centers to be equal and the leased pilot camera to report URP temporal
|
||||
anti-aliasing with the advertised history and jitter values.
|
||||
anti-aliasing with the advertised history and jitter values. It resolves the
|
||||
material's logical ports from provider metadata and proves the cloned live
|
||||
material holds the provider dither texture, pixel scale, and advancing render
|
||||
frame. The bundle gate rejects a fixed `_AlphaClip` regression and requires
|
||||
the fossil temporal-coverage, overwrite-blend, and depth-write source tokens.
|
||||
|
||||
### Gravity Fog Presentation Contract
|
||||
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ validation proves contract shape, not wiring, exclusivity, lowering, or parity.
|
|||
| Render channels | Unity layers/culling masks | provider surface policy + runtime asset variant | semantic channel exclusions | EveUnity native layer mapping | wired, exclusive, and lowered: the pilot surface excludes the semantic `map` channel; the Unity asset variant maps `map` to its authored native layer; EveUnity subtracts that layer from the configured camera mask; portable state contains no Unity layer or mask; provider conversion preserves the source icon shader's unlit lighting model; the released witness proves the pilot camera excludes map glyphs while the map camera retains readable white glyphs without a scene light | preserve the channel proof while world presentation and transport continue to evolve |
|
||||
| Minimap/tactical map | `ZoneRenderer`, map cameras | daemon world facts | explicit map projections | Unity and Electron | facts fragmented; generic lowerers absent | same state in both runtimes |
|
||||
| Celestial world | `ZoneRenderer`, body/asteroid prefab scripts | daemon render projection plus provider assets | ordinary generic Eve entity SoA rows | EveUnity generic entity/prefab lowerer | wired, exclusive, projected, and lowered: daemon orbit and terrain queries emit stable presentation-only identities for suns, planets, gas giants, and live asteroid instances; provider packaging extracts only each advertised visual child and strips fossil scripts/physics; released EveUnity `0.3.51` applies semantic scale around provider-authored local scale and contains no celestial or Aetheria branch. The released warm witness records eleven bodies and eighteen asteroids with provider refs and enabled renderers, including seven celestial instances intersecting the pilot frustum | body material/light readability, close-range composition matching the fossil, asteroid variation, and Electron lowering |
|
||||
| Fields/fog/gravity | zone renderer and shaders | daemon/plugin semantics | Fields plugin documents | EveUnity fields lowerer | daemon publishes canonical gravity/fog splat layers through `field.volume3d`; Eve Fields `0.2.3` owns portable `PowerPulse` and `AnimatedRadialCosine` semantics; Aetheria emits the fossil global animated simplex/cellular/ambient stack, body-owned radial waves, and separate negative gameplay `gravity.height` and positive visual `fog.surface_height`; the shared camera-relative lattice spans 1536 world units as 256 six-unit Stardust cells, rasterizes gravity at eight texels per cell into 2048 texels, and snaps the viewport by one six-unit cell; daemon entities follow fossil terrain height plus hull grid offset after Ymir XZ motion; released EveUnity `0.3.56` lowers the authored topology, one shared snapped viewport frame for fog and Stardust, provider shader ABI, pre-postprocess URP pass, provider-requested TAA, authoritative flow time, explicit camera matrix, and float32 packed-output diagnostics without provider code. The provider bundle runs the actual Stardust compute shader across X, Y, and diagonal one-cell remaps and proves 705 overlapping world cells remain bit-identical after buffer reassignment. The released warm witness proves identical fog/particle grid centers drive 65,536 rendered particles while the map camera remains isolated. The flight post-process bundle gate verifies serialized ACES, exposure/contrast, bloom, vignette, and film-grain components | restore readable patch structure, gravity waves, surrounding world geometry, and final luminance/composition parity; visual parity remains explicitly open |
|
||||
| Fields/fog/gravity | zone renderer and shaders | daemon/plugin semantics | Fields plugin documents | EveUnity fields lowerer | daemon publishes canonical gravity/fog splat layers through `field.volume3d`; Eve Fields `0.2.3` owns portable `PowerPulse` and `AnimatedRadialCosine` semantics; Aetheria emits the fossil global animated simplex/cellular/ambient stack, body-owned radial waves, and separate negative gameplay `gravity.height` and positive visual `fog.surface_height`; the shared camera-relative lattice spans 1536 world units as 256 six-unit Stardust cells, rasterizes gravity at eight texels per cell into 2048 texels, and snaps the viewport by one six-unit cell; daemon entities follow fossil terrain height plus hull grid offset after Ymir XZ motion; released EveUnity `0.3.57` lowers the authored topology, one shared snapped viewport frame for fog and Stardust, provider shader ABI, pre-postprocess URP pass, provider-requested TAA, provider-material temporal coverage inputs, authoritative flow time, explicit camera matrix, and float32 packed-output diagnostics without provider code. The provider bundle runs the actual Stardust compute shader across X, Y, and diagonal one-cell remaps and proves 705 overlapping world cells remain bit-identical after buffer reassignment; its source gate rejects replacement of temporal dithering with a fixed alpha threshold. The released warm witness proves identical fog/particle grid centers and live dither/frame bindings drive 65,536 rendered particles while the map camera remains isolated. The flight post-process bundle gate verifies serialized ACES, exposure/contrast, bloom, vignette, and film-grain components | restore readable patch structure, gravity waves, surrounding world geometry, and final luminance/composition parity; visual parity remains explicitly open |
|
||||
| HUD/schematic | ARPG HUD and `SchematicDisplay` | Eve composition from daemon facts | semantic status/components | EveUnity UI | provider-authored transparent cockpit is wired, projected, and lowered through generic UI Toolkit panes, metrics, and progress components for hull, shield, capacitor, temperature, cargo, weapon cooldown/groups, selected target, target lock, target shield, and target hull; the original armor/equipment schematic and transient warning choreography remain reference-only | schematic topology, warning timelines, dynamic action state, and composited live capture |
|
||||
| Hit/lock/warnings | `ActionGameManager` feedback | daemon event facts | transient feedback stream | VFX/UI/audio | bounded deduplicated game-event ledger and Eve `feedback.stream` wired for pickup outcomes, projectile launch/impact, entity damage, alive-to-dead destruction, authoritative weapon reload chronology, lock start/acquired/lost chronology, and episode-deduplicated `weapon.fire.refused` facts for insufficient energy or missing ammunition; every lock transition carries authored weapon identity, target, reason, and prior/current progress, while reconnect priming prevents retained events from replaying as new feedback | add thermal and docking event families, negative transaction fixtures, provider lock audio/effect roles, and broader runtime effect consumption |
|
||||
| Assets | `Assets/Resources` | Aetheria provider | asset catalog + CultMesh CDN | runtime cache/load | provider manifests name deterministic bundle-internal paths and now project each typed hull prefab through the same asset key in Eve scene and SoA identity state; the authoring build derives presentation-only prefabs, strips non-Eve gameplay scripts, externalizes embedded effects, preserves source material semantics, and verifies the loaded bundle ABI; released EveUnity `0.3.55` resolves Unity's lowercase bundle names against authored-case advertised keys and the warm cache witness lowers the verified provider body through local file mapping | cold CDN transfer is failing: the bundle still times out while transported through batched snapshot records instead of mapped/network body transport; provider-to-client network zero-copy, shared-memory delivery, and GPU zero-copy remain open |
|
||||
|
|
|
|||
Loading…
Reference in a new issue