Commit graph Aetheria/Assets/Shaders/Compute
Author SHA1 Message Date
Meta Vens
0ef88419ff Fix D17/D20/D21 and the pool-rebuild trap in ShieldPanel (Cut 3)
D17: KInject/KWaveStep/KFracture gate on growth, which only KUpdate writes and
only after this same frame's injection dispatch, so a panel struck the instant
it spawns swallowed its own creating hit. ResetSim now seeds bState directly
from a precomputed per-cell arm state (backdated by one growDuration) instead
of leaving KInit's zero in place, so the strike centre reads as already grown.

D20: _PanelSpawnTime was hardcoded to 0f every frame; it now tracks each
panel's own backdated arm instant, so growth keeps advancing correctly on the
frames after spawn instead of collapsing back under the gate.

Pool-rebuild trap (not map-numbered, but load-bearing for the whole pool
argument in §2.4): OnEnable unconditionally rebuilt and OnDisable
unconditionally released, so every SetActive cycle a pooled panel goes through
paid the 1.3-21ms Rebuild cost the pool exists to avoid. OnEnable now only
rebuilds when not yet built; release moves to OnDestroy. ResetSim is also
self-healing (builds if not yet built) rather than depending on OnEnable's
timing, which a batchmode probe showed is not synchronous with
Object.Instantiate in every context this runs in.

D21: Penrose's iteration count was CeilToInt(...)+1, always overshooting the
requested cellSize by a full extra phi-subdivision. Rounding to the nearest
achievable iteration count instead brings Penrose within 2-5x of Hex's cell
count at the same radius/cellSize, down from an order of magnitude.

TilingBuilder.cs gains a CellState mirror struct (matching ShieldCommon.hlsl's
CellState field-for-field) so ResetSim can write growth/temper/breakTime
directly and the Cut 3 verification probe can read them back without a new
readback path.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 13:51:11 +02:00
Meta Vens
a935b965c9 Land the six shield-panel sources, ported to built-in and compiling
Cut 1 of docs/shield-panel-cut.md: land ShieldPanel.cs, ShieldPanel.shader,
ShieldSim.compute, ShieldCommon.hlsl, TilingBuilder.cs and Tilings.cs under
Assets/Shaders/Compute/ShieldField/, alongside Lightning/ and Slime/.

Port (URP -> built-in, three substitutions per the map's §2.1 probe):
- drop the UniversalPipeline SubShader tag, add IgnoreProjector
- swap the URP Core.hlsl include for UnityCG.cginc
- TransformWorldToHClip -> UnityWorldToClipPos (3 call sites)

Drawing collapse (D2/D5): RenderParams has no shaderPass member in
6000.3.24f1, and a multi-pass material draws every SubShader pass from one
indirect call regardless, so the three per-pass args buffers and draw calls
collapse to one args buffer sized to the widest pass (Outline) and one
Graphics.RenderPrimitivesIndirect call. Deleted: argsOutline, argsConduit,
drawFill/drawOutline/drawConduits and their branches.

Also deleted: ShieldPanelTester (the click harness the operator ruled
against; it also can't run — activeInputHandler is New Input System only)
and [ExecuteAlways] (incompatible with a pool per D13; Rebuild stays on the
context menu).

Defects fixed:
- D1: TilingBuilder.cs's inner `dist` shadowed the outer one (CS0136);
  renamed to nbrDist.
- D3: CellStatic was 15 floats against a declared Stride of 16; added pad2
  on both the HLSL and C# sides.
- D4: `centroid` is reserved in the compute compiler; renamed the
  ShieldCommon.hlsl field to `center` (kept the C# field name as-is; it's
  not reserved there and the two sides don't need matching names, only
  matching layout).
- D6: fixed the comment on _BreakBudget — it's two elements (count + cap),
  not the "single element" the old comment claimed.
- D12: the two-element uint[] Update() allocated every frame is now a
  cached field, cheaper still under a pool of many live panels.
- D18 (R5 — operator ruling, not deferred to a follow-up): Penrose ignored
  panelRadius entirely — a fixed authored iteration count meant the tiling
  was just uniformly rescaled, not resampled, so cell count never grew with
  the panel. Every other tiling here uses cellSize to hold local cell size
  constant while radius extends coverage; Penrose now derives its iteration
  count the same way (each substitution divides edge length by phi, solved
  for the count that brings a unit edge to ~cellSize once scaled to
  radius). This retires the now-meaningless `penroseIterations` field and
  the `subdivisions` parameter it threaded through Tilings.Generate.
- Also removed a dead `idx` counter in Tilings.Voronoi (D8's mention of
  dead code; the Vector2.zero sentinel ambiguity itself is unfixed, same as
  D7/D19 — Voronoi and TriHex stay recorded defects, not fixed, per R5).

Not fixed here, per the map: D7 (Voronoi is unusably slow) and D19 (TriHex
has zero dual edges) are recorded, not fixed. D9/D10 (fracture tuning) are
Cut 5. D17 (growth gate blocks the spawning hit) and D20 (_PanelSpawnTime
hardcoded to 0) are Cut 3.

Repo-specific fix not in the map: Assets/Scripts/UI/ContextMenu.cs defines
a global `ContextMenu` MonoBehaviour that shadows UnityEngine.ContextMenu,
so `[ContextMenu("Rebuild")]` doesn't compile here (CS0616) even though it
did in the map's throwaway probe project. Used the fully-qualified
`[UnityEngine.ContextMenu(...)]` instead.

Adds Assets/Scripts/Editor/ShieldPanelCut1Verify.cs, a batchmode probe (no
NUnit path exists per the map's Q7 — Tests.asmdef can't see
Assembly-CSharp): asserts zero shader/compute compile errors and that
Penrose cell count actually scales with panelRadius (D18). Also adds
tests/mutation_tests_shield_panel_cut1.py, which mutates the D18 fix, the
D4 fix, and the shaderPass deletion in turn and asserts the probe goes red
each time, restoring the source after each case (own file per the
convention mutation_tests_addressables_cut.py established, so as not to
touch item-provenance's or the addressables cut's harnesses).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-18 06:08:04 +02:00
Meta Vens
9bdf6ef23f Replace the Database Tools with the Studio and cut Unity over
Cut 8b. The Unity project compiles with 0 errors in 6000.3.24f1 batchmode.

Packages: manifest.json pins org.gamecult.cultlib at cultlib-unity-v1.0.57
and org.gamecult.caching.unity at caching-unity-v1.2.0, next to the 8a
CultMath tag. Aetheria.Shared.Unity references GameCult.CultLib and keeps
noEngineReferences.

The Database Tools (Assets/Scripts/CultCache/Editor) are deleted in this
commit, alongside their five ported drawers in
Assets/Scripts/Editor/CultCacheDrawers.cs, each an
[CultInspectorDrawer] ICultInspectorDrawer:
- InspectableType: popup of the attribute type's [Union] member names,
  writing the string.
- InspectableColor: float3 and float4 through ColorField.
- InspectableAnimationCurve: float4[] and BezierCurve through CurveField.
- InspectableTemperature: Kelvin, Celsius and Fahrenheit fields over one
  value.
- InspectableSchematicShape: size and cell toggles. The old drawer also
  drew the item's schematic texture and tinted hull hardpoints, which need
  the parent document. The tagged Studio hands a drawer only the value, so
  those wait on the Studio exposing the open record.

Unity call sites:
- ActionGameManager opens the catalog through AetheriaStores; Cut 10 adds
  the run and player stores.
- Refs resolve through ItemManager.GetData or Get(ref); orbit, planet and
  belt maps key by CultRecordKey; identity is compared by reference or key.
- The PlayerSettings.msgpack reader and writer, which Cut 10 deletes, pass
  CultDocumentMessagePackSerialization.OptionsFor, since the embedded run
  reaches CultMath values and refs. Keyboard layouts need no resolver and
  keep MessagePack's defaults until Cut 10.
- The input map uses the nested action to binding shape.
- PropertiesPanel reads CultInspectorRangeAttribute.
- NameTools loses its legacy name-file writer.
- Slime compares serialized settings instead of the deleted SHA1 helper.
- FieldDriver drops InspectorHeader.
- .gitignore covers the test project's build output.

Builds: Aetheria.Shared, AetherDb, Aetheria.Shared.Tests (6/6), Unity
batchmode (0 errors).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 19:15:20 +02:00
Meta Vens
e308c19e4c Move the remaining Assets scripts off Unity.Mathematics
Fluid, Slime, SlimeTestSpawner, LightningCompute and MouseRotate still
imported Unity.Mathematics and compiled only because Burst and Collections
pull the package in. Fluid, Slime and LightningCompute now use CultMath
(LightningCompute's snoise included, which CultMath carries as the same
Ashima simplex noise); SlimeTestSpawner and MouseRotate imported it without
using it, so the usings are gone. LightningCompute converts its float3
offsets with ToUnity() instead of the Unity.Mathematics implicit cast.

None of these are Burst-compiled or jobs. Their ComputeBuffer structs are
built from UnityEngine Vector2/Vector3 and floats, not math types, so no
buffer layout changes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 18:01:54 +02:00
Meta Vens
7006a6b0dd Restore the stable legacy Unity project 2026-08-10 14:57:50 +01:00
Meta Vens
a655d99bf5 Expose smooth value flow as a daemon render option 2026-07-19 01:52:55 +01:00
Meta Vens
d8a01339cc Restore Stardust temporal coverage 2026-07-16 18:16:39 +01:00
Meta Vens
41c8091e8f Move lightning presentation ownership to EveUnity 2026-07-12 01:29:28 +01:00
Meta Vens
4d7bb65868 Integrate CultMesh UI and URP cleanup 2026-06-30 19:14:49 +01:00
Meta Vens
65133ac8a0 Integrate Aetheria reactive state worktree 2026-06-28 01:18:21 +01:00
Meta Vens
23a5241a7d Remove runtime serializer hash residue 2026-06-13 07:36:08 +01:00
Reinier Vens
7561c09edc Unity 6 Upgrade + Solid Gravity Surface
Upgraded Unity version to 6000.1.10f1
Rewrote gravity surface shader to use shader environment vars for placement + various compatibility fixes
2025-07-10 21:05:54 +01:00
Reinier Vens
47e500e1ce Playability
Fixed loadout generator tutorial edge cases
Recreated missing items
Created field shader & test scene
2022-08-08 22:43:55 +01:00
Reinier Vens
69aca09f63 Boundless
Removed hard zone boundaries
Fixed stuff that broke because of hard zone boundary assumption (stardust placement, vertical fog)
Added a skybox!
Removed density-based albedo boost (_TintExponent) to improve perceptual uniformity at different step sizes, reconfigured shader to achieve / surpass previous looks and performance
Cell Brush has a material editor now to enable variant selection
Enabled Caching Shader Preprocessor
Moved raymarching loop into CloudShader
Get environment settings from game manager to enable configuration / variation
Introduced slope-based nebulae damping and volumetric flow
Hid optional volumetric features behind preprocessor branches
Created shader variants selected by global keywords for all shaders depending on volumetrics
Environment settings used to configure shader variant selection
Moved dynamic lighting settings to own subclass
Dynamically adjust gravity map isoline contour depth range according to zone contents
2022-07-21 21:40:44 +01:00
Reinier Vens
b93d2d213b Graphics Settings + Disabling Minimap Asteroids
Created graphics settings data structure
Added nebula quality option to graphics settings
Added option to display asteroids in minimap (expensive)
2022-07-18 08:44:54 +01:00
Reinier Vens
ae79a152e9 Tweak Stardust Placement
Quick commit before I break everything by upgrading Unity
Modified vertical placement code for stardust particles
2022-07-17 21:51:51 +01:00
Reinier Vens
c3329cecc4 Unified Volumetric Flow
Modified stardust & nebula shaders such that flow velocity is consistent: Volumetric:flow now represents global velocity in meters per second
2022-07-17 05:27:50 +01:00
Reinier Vens
5ceb23f5f9 Fix Dithered Particle Shader
Dithered Particles were completely busted for some reason, replaced with new shader that works properly
Fade out stardust at arena limits
2022-07-13 06:10:54 +01:00
Reinier Vens
e585a8c3b1 Sky Glow + More Nebula Tweaking 2022-07-13 01:53:59 +01:00
Reinier Vens
7210d298af More Nebula Fuckery
Performance optimization for nebula raymarching
Fixed zone generator crashing due to lack of station and turret hull data (where'd they go?!)
2022-07-12 14:22:23 +01:00
Reinier Vens
cda321ba4a New Clouds In Game Scene
Implemented new raymarching shader in game scene
2022-07-11 08:14:00 +01:00
Reinier Vens
b08423b936 NEW CLOUDS NEW CLOUDS NEW CLOUDS WHOOO
Added new clouds shader with improved raymarching loop
Currently only being used in main menu (rest is coming right up!)
Removed WWise (it's nice, but all it's doing is throwing exceptions rn since we ain't about to get a license)
2022-07-10 02:53:09 +01:00
Reinier Vens
00f752edf7 Unified Volumetric Flow
Fixed towing system
Tweaked Nebula Flow (a lot)
Extracted environment appearance settings into ZoneEnvironment data structure
Stardust particles now follow global flow field
2021-06-18 12:32:03 +01:00
Reinier Vens
149a90e01c Realistic Volumetrics
Tweaked the density function for the clouds - fill density now fades smoothly to zero over safety radius
Changed the way density is mapped to luminosity in volume color sampling
Added directional lighting to clouds
Changed raymarching accumulation logic
Fixed step artifacts (reverted to simple blue noise sampling)
2021-06-01 08:16:36 +01:00
Reinier Vens
983c51b4ac Hotfix 2021-05-29 13:59:09 +01:00
Reinier Vens
e3e9664a98 Microfauna Redux
Added more aesthetic trails to "slime" effect
Created prefabs for planet and asteroid stations
Added model for adrasteia ship
Integrated audio changes from Defirm
2021-05-25 22:01:59 +01:00
Reinier Vens
2c4520000b Demo Hotfixes
Replaced Unity TAA with PlayDead TAA
Custom keyboard layout test scene
Adjusted Aetheric Drive VFX to be more subtle
Reworked stardust VFX to reduce flickering artifacts
Added Action Bar & weapon groups saving/loading
Implemented security levels and faction safe zone visualization
Improved station placement (now include defensive turrets)
2021-05-02 20:59:45 +01:00
Reinier Vens
48759380c5 Slime Stuff & DB Prep
Put the finishing touches on the microfauna
Prepared the repository for database extraction
2021-03-30 01:17:58 +01:00
Reinier Vens
7a9af46820 Gravity Slime
Adjusted the "slime" particles to adjust their parameters according to the current gravitational potential and gradient!
2021-03-28 03:17:55 +01:00
Reinier Vens
11a9365f91 Trailer Stuff & More
Changed title font to Montserrat
Added trailer-specific camera transitions
Added key to hide UI
Fixed input listening while console is open
Added animated zone reveal effect in galaxy map
Added Ping action for sensors
Added debug console commands (e.g. give command to get any item in legendary+ quality)
Temporarily disabled wwise
Fixed infinite loop in weapon penetration code
Guided missiles now predict target position
Fixed hitscan weapons
Fixed invisible enemies bug
Fixed various loadout generator issues (can now generate turrets!)
Fixed wormhole crash when enemy is targeted
Saving/loading current zone time when exiting game (planets keep their positions)
Created slime simulation in test scene - WIP
2021-03-27 10:03:24 +00:00
Reinier Vens
b53e4aec8c Combat & Visibility & Collisions
Converted entity materials to new fade shader
Implemented visibility system
Refactored per-instance entity code to run inside monobehavior on entity instances
Created state machine AI for enemy ships with basic patrol and combat routines
Removed legacy AI code (controller item behaviors)
Added automatic trigger group assignment for matched weapons
Created ship collision system
Created shield VFX and colliders
2021-02-26 19:01:47 +00:00
Reinier Vens
8d10e33db0 GPU Lightning Weapons 2021-02-05 03:21:15 +00:00
Reinier Vens
bb297bf84c Lightning
Created Lightning Gun effect (Uses LineRenderer, very slow)
Created GPU Lightning renderer (very fast, still needs integration)
2021-02-04 04:37:47 +00:00
Reinier Vens
9e88fcda95 Bigger Sectors & Various Bugfixes
Minimap works again
Stardust density is now proportional to gravity depth
Generated zones are double the size and better distributed
Orbital hierarchy actually working now (!)
Station start position actually orbits something now
Max gravity strength remapped to infinity (zone boundary is properly impassable now)
2020-12-23 22:38:30 +00:00
Reinier Vens
e3f3bd5de5 Drag & Drop Inventory
Implemented the ability to drag items within and between inventories, including equipping them onto entity hardpoints
2020-12-20 03:04:52 +00:00
Reinier Vens
f8165878e0 Stardust
Created "stardust" compute shader particle system
Enabled asteroid icons on the map
2020-12-04 01:53:23 +00:00