Add minimal Aquarium sample client
This commit is contained in:
parent
82c7daad6a
commit
03530241e5
7 changed files with 115 additions and 0 deletions
|
|
@ -25,6 +25,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Caching.MessagePac
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GameCult.Networking", "..\CultLib\src\GameCult.Networking\GameCult.Networking.csproj", "{BDE44048-7BA1-45C0-A69C-F70E5188FFE1}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aquarium.Sample.Minimal", "src\Aquarium.Sample.Minimal\Aquarium.Sample.Minimal.csproj", "{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
|
@ -155,6 +157,18 @@ Global
|
|||
{BDE44048-7BA1-45C0-A69C-F70E5188FFE1}.Release|x64.Build.0 = Release|Any CPU
|
||||
{BDE44048-7BA1-45C0-A69C-F70E5188FFE1}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{BDE44048-7BA1-45C0-A69C-F70E5188FFE1}.Release|x86.Build.0 = Release|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Release|x64.Build.0 = Release|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
@ -163,5 +177,6 @@ Global
|
|||
{08D15A38-B6AB-459B-8BF9-3CCA8555A022} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
|
||||
{51FE01D8-9EEF-46B2-8D8C-3307AC2221C1} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
|
||||
{33654E0D-B31A-4062-B6AC-C1CE4C1A1F65} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
|
||||
{7564E6C2-FF01-4B5B-8C2B-F9CD796858BA} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
|||
|
|
@ -3,5 +3,6 @@
|
|||
<Project Path="src/Aquarium.Engine.Contracts/Aquarium.Engine.Contracts.csproj" />
|
||||
<Project Path="src/Aquarium.Engine/Aquarium.Engine.csproj" />
|
||||
<Project Path="src/Aquarium.Epiphany/Aquarium.Epiphany.csproj" />
|
||||
<Project Path="src/Aquarium.Sample.Minimal/Aquarium.Sample.Minimal.csproj" />
|
||||
</Folder>
|
||||
</Solution>
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ dotnet run --project src\Aquarium.Engine\Aquarium.Engine.csproj -- --client-asse
|
|||
For Rider, open `Aquarium.Engine.sln`. The `.slnx` stays as the compact
|
||||
CLI-friendly solution, but Rider may show empty project trees when opening it.
|
||||
|
||||
`src\Aquarium.Sample.Minimal` is a tiny non-Epiphany client used to keep the
|
||||
engine boundary honest. It references only `Aquarium.Engine.Contracts`, declares
|
||||
an `AquariumRenderPlan`, and boots through the same host/client loader path.
|
||||
|
||||
For iteration while an Aquarium window is already open, use the dev reload
|
||||
runner instead of `dotnet run`:
|
||||
|
||||
|
|
|
|||
16
src/Aquarium.Sample.Minimal/Aquarium.Sample.Minimal.csproj
Normal file
16
src/Aquarium.Sample.Minimal/Aquarium.Sample.Minimal.csproj
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<AssemblyName>Aquarium.Sample.Minimal</AssemblyName>
|
||||
<RootNamespace>Aquarium.Sample.Minimal</RootNamespace>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Aquarium.Engine.Contracts\Aquarium.Engine.Contracts.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
75
src/Aquarium.Sample.Minimal/MinimalRuntime.cs
Normal file
75
src/Aquarium.Sample.Minimal/MinimalRuntime.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System.Numerics;
|
||||
using Aquarium.Engine;
|
||||
using Aquarium.Engine.Input;
|
||||
using Aquarium.Engine.Render;
|
||||
|
||||
namespace Aquarium.Sample.Minimal;
|
||||
|
||||
public sealed class MinimalRuntime : IAquariumRuntime
|
||||
{
|
||||
private float timeSeconds;
|
||||
|
||||
public AquariumRuntimeOptions Options { get; private set; }
|
||||
|
||||
public GraphicsSettings GraphicsSettings { get; set; } = GraphicsSettings.Default;
|
||||
|
||||
public AquariumRenderPlan RenderPlan { get; } = CreateRenderPlan();
|
||||
|
||||
public AquariumFrame Frame => new(
|
||||
new GridFrame(Vector2.Zero, 24.0f),
|
||||
new Vector3(0.0f, -10.0f, 7.0f),
|
||||
timeSeconds,
|
||||
Vector2.Zero,
|
||||
AquariumSceneState.Empty);
|
||||
|
||||
public AquariumFrame ComposeFrame(AquariumFrame frame, AquariumFrameInput input)
|
||||
{
|
||||
return frame;
|
||||
}
|
||||
|
||||
public void Start()
|
||||
{
|
||||
Console.WriteLine("Minimal Aquarium sample booted.");
|
||||
}
|
||||
|
||||
public void Update(float deltaSeconds, InputState input)
|
||||
{
|
||||
timeSeconds += Math.Max(deltaSeconds, 0.0f);
|
||||
}
|
||||
|
||||
public void FlushState()
|
||||
{
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
|
||||
internal void SetOptions(AquariumRuntimeOptions options)
|
||||
{
|
||||
Options = options;
|
||||
}
|
||||
|
||||
private static AquariumRenderPlan CreateRenderPlan()
|
||||
{
|
||||
var app = new AquariumApp();
|
||||
var scene = app.RenderTargets.Hdr("scene");
|
||||
app.Cameras.Perspective("main");
|
||||
app.Graph.Pass("scene").Fullscreen();
|
||||
app.Features.Bloom(scene.Color);
|
||||
app.Features.Presentation(scene.Color);
|
||||
app.Features.DirectWriteOverlay();
|
||||
app.Debug.View("Scene", scene.Color);
|
||||
return app.Plan;
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class MinimalRuntimeFactory : IAquariumRuntimeFactory
|
||||
{
|
||||
public IAquariumRuntime Create(AquariumRuntimeOptions options)
|
||||
{
|
||||
var runtime = new MinimalRuntime();
|
||||
runtime.SetOptions(options);
|
||||
return runtime;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@
|
|||
{"timestamp":"2026-05-12T00:00:00+01:00","topic":"epiphany-extraction-render-api-plan","lesson":"The next purification path is a small render graph API, not more renderer knobs: clients declare resources and passes, Aquarium owns D3D12 execution. Migrate in slices: freeze boundary, add Vortice-free descriptors, compile a minimal graph, convert presentation/bloom, move Epiphany body shaders and Grid policy to Aquarium.Epiphany, then replace AquariumFrame.","files":["docs/epiphany-extraction-render-api-plan.md","README.md","state/map.yaml","state/memory.json"]}
|
||||
{"timestamp":"2026-05-12T03:40:00+01:00","topic":"epiphany-render-policy-extraction","lesson":"Epiphany body shaders, Grid brush construction, body visual/light tables, and cursor projection moved behind Aquarium.Engine.Contracts. Aquarium.Engine now consumes AquariumRenderPlan and AquariumSceneState data and passes scripts/verify-boundaries.ps1 with no Epiphany role/client names in engine source.","files":["src/Aquarium.Engine.Contracts/Render/AquariumApp.cs","src/Aquarium.Engine.Contracts/Render/AquariumRenderPlan.cs","src/Aquarium.Epiphany/EpiphanyRenderPlan.cs","src/Aquarium.Epiphany/EpiphanySceneBuilder.cs","src/Aquarium.Engine/Render/D3D12Renderer.cs","scripts/verify-boundaries.ps1","state/memory.json","state/map.yaml"]}
|
||||
{"timestamp":"2026-05-12T03:50:00+01:00","topic":"graph-target-allocation","lesson":"The render graph compiler now validates declared targets/passes and D3D12Renderer allocates non-legacy client-declared render targets through engine resource/descriptors, including resize rebuild. This is allocation only; full graph pass execution remains the next cut.","files":["src/Aquarium.Engine/Render/Graph/D3D12RenderGraphCompiler.cs","src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine.Contracts/Render/AquariumApp.cs","state/memory.json"]}
|
||||
{"timestamp":"2026-05-12T04:00:00+01:00","topic":"minimal-non-epiphany-client","lesson":"Aquarium now includes src/Aquarium.Sample.Minimal, a non-Epiphany client that references only Aquarium.Engine.Contracts, declares a minimal render plan, and boots through the same host/client assembly loader. Keep it as a boundary proof while the graph executor replaces legacy fixed passes.","files":["src/Aquarium.Sample.Minimal/MinimalRuntime.cs","src/Aquarium.Sample.Minimal/Aquarium.Sample.Minimal.csproj","README.md","state/map.yaml"]}
|
||||
{"timestamp":"2026-05-10T07:47:46+01:00","topic":"cursor-teardrop-sdf","lesson":"Use the MathWorld teardrop curve for the cursor profile with m=6, revolved into an SDF locator. Keep ripples as geometry, material as brass GGX metal, and avoid ambient fill.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","state/memory.json"],"source":"https://mathworld.wolfram.com/TeardropCurve.html"}
|
||||
{"timestamp":"2026-05-11T00:00:00+01:00","topic":"aquarium-focus-cut","lesson":"Runtime volumetrics, cloud/fog research, and the D3D11 scene renderer are shelved because they distract from Aquarium's Epiphany-client mission. Git history holds the experiment; live repo state should not preserve compatibility husks or dead guidance for removed medium settings.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine.Contracts/GraphicsSettings.cs","state/map.yaml","state/memory.json","state/scratch.md"]}
|
||||
{"timestamp":"2026-05-11T04:20:00+01:00","topic":"medium-froxel-purge","lesson":"Medium/froxel render targets, structured buffers, shader bindings, scene outputs, post history lanes, and medium debug paths were removed from the live D3D12 renderer. Future atmospheric or field transport work needs a new explicit pass contract rather than reviving shelved scaffolding.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl","state/map.yaml","state/memory.json"]}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ current_model:
|
|||
state_store: src/Aquarium.Epiphany/State/AquariumCultStateStore.cs
|
||||
state_document: epiphany.aquarium.live_state
|
||||
graphics_settings_document: epiphany.aquarium.graphics_settings
|
||||
samples:
|
||||
minimal_client: src/Aquarium.Sample.Minimal
|
||||
dependencies:
|
||||
cult_math: E:\Projects\CultMath
|
||||
cult_lib: E:\Projects\CultLib
|
||||
|
|
@ -81,6 +83,7 @@ renderer_state:
|
|||
next:
|
||||
- Extend explicit renderer debug modes for hits, normals, depth, bins, and lighting.
|
||||
- Replace the current legacy fixed D3D12 pass execution with the declared AquariumRenderPlan graph compiler and executor.
|
||||
- Keep src/Aquarium.Sample.Minimal building and launchable as the non-Epiphany boundary proof.
|
||||
- Replace fixed fallback role motion with real CultNet-derived AgentVisualState.
|
||||
- Build each agent role body from one coherent low-cost SDF form model before adding ornamental or state-reactive detail.
|
||||
- Add diegetic labels and object-local menus after renderer and text contracts are stable.
|
||||
|
|
|
|||
Loading…
Reference in a new issue