Add first agent visual SDF slice
This commit is contained in:
parent
dd9fc3c8b9
commit
257061bf3d
8 changed files with 427 additions and 36 deletions
|
|
@ -6,8 +6,8 @@ explicit frame graph.
|
|||
## Current Path
|
||||
|
||||
1. `D3D12Grid.hlsl` renders a 128x128 scalar Grid height target.
|
||||
2. `D3D12Scene.hlsl` traces the Self emitter, planets, cursor locator, and Grid
|
||||
event lane into scene-linear HDR targets.
|
||||
2. `D3D12Scene.hlsl` traces the Self emitter, CPU-authored agent visuals,
|
||||
cursor locator, and Grid event lane into scene-linear HDR targets.
|
||||
3. `D3D12Post.hlsl` builds bloom, resolves diagnostics/history, applies
|
||||
exposure and ACES, then presents.
|
||||
4. `DirectWriteOverlay` draws crisp final-pixel debug UI after scene rendering.
|
||||
|
|
@ -31,14 +31,21 @@ and fade out on flat surfaces.
|
|||
|
||||
The Grid is not an opaque surface. The scene shader traces it before the nearest
|
||||
solid and emits premultiplied event radiance plus event metadata. The opaque
|
||||
surface packet belongs to Self, planets, cursor, or empty space.
|
||||
surface packet belongs to Self, agent visuals, cursor, or empty space.
|
||||
|
||||
## Solids
|
||||
|
||||
Self and planets are analytic sphere hits. The cursor is a revolved MathWorld
|
||||
teardrop SDF with SDF ripples and brass GGX material. It carries current and
|
||||
previous cursor world anchors so temporal reprojection can account for object
|
||||
motion.
|
||||
Self remains an analytic sphere hit. Agent visuals are uploaded through
|
||||
`AgentVisualGpu`, including current center, previous center, role id, activity,
|
||||
heartbeat, pressure, expression, and LOD tier. The first visual slice keeps the
|
||||
fixed orbit fallback, renders Body and Imagination as LOD 1 role SDFs inside
|
||||
bounded per-agent intervals, and keeps the remaining roles as simple distinct
|
||||
fallback organs.
|
||||
|
||||
The cursor is a revolved MathWorld teardrop SDF with SDF ripples and brass GGX
|
||||
material. It carries current and previous cursor world anchors so temporal
|
||||
reprojection can account for object motion. Agent visuals carry their previous
|
||||
centers in the structured buffer for the same reason.
|
||||
|
||||
Lighting is currently direct and diegetic: Self is the emitter. No ambient fill
|
||||
is allowed to quietly solve a bad light story.
|
||||
|
|
@ -61,6 +68,11 @@ Debug modes:
|
|||
- `6` current field identity
|
||||
- `7` bloom contribution
|
||||
- `8` exposed luminance
|
||||
- `9` agent role identity
|
||||
- `10` agent material id
|
||||
- `11` agent SDF step count
|
||||
- `12` agent LOD tier
|
||||
- `13` agent SDF cost tier
|
||||
|
||||
`F1` cycles modes. Number keys select the first modes directly. Startup mode can
|
||||
be set with `--render-debug` or `AQUARIUM_RENDER_DEBUG_MODE`.
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ public readonly record struct GraphicsSettings(
|
|||
float BloomVeilIntensity)
|
||||
{
|
||||
public const int MinRenderDebugMode = 0;
|
||||
public const int MaxRenderDebugMode = 8;
|
||||
public const int MaxRenderDebugMode = 13;
|
||||
public const float MinSceneExposure = 0.02f;
|
||||
public const float MaxSceneExposure = 1.2f;
|
||||
public const float MinBloomIntensity = 0.0f;
|
||||
|
|
|
|||
|
|
@ -23,10 +23,10 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
{
|
||||
private const int BackBufferCount = 2;
|
||||
private const int GridHeightTextureSize = 128;
|
||||
private const int CursorPrimitiveId = PlanetCount + 1;
|
||||
private const int CursorPrimitiveId = AgentVisualCount + 1;
|
||||
private const Format GridHeightFormat = Format.R16_Float;
|
||||
private const int PlanetCount = 5;
|
||||
private const int GridHeightBrushCount = PlanetCount + 1;
|
||||
private const int AgentVisualCount = 5;
|
||||
private const int GridHeightBrushCount = AgentVisualCount + 1;
|
||||
private const int BodyLightCount = 8;
|
||||
private const float GridTransparentMinZ = -1.85f;
|
||||
private const float GridTransparentMaxZ = 0.45f;
|
||||
|
|
@ -53,6 +53,11 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
new(6, "Lane Identity"),
|
||||
new(7, "Bloom"),
|
||||
new(8, "Exposed Luminance"),
|
||||
new(9, "Agent Role"),
|
||||
new(10, "Agent Material"),
|
||||
new(11, "Agent Steps"),
|
||||
new(12, "Agent LOD"),
|
||||
new(13, "Agent Cost"),
|
||||
];
|
||||
|
||||
private readonly IDXGIFactory4 factory;
|
||||
|
|
@ -95,9 +100,11 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
private readonly D3D12RenderTarget[] bloomRenderTargets = new D3D12RenderTarget[BloomLevelCount];
|
||||
private readonly D3D12RenderTarget[] bloomScratchTargets = new D3D12RenderTarget[BloomLevelCount];
|
||||
private readonly D3D12StructuredBuffer bodyLightBuffer;
|
||||
private readonly D3D12StructuredBuffer agentVisualBuffer;
|
||||
private readonly D3D12CubeTexture studioPmremTexture;
|
||||
private readonly D3D12CubeTexture studioIrradianceTexture;
|
||||
private readonly BodyLightGpu[] bodyLights = new BodyLightGpu[BodyLightCount];
|
||||
private readonly AgentVisualGpu[] agentVisuals = new AgentVisualGpu[AgentVisualCount];
|
||||
private readonly GridHeightBrushCpu[] gridHeightBrushes = new GridHeightBrushCpu[GridHeightBrushCount];
|
||||
private Viewport viewport;
|
||||
private RawRect scissorRect;
|
||||
|
|
@ -186,7 +193,9 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
CreateHistoryRenderTargets();
|
||||
CreateBloomRenderTargets();
|
||||
bodyLightBuffer = new D3D12StructuredBuffer(device, BodyLightCount, Marshal.SizeOf<BodyLightGpu>(), "Aquarium D3D12 Body Light Buffer");
|
||||
agentVisualBuffer = new D3D12StructuredBuffer(device, AgentVisualCount, Marshal.SizeOf<AgentVisualGpu>(), "Aquarium D3D12 Agent Visual Buffer");
|
||||
resourceRegistry.Add("body-light-buffer", bodyLightBuffer);
|
||||
resourceRegistry.Add("agent-visual-buffer", agentVisualBuffer);
|
||||
commandList = device.CreateCommandList<ID3D12GraphicsCommandList>(0, CommandListType.Direct, frames[frameIndex].CommandAllocator, null);
|
||||
commandList.Name = "Aquarium D3D12 Graphics Command List";
|
||||
commandList.Close();
|
||||
|
|
@ -286,6 +295,7 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
}
|
||||
|
||||
BuildGridHeightBrushes(frame);
|
||||
BuildAgentVisualTable(frame);
|
||||
BuildBodyLightTable(frame);
|
||||
var frameConstants = frameResources.UploadRing.WriteConstant(new FrameConstants(
|
||||
new Vector2(width, height),
|
||||
|
|
@ -318,6 +328,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
|
||||
frameResources.BodyLightDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
bodyLightBuffer.CreateShaderResourceView(device, frameResources.BodyLightDescriptor);
|
||||
frameResources.AgentVisualDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
agentVisualBuffer.CreateShaderResourceView(device, frameResources.AgentVisualDescriptor);
|
||||
frameResources.StudioPmremDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
studioPmremTexture.CreateShaderResourceView(device, frameResources.StudioPmremDescriptor);
|
||||
frameResources.StudioIrradianceDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
|
|
@ -440,6 +452,7 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
fullscreenRootSignature.Dispose();
|
||||
studioIrradianceTexture.Dispose();
|
||||
studioPmremTexture.Dispose();
|
||||
agentVisualBuffer.Dispose();
|
||||
bodyLightBuffer.Dispose();
|
||||
DisposeBloomRenderTargets();
|
||||
DisposeHistoryRenderTargets();
|
||||
|
|
@ -811,6 +824,7 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
context.CommandList.SetGraphicsRootDescriptorTable(3, frameResources.BodyLightDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(14, frameResources.StudioPmremDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(15, frameResources.StudioIrradianceDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(16, frameResources.AgentVisualDescriptor.Gpu);
|
||||
context.CommandList.RSSetViewports(viewport);
|
||||
context.CommandList.RSSetScissorRects(scissorRect);
|
||||
context.CommandList.OMSetRenderTargets(
|
||||
|
|
@ -945,6 +959,7 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
context.CommandList.SetGraphicsRootDescriptorTable(11, frameResources.SceneEventMetadataDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(12, frameResources.HistoryEventColorDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(13, frameResources.HistoryEventMetadataDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(16, frameResources.AgentVisualDescriptor.Gpu);
|
||||
|
||||
context.CommandList.RSSetViewports(viewport);
|
||||
context.CommandList.RSSetScissorRects(scissorRect);
|
||||
|
|
@ -969,10 +984,11 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
|
||||
private void UploadBodyLightResources(ID3D12GraphicsCommandList activeCommandList, FrameResources frameResources)
|
||||
{
|
||||
activeCommandList.BeginEvent("Body Light Upload");
|
||||
activeCommandList.BeginEvent("Body State Upload");
|
||||
try
|
||||
{
|
||||
bodyLightBuffer.Upload(activeCommandList, frameResources.UploadRing, bodyLights);
|
||||
agentVisualBuffer.Upload(activeCommandList, frameResources.UploadRing, agentVisuals);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
@ -1022,10 +1038,10 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
0.82f,
|
||||
1.25f);
|
||||
|
||||
for (var index = 0; index < PlanetCount; index++)
|
||||
for (var index = 0; index < AgentVisualCount; index++)
|
||||
{
|
||||
var radius = PlanetRadius(index);
|
||||
var center = PlanetAnchor(index, frame.TimeSeconds);
|
||||
var radius = AgentRadius(index);
|
||||
var center = AgentAnchor(index, frame.TimeSeconds);
|
||||
SetGridHeightBrush(
|
||||
index + 1,
|
||||
center,
|
||||
|
|
@ -1039,6 +1055,29 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
}
|
||||
}
|
||||
|
||||
private void BuildAgentVisualTable(AquariumFrame frame)
|
||||
{
|
||||
Array.Clear(agentVisuals);
|
||||
for (var index = 0; index < AgentVisualCount; index++)
|
||||
{
|
||||
var radius = AgentRadius(index);
|
||||
var center = AgentCenterAtGridHeight(index, frame.TimeSeconds);
|
||||
var previousCenter = AgentCenterAtGridHeight(index, previousTimeSeconds);
|
||||
var roleId = AgentRoleId(index);
|
||||
var activity = 0.45f + 0.45f * Hash21(index + 2.7f, 31.0f);
|
||||
var heartbeat = 0.5f + 0.5f * MathF.Sin(frame.TimeSeconds * (1.2f + index * 0.09f) + index * 1.37f);
|
||||
var pressure = 0.25f + 0.25f * MathF.Sin(frame.TimeSeconds * 0.31f + index * 0.71f);
|
||||
var expression = Math.Abs(roleId - 2.0f) < 0.01f || Math.Abs(roleId - 4.0f) < 0.01f ? 0.72f : 0.38f;
|
||||
var lod = 1.0f;
|
||||
|
||||
agentVisuals[index] = new AgentVisualGpu(
|
||||
new Vector4(center, radius),
|
||||
new Vector4(previousCenter, roleId),
|
||||
new Vector4(activity, heartbeat, pressure, expression),
|
||||
new Vector4(lod, index, 0.0f, 0.0f));
|
||||
}
|
||||
}
|
||||
|
||||
private void SetGridHeightBrush(
|
||||
int index,
|
||||
Vector2 center,
|
||||
|
|
@ -1483,6 +1522,12 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
23,
|
||||
0,
|
||||
D3D12.DescriptorRangeOffsetAppend);
|
||||
var agentVisualRange = new DescriptorRange(
|
||||
DescriptorRangeType.ShaderResourceView,
|
||||
1,
|
||||
24,
|
||||
0,
|
||||
D3D12.DescriptorRangeOffsetAppend);
|
||||
var rootParameters = new[]
|
||||
{
|
||||
new RootParameter(new RootDescriptorTable([constantBufferRange]), ShaderVisibility.All),
|
||||
|
|
@ -1501,6 +1546,7 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
new RootParameter(new RootDescriptorTable([historyEventMetadataRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([studioPmremRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([studioIrradianceRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([agentVisualRange]), ShaderVisibility.Pixel),
|
||||
};
|
||||
var staticSamplers = new[]
|
||||
{
|
||||
|
|
@ -1641,12 +1687,12 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
return Compiler.CompileFromFile(path, entryPoint, profile, shaderFlags, EffectFlags.None);
|
||||
}
|
||||
|
||||
private static float PlanetRadius(int index)
|
||||
private static float AgentRadius(int index)
|
||||
{
|
||||
return Lerp(0.34f, 0.62f, Hash21(index, 19.7f));
|
||||
}
|
||||
|
||||
private static Vector2 PlanetAnchor(int index, float timeSeconds)
|
||||
private static Vector2 AgentAnchor(int index, float timeSeconds)
|
||||
{
|
||||
var f = (float)index;
|
||||
var angle = f * 0.8975979f + timeSeconds * (0.08f + 0.011f * f);
|
||||
|
|
@ -1656,6 +1702,61 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
MathF.Sin(angle) * orbitRadius);
|
||||
}
|
||||
|
||||
private static float AgentRoleId(int index)
|
||||
{
|
||||
ReadOnlySpan<float> roleIds = [1.0f, 2.0f, 3.0f, 4.0f, 5.0f];
|
||||
return roleIds[Math.Clamp(index, 0, roleIds.Length - 1)];
|
||||
}
|
||||
|
||||
private static Vector3 AgentCenterAtGridHeight(int index, float timeSeconds)
|
||||
{
|
||||
var radius = AgentRadius(index);
|
||||
var xy = AgentAnchor(index, timeSeconds);
|
||||
return new Vector3(xy.X, xy.Y, EvaluateAgentGridHeight(timeSeconds, xy) + radius * BodyGridClearanceRadiusScale);
|
||||
}
|
||||
|
||||
private static float EvaluateAgentGridHeight(float timeSeconds, Vector2 world)
|
||||
{
|
||||
var height = MathF.Sin((world.X * 0.08f + world.Y * 0.06f) + timeSeconds * 0.27f)
|
||||
* MathF.Sin((world.X * -0.04f + world.Y * 0.07f) - timeSeconds * 0.19f)
|
||||
* 0.035f;
|
||||
height += GridBrushHeight(world, Vector2.Zero, SelfGravityRadius, 2.85f, -1.34f, 0.18f, MathF.Tau, 0.82f, 1.25f, timeSeconds);
|
||||
for (var index = 0; index < AgentVisualCount; index++)
|
||||
{
|
||||
var radius = AgentRadius(index);
|
||||
height += GridBrushHeight(world, AgentAnchor(index, timeSeconds), 3.8f + radius * 2.5f, 2.1f, -0.42f, 0.022f, 2.4f, 1.35f, 0.0f, timeSeconds);
|
||||
}
|
||||
|
||||
return height;
|
||||
}
|
||||
|
||||
private static float GridBrushHeight(
|
||||
Vector2 world,
|
||||
Vector2 center,
|
||||
float radius,
|
||||
float power,
|
||||
float amplitude,
|
||||
float waveAmplitude,
|
||||
float waveFrequency,
|
||||
float waveSpeed,
|
||||
float waveSinePower,
|
||||
float timeSeconds)
|
||||
{
|
||||
var distanceValue = Vector2.Distance(world, center);
|
||||
if (distanceValue > radius)
|
||||
{
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
var well = PowerPulse(distanceValue, radius, power);
|
||||
var normalized = Math.Clamp(distanceValue / MathF.Max(radius, 0.001f), 0.0f, 1.0f);
|
||||
var wavePhase = waveSinePower > 0.0f
|
||||
? MathF.Pow(normalized, waveSinePower) * waveFrequency - timeSeconds * waveSpeed
|
||||
: distanceValue * waveFrequency - timeSeconds * waveSpeed;
|
||||
var ripple = waveSinePower > 0.0f ? MathF.Cos(wavePhase) : MathF.Sin(wavePhase);
|
||||
return amplitude * well + ripple * well * waveAmplitude;
|
||||
}
|
||||
|
||||
private static float Hash21(float x, float y)
|
||||
{
|
||||
x = Frac(x * 123.34f);
|
||||
|
|
@ -1778,6 +1879,13 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
Vector4 CenterRadius,
|
||||
Vector4 RadianceFieldId);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
private readonly record struct AgentVisualGpu(
|
||||
Vector4 CenterRadius,
|
||||
Vector4 PreviousCenterRole,
|
||||
Vector4 State,
|
||||
Vector4 LodIndexFlags);
|
||||
|
||||
private sealed record D3D12ShaderPaths(
|
||||
string Grid,
|
||||
string Scene,
|
||||
|
|
@ -1834,6 +1942,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
|
||||
public D3D12DescriptorSlot BodyLightDescriptor { get; set; }
|
||||
|
||||
public D3D12DescriptorSlot AgentVisualDescriptor { get; set; }
|
||||
|
||||
public D3D12DescriptorSlot StudioPmremDescriptor { get; set; }
|
||||
|
||||
public D3D12DescriptorSlot StudioIrradianceDescriptor { get; set; }
|
||||
|
|
|
|||
|
|
@ -35,6 +35,16 @@ Texture2D<float4> historyEventColorTexture : register(t20);
|
|||
Texture2D<float4> historyEventMetadataTexture : register(t21);
|
||||
SamplerState sourceSampler : register(s0);
|
||||
|
||||
struct AgentVisual
|
||||
{
|
||||
float4 centerRadius;
|
||||
float4 previousCenterRole;
|
||||
float4 state;
|
||||
float4 lodIndexFlags;
|
||||
};
|
||||
|
||||
StructuredBuffer<AgentVisual> agentVisuals : register(t24);
|
||||
|
||||
struct VertexOut
|
||||
{
|
||||
float4 position : SV_Position;
|
||||
|
|
@ -52,11 +62,11 @@ struct ResolveOut
|
|||
};
|
||||
|
||||
static const float SUN_RADIUS = 1.12;
|
||||
static const int PLANET_COUNT = 5;
|
||||
static const int AGENT_VISUAL_COUNT = 5;
|
||||
static const float FIELD_ID_SELF = 2.0;
|
||||
static const float FIELD_ID_GRID = 4.0;
|
||||
static const float FIELD_ID_CURSOR = 5.0;
|
||||
static const float FIELD_ID_PLANET_BASE = 10.0;
|
||||
static const float FIELD_ID_AGENT_BASE = 10.0;
|
||||
static const float BODY_GRID_CLEARANCE_RADIUS_SCALE = 2.0;
|
||||
static const float SELF_GRAVITY_RADIUS = 17.0;
|
||||
static const float MAX_HISTORY_AGE = 32.0;
|
||||
|
|
@ -168,7 +178,7 @@ float gridHeightAt(float2 world, float sampleTime)
|
|||
height += gridBrushHeight(world, 0.0, SELF_GRAVITY_RADIUS, 2.85, -1.34, 0.18, 6.28318530718, 0.82, 1.25, sampleTime);
|
||||
|
||||
[unroll]
|
||||
for (int index = 0; index < PLANET_COUNT; index++)
|
||||
for (int index = 0; index < AGENT_VISUAL_COUNT; index++)
|
||||
{
|
||||
float radius = planetRadius(index);
|
||||
height += gridBrushHeight(world, planetAnchorAt(index, sampleTime), 3.8 + radius * 2.5, 2.1, -0.42, 0.022, 2.4, 1.35, 0.0, sampleTime);
|
||||
|
|
@ -207,11 +217,11 @@ float3 rayDirectionForPixel(float2 pixel, float2 jitter, float3 camera, float2 c
|
|||
|
||||
float3 temporalPreviousWorldPosition(float3 worldPosition, float fieldId)
|
||||
{
|
||||
if (fieldId >= FIELD_ID_PLANET_BASE)
|
||||
if (fieldId >= FIELD_ID_AGENT_BASE)
|
||||
{
|
||||
int planetIndex = clamp((int)round(fieldId - FIELD_ID_PLANET_BASE), 0, PLANET_COUNT - 1);
|
||||
float3 currentCenter = planetCenterAt(planetIndex, timeSeconds);
|
||||
float3 previousCenter = planetCenterAt(planetIndex, previousTimeSeconds);
|
||||
int agentIndex = clamp((int)round(fieldId - FIELD_ID_AGENT_BASE), 0, AGENT_VISUAL_COUNT - 1);
|
||||
float3 currentCenter = agentVisuals[agentIndex].centerRadius.xyz;
|
||||
float3 previousCenter = agentVisuals[agentIndex].previousCenterRole.xyz;
|
||||
return previousCenter + (worldPosition - currentCenter);
|
||||
}
|
||||
|
||||
|
|
@ -519,6 +529,26 @@ ResolveOut D3D12ResolvePS(VertexOut input)
|
|||
float luma = luminance(currentColor * max(exposure, 0.001));
|
||||
finalColor = luma.xxx;
|
||||
}
|
||||
else if (renderDebugMode >= 8.5 && renderDebugMode < 9.5)
|
||||
{
|
||||
finalColor = currentFieldId >= FIELD_ID_AGENT_BASE ? debugFieldIdColor(currentFieldId) : 0.0;
|
||||
}
|
||||
else if (renderDebugMode >= 9.5 && renderDebugMode < 10.5)
|
||||
{
|
||||
finalColor = currentFieldId >= FIELD_ID_AGENT_BASE ? debugFieldIdColor(floor(currentControl.x) + 20.0) : 0.0;
|
||||
}
|
||||
else if (renderDebugMode >= 10.5 && renderDebugMode < 11.5)
|
||||
{
|
||||
finalColor = currentControl.z.xxx;
|
||||
}
|
||||
else if (renderDebugMode >= 11.5 && renderDebugMode < 12.5)
|
||||
{
|
||||
finalColor = currentFieldId >= FIELD_ID_AGENT_BASE ? floor(currentControl.w).xxx * 0.33 : 0.0;
|
||||
}
|
||||
else if (renderDebugMode >= 12.5 && renderDebugMode < 13.5)
|
||||
{
|
||||
finalColor = currentFieldId >= FIELD_ID_AGENT_BASE ? frac(currentControl.w).xxx * 5.0 : 0.0;
|
||||
}
|
||||
ResolveOut output;
|
||||
output.finalColor = float4(finalColor, 1.0);
|
||||
output.historyColor = float4(resolved, currentTravel);
|
||||
|
|
|
|||
|
|
@ -33,13 +33,23 @@ struct BodyLight
|
|||
|
||||
StructuredBuffer<BodyLight> bodyLights : register(t12);
|
||||
|
||||
static const int PLANET_COUNT = 5;
|
||||
struct AgentVisual
|
||||
{
|
||||
float4 centerRadius;
|
||||
float4 previousCenterRole;
|
||||
float4 state;
|
||||
float4 lodIndexFlags;
|
||||
};
|
||||
|
||||
StructuredBuffer<AgentVisual> agentVisuals : register(t24);
|
||||
|
||||
static const int AGENT_VISUAL_COUNT = 5;
|
||||
static const float SUN_RADIUS = 1.12;
|
||||
static const float FIELD_ID_SELF = 2.0;
|
||||
static const float FIELD_ID_GRID = 4.0;
|
||||
static const float FIELD_ID_CURSOR = 5.0;
|
||||
static const float FIELD_ID_PLANET_BASE = 10.0;
|
||||
static const int CURSOR_PRIMITIVE_ID = PLANET_COUNT + 1;
|
||||
static const float FIELD_ID_AGENT_BASE = 10.0;
|
||||
static const int CURSOR_PRIMITIVE_ID = AGENT_VISUAL_COUNT + 1;
|
||||
static const float CURSOR_RADIUS = 0.56;
|
||||
static const float CURSOR_BOUND_RADIUS = 0.72;
|
||||
static const float BODY_GRID_CLEARANCE_RADIUS_SCALE = 2.0;
|
||||
|
|
@ -77,6 +87,11 @@ struct SolidHit
|
|||
float3 normal;
|
||||
float fieldId;
|
||||
int primitiveId;
|
||||
float roleId;
|
||||
float materialId;
|
||||
float stepCount;
|
||||
float lodTier;
|
||||
float costTier;
|
||||
};
|
||||
|
||||
struct RayMarchResult
|
||||
|
|
@ -86,6 +101,11 @@ struct RayMarchResult
|
|||
float fieldId;
|
||||
float3 normal;
|
||||
float coverage;
|
||||
float roleId;
|
||||
float materialId;
|
||||
float stepCount;
|
||||
float lodTier;
|
||||
float costTier;
|
||||
float eventTravel;
|
||||
float eventCoverage;
|
||||
float3 eventColor;
|
||||
|
|
@ -262,6 +282,153 @@ float3 cursorLocatorNormal(float3 p)
|
|||
return normalize(float3(dx, dy, dz));
|
||||
}
|
||||
|
||||
struct AgentSurface
|
||||
{
|
||||
float distanceValue;
|
||||
float materialId;
|
||||
float costTier;
|
||||
};
|
||||
|
||||
float sdSphere(float3 p, float radius)
|
||||
{
|
||||
return length(p) - radius;
|
||||
}
|
||||
|
||||
float sdTorus(float3 p, float2 radius)
|
||||
{
|
||||
float2 q = float2(length(p.xy) - radius.x, p.z);
|
||||
return length(q) - radius.y;
|
||||
}
|
||||
|
||||
float sdSuperellipsoid(float3 p, float3 scale, float exponent)
|
||||
{
|
||||
float3 q = abs(p) / scale;
|
||||
float value = pow(pow(q.x, exponent) + pow(q.y, exponent) + pow(q.z, exponent), 1.0 / exponent);
|
||||
return (value - 1.0) * min(scale.x, min(scale.y, scale.z));
|
||||
}
|
||||
|
||||
AgentSurface agentBodySdf(float3 local, AgentVisual agent)
|
||||
{
|
||||
float pulse = agent.state.y;
|
||||
float core = sdSuperellipsoid(local, float3(0.92, 0.78, 0.66 + pulse * 0.06), 1.45);
|
||||
float ribA = sdTorus(local.xzy, float2(0.68, 0.026));
|
||||
float ribB = sdTorus(local.yxz, float2(0.58, 0.022));
|
||||
float3 nodeA = local - float3(0.45, -0.36, 0.24);
|
||||
float3 nodeB = local - float3(-0.38, 0.28, -0.18);
|
||||
float node = min(sdSphere(nodeA, 0.13), sdSphere(nodeB, 0.11));
|
||||
AgentSurface surface;
|
||||
surface.distanceValue = min(core, min(ribA, min(ribB, node)));
|
||||
surface.materialId = core <= min(ribA, min(ribB, node)) ? 4.0 : 4.35;
|
||||
surface.costTier = 2.0;
|
||||
return surface;
|
||||
}
|
||||
|
||||
AgentSurface agentImaginationSdf(float3 local, AgentVisual agent)
|
||||
{
|
||||
float activity = agent.state.x;
|
||||
float heartbeat = agent.state.y;
|
||||
float angle = atan2(local.y, local.x);
|
||||
float polar = 0.58 + sin(angle * 5.0 + timeSeconds * 1.7) * (0.08 + activity * 0.1);
|
||||
float lobe = length(local) - polar * (1.0 + 0.09 * sin(local.z * 7.0 + heartbeat * 6.28318));
|
||||
float ring = sdTorus(local, float2(0.72 + activity * 0.08, 0.035));
|
||||
float halo = sdTorus(local.zxy, float2(0.50, 0.026));
|
||||
AgentSurface surface;
|
||||
surface.distanceValue = min(lobe, min(ring, halo));
|
||||
surface.materialId = lobe <= min(ring, halo) ? 2.0 : 2.4;
|
||||
surface.costTier = 2.0;
|
||||
return surface;
|
||||
}
|
||||
|
||||
AgentSurface agentFallbackSdf(float3 local, AgentVisual agent)
|
||||
{
|
||||
float roleId = agent.previousCenterRole.w;
|
||||
float core = sdSphere(local, 0.74);
|
||||
float belt = sdTorus(local, float2(0.61, 0.025));
|
||||
AgentSurface surface;
|
||||
surface.distanceValue = min(core, belt);
|
||||
surface.materialId = roleId + (core <= belt ? 0.0 : 0.22);
|
||||
surface.costTier = 1.0;
|
||||
return surface;
|
||||
}
|
||||
|
||||
AgentSurface agentVisualSdf(float3 p, int agentIndex)
|
||||
{
|
||||
AgentVisual agent = agentVisuals[agentIndex];
|
||||
float radius = max(agent.centerRadius.w, 0.001);
|
||||
float3 local = (p - agent.centerRadius.xyz) / radius;
|
||||
float roleId = agent.previousCenterRole.w;
|
||||
AgentSurface surface = agentFallbackSdf(local, agent);
|
||||
if (abs(roleId - 2.0) < 0.25)
|
||||
{
|
||||
surface = agentImaginationSdf(local, agent);
|
||||
}
|
||||
else if (abs(roleId - 4.0) < 0.25)
|
||||
{
|
||||
surface = agentBodySdf(local, agent);
|
||||
}
|
||||
|
||||
surface.distanceValue *= radius;
|
||||
return surface;
|
||||
}
|
||||
|
||||
float3 agentVisualNormal(float3 p, int agentIndex)
|
||||
{
|
||||
float epsilon = 0.006;
|
||||
float dx = agentVisualSdf(p + float3(epsilon, 0.0, 0.0), agentIndex).distanceValue - agentVisualSdf(p - float3(epsilon, 0.0, 0.0), agentIndex).distanceValue;
|
||||
float dy = agentVisualSdf(p + float3(0.0, epsilon, 0.0), agentIndex).distanceValue - agentVisualSdf(p - float3(0.0, epsilon, 0.0), agentIndex).distanceValue;
|
||||
float dz = agentVisualSdf(p + float3(0.0, 0.0, epsilon), agentIndex).distanceValue - agentVisualSdf(p - float3(0.0, 0.0, epsilon), agentIndex).distanceValue;
|
||||
return normalize(float3(dx, dy, dz));
|
||||
}
|
||||
|
||||
bool traceAgentVisual(float3 origin, float3 direction, int agentIndex, float intervalStart, float intervalEnd, out float travel, out float3 normal, out float materialId, out float stepCount, out float costTier)
|
||||
{
|
||||
AgentVisual agent = agentVisuals[agentIndex];
|
||||
float boundRadius = max(agent.centerRadius.w * 1.22, 0.001);
|
||||
if (!traceSphere(origin, direction, agent.centerRadius.xyz, boundRadius, travel))
|
||||
{
|
||||
normal = 0.0;
|
||||
materialId = 0.0;
|
||||
stepCount = 0.0;
|
||||
costTier = 0.0;
|
||||
return false;
|
||||
}
|
||||
|
||||
float3 oc = origin - agent.centerRadius.xyz;
|
||||
float b = dot(oc, direction);
|
||||
float c = dot(oc, oc) - boundRadius * boundRadius;
|
||||
float h = sqrt(max(b * b - c, 0.0));
|
||||
float startTravel = max(max(-b - h, intervalStart), 0.0);
|
||||
float endTravel = min(-b + h, intervalEnd);
|
||||
travel = startTravel;
|
||||
normal = 0.0;
|
||||
materialId = 0.0;
|
||||
stepCount = 0.0;
|
||||
costTier = 0.0;
|
||||
[loop]
|
||||
for (int stepIndex = 0; stepIndex < 40; stepIndex++)
|
||||
{
|
||||
if (travel > endTravel)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
float3 p = origin + direction * travel;
|
||||
AgentSurface surface = agentVisualSdf(p, agentIndex);
|
||||
stepCount = (float)(stepIndex + 1);
|
||||
costTier = max(costTier, surface.costTier);
|
||||
if (abs(surface.distanceValue) < max(0.0025, travel * 0.00025))
|
||||
{
|
||||
normal = agentVisualNormal(p, agentIndex);
|
||||
materialId = surface.materialId;
|
||||
return true;
|
||||
}
|
||||
|
||||
travel += max(abs(surface.distanceValue) * 0.34, 0.0025);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool traceCursorLocator(float3 origin, float3 direction, float intervalStart, float intervalEnd, out float travel, out float3 normal)
|
||||
{
|
||||
float sphereTravel;
|
||||
|
|
@ -315,7 +482,8 @@ float3 primitiveCenterAt(int primitiveId, float sampleTime)
|
|||
return bodyCenterAtGridHeight(cursorWorlds.xy, CURSOR_RADIUS);
|
||||
}
|
||||
|
||||
return planetCenterAt(primitiveId - 1, sampleTime);
|
||||
int agentIndex = clamp(primitiveId - 1, 0, AGENT_VISUAL_COUNT - 1);
|
||||
return agentVisuals[agentIndex].centerRadius.xyz;
|
||||
}
|
||||
|
||||
float primitiveRadius(int primitiveId)
|
||||
|
|
@ -330,7 +498,8 @@ float primitiveRadius(int primitiveId)
|
|||
return CURSOR_BOUND_RADIUS;
|
||||
}
|
||||
|
||||
return planetRadius(primitiveId - 1);
|
||||
int agentIndex = clamp(primitiveId - 1, 0, AGENT_VISUAL_COUNT - 1);
|
||||
return agentVisuals[agentIndex].centerRadius.w;
|
||||
}
|
||||
|
||||
float primitiveFieldId(int primitiveId)
|
||||
|
|
@ -340,7 +509,7 @@ float primitiveFieldId(int primitiveId)
|
|||
return FIELD_ID_CURSOR;
|
||||
}
|
||||
|
||||
return primitiveId == 0 ? FIELD_ID_SELF : FIELD_ID_PLANET_BASE + (float)(primitiveId - 1);
|
||||
return primitiveId == 0 ? FIELD_ID_SELF : FIELD_ID_AGENT_BASE + (float)(primitiveId - 1);
|
||||
}
|
||||
|
||||
void considerPrimitiveHit(float3 origin, float3 direction, int primitiveId, float intervalStart, float intervalEnd, inout SolidHit nearest)
|
||||
|
|
@ -350,6 +519,30 @@ void considerPrimitiveHit(float3 origin, float3 direction, int primitiveId, floa
|
|||
return;
|
||||
}
|
||||
|
||||
if (primitiveId > 0 && primitiveId <= AGENT_VISUAL_COUNT)
|
||||
{
|
||||
float agentTravel;
|
||||
float3 agentNormal;
|
||||
float materialId;
|
||||
float stepCount;
|
||||
float costTier;
|
||||
if (traceAgentVisual(origin, direction, primitiveId - 1, intervalStart, min(intervalEnd, nearest.travel), agentTravel, agentNormal, materialId, stepCount, costTier))
|
||||
{
|
||||
nearest.hit = true;
|
||||
nearest.travel = agentTravel;
|
||||
nearest.normal = agentNormal;
|
||||
nearest.fieldId = primitiveFieldId(primitiveId);
|
||||
nearest.primitiveId = primitiveId;
|
||||
nearest.roleId = agentVisuals[primitiveId - 1].previousCenterRole.w;
|
||||
nearest.materialId = materialId;
|
||||
nearest.stepCount = stepCount;
|
||||
nearest.lodTier = agentVisuals[primitiveId - 1].lodIndexFlags.x;
|
||||
nearest.costTier = costTier;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
float radius = primitiveRadius(primitiveId);
|
||||
float3 center = primitiveCenterAt(primitiveId, timeSeconds);
|
||||
float hitTravel;
|
||||
|
|
@ -361,6 +554,11 @@ void considerPrimitiveHit(float3 origin, float3 direction, int primitiveId, floa
|
|||
nearest.normal = normalize(p - center);
|
||||
nearest.fieldId = primitiveFieldId(primitiveId);
|
||||
nearest.primitiveId = primitiveId;
|
||||
nearest.roleId = 0.0;
|
||||
nearest.materialId = 0.0;
|
||||
nearest.stepCount = 1.0;
|
||||
nearest.lodTier = 0.0;
|
||||
nearest.costTier = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -369,7 +567,7 @@ void considerAllPrimitiveHits(float3 origin, float3 direction, float intervalSta
|
|||
considerPrimitiveHit(origin, direction, 0, intervalStart, intervalEnd, nearest);
|
||||
|
||||
[unroll]
|
||||
for (int i = 0; i < PLANET_COUNT; i++)
|
||||
for (int i = 0; i < AGENT_VISUAL_COUNT; i++)
|
||||
{
|
||||
considerPrimitiveHit(origin, direction, i + 1, intervalStart, intervalEnd, nearest);
|
||||
}
|
||||
|
|
@ -383,6 +581,11 @@ void considerAllPrimitiveHits(float3 origin, float3 direction, float intervalSta
|
|||
nearest.normal = hitNormal;
|
||||
nearest.fieldId = FIELD_ID_CURSOR;
|
||||
nearest.primitiveId = CURSOR_PRIMITIVE_ID;
|
||||
nearest.roleId = 0.0;
|
||||
nearest.materialId = 5.0;
|
||||
nearest.stepCount = 1.0;
|
||||
nearest.lodTier = 0.0;
|
||||
nearest.costTier = 1.0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -493,6 +696,11 @@ RayMarchResult traverseRay(float2 uv, float2 screenUv, float3 origin, float3 dir
|
|||
result.fieldId = 0.0;
|
||||
result.normal = 0.0;
|
||||
result.coverage = 0.0;
|
||||
result.roleId = 0.0;
|
||||
result.materialId = 0.0;
|
||||
result.stepCount = 0.0;
|
||||
result.lodTier = 0.0;
|
||||
result.costTier = 0.0;
|
||||
result.eventTravel = farDistance + 1.0;
|
||||
result.eventCoverage = 0.0;
|
||||
result.eventColor = 0.0;
|
||||
|
|
@ -503,6 +711,11 @@ RayMarchResult traverseRay(float2 uv, float2 screenUv, float3 origin, float3 dir
|
|||
nearestSolid.normal = 0.0;
|
||||
nearestSolid.fieldId = 0.0;
|
||||
nearestSolid.primitiveId = -1;
|
||||
nearestSolid.roleId = 0.0;
|
||||
nearestSolid.materialId = 0.0;
|
||||
nearestSolid.stepCount = 0.0;
|
||||
nearestSolid.lodTier = 0.0;
|
||||
nearestSolid.costTier = 0.0;
|
||||
considerAllPrimitiveHits(origin, direction, 0.0, farDistance, nearestSolid);
|
||||
|
||||
float stopTravel = nearestSolid.hit ? nearestSolid.travel : farDistance;
|
||||
|
|
@ -517,6 +730,11 @@ RayMarchResult traverseRay(float2 uv, float2 screenUv, float3 origin, float3 dir
|
|||
result.fieldId = FIELD_ID_GRID;
|
||||
result.normal = gridNormal;
|
||||
result.coverage = 1.0;
|
||||
result.roleId = 0.0;
|
||||
result.materialId = 0.0;
|
||||
result.stepCount = 0.0;
|
||||
result.lodTier = 0.0;
|
||||
result.costTier = 0.0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
@ -529,6 +747,11 @@ RayMarchResult traverseRay(float2 uv, float2 screenUv, float3 origin, float3 dir
|
|||
result.fieldId = nearestSolid.fieldId;
|
||||
result.normal = nearestSolid.normal;
|
||||
result.coverage = 1.0;
|
||||
result.roleId = nearestSolid.roleId;
|
||||
result.materialId = nearestSolid.materialId;
|
||||
result.stepCount = nearestSolid.stepCount;
|
||||
result.lodTier = nearestSolid.lodTier;
|
||||
result.costTier = nearestSolid.costTier;
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
@ -664,9 +887,23 @@ float3 shadeBody(float2 uv, float travel, float3 p, float3 normal, int primitive
|
|||
+ studioPmremSpecularRadiance(p, normal, CursorRoughness, cursorF0);
|
||||
}
|
||||
|
||||
float hue = hash21(float2(primitiveId, 6.3));
|
||||
float3 albedo = lerp(float3(0.34, 0.42, 0.18), float3(0.70, 0.76, 0.42), hue);
|
||||
int agentIndex = clamp(primitiveId - 1, 0, AGENT_VISUAL_COUNT - 1);
|
||||
float roleId = agentVisuals[agentIndex].previousCenterRole.w;
|
||||
float materialPulse = agentVisuals[agentIndex].state.y;
|
||||
float3 albedo = lerp(float3(0.34, 0.42, 0.18), float3(0.70, 0.76, 0.42), hash21(float2(primitiveId, 6.3)));
|
||||
float roughness = lerp(0.46, 0.72, hash21(float2(primitiveId, 11.9)));
|
||||
if (abs(roleId - 2.0) < 0.25)
|
||||
{
|
||||
albedo = lerp(float3(0.38, 0.18, 0.72), float3(0.98, 0.56, 0.92), materialPulse);
|
||||
roughness = 0.38;
|
||||
emission += albedo * (0.08 + materialPulse * 0.08);
|
||||
}
|
||||
else if (abs(roleId - 4.0) < 0.25)
|
||||
{
|
||||
albedo = lerp(float3(0.18, 0.43, 0.50), float3(0.72, 0.86, 0.72), materialPulse);
|
||||
roughness = 0.58;
|
||||
}
|
||||
|
||||
float3 dielectricF0 = 0.04;
|
||||
return emission
|
||||
+ albedo * bodyLightIrradianceAt(p, normal) / PI
|
||||
|
|
@ -685,7 +922,7 @@ SceneOut D3D12ScenePS(VertexOut input)
|
|||
SceneOut output;
|
||||
output.colorTravel = float4(result.color, min(result.travel, farDistance + 1.0));
|
||||
output.metadata = float4(result.fieldId, result.normal);
|
||||
output.control = float4(0.0, result.coverage, 0.0, 0.0);
|
||||
output.control = float4(result.materialId, result.coverage, result.stepCount / 40.0, result.lodTier + result.costTier * 0.1);
|
||||
output.eventColor = float4(result.eventColor, result.eventCoverage);
|
||||
output.eventMetadata = float4(FIELD_ID_GRID, result.eventTravel, result.eventCoverage, 0.0);
|
||||
return output;
|
||||
|
|
|
|||
|
|
@ -21,3 +21,4 @@
|
|||
{"timestamp":"2026-05-11T09:14:00+01:00","topic":"aquarium-owned-agent-spatial-layout","lesson":"Do not push Aquarium spatial authority onto Epiphany. Epiphany publishes semantic surfaces; Aquarium owns world placement. Agent visual anchors such as evidenceAnchor, artifactAnchor, workAnchor, reviewAnchor, and continuityAnchor are deterministic Aquarium-local projections from semantic state, not CultNet world coordinates emitted by Epiphany.","files":["docs/epiphany-agent-sdf-visual-language.md","state/memory.json"],"source":"user review"}
|
||||
{"timestamp":"2026-05-11T09:26:00+01:00","topic":"decisive-agent-visual-language","lesson":"The Epiphany agent SDF visual spec should avoid presentation uncertainty. Remove slash-pairs and standalone 'or' alternatives from the visual-language document; choose one mathematical form per organ, favor sphere intersections, torus arcs, trefoil and lemniscate tubes, superquadrics, geodesic ribs, logarithmic spirals, rounded octahedra, and cardioid seeds over generic ellipsoid/capsule placeholders.","files":["docs/epiphany-agent-sdf-visual-language.md"],"source":"user review"}
|
||||
{"timestamp":"2026-05-11T09:40:00+01:00","topic":"agent-sdf-realtime-rendering-plan","lesson":"Agent role SDFs should render as bounded per-agent implicit objects, not one scene-global mega-SDF. Use conservative sphere-tracing distances, proxy rasterization, one role SDF selected after proxy hit, local bounds for expensive features, post-hit normals, cheap shadows, pixel-footprint hit epsilon, LOD tiers, and debug views for step count, proxy hits, material id, LOD, and SDF cost.","files":["docs/epiphany-agent-sdf-visual-language.md","state/memory.json"],"source":"Hart sphere tracing, Enhanced Sphere Tracing, Inigo Quilez SDF bounding, CTSS, NVIDIA SDF grids"}
|
||||
{"timestamp":"2026-05-11T16:18:00+01:00","topic":"agent-visual-state-first-slice","lesson":"The fixed orbit bodies are now backed by an AgentVisualGpu buffer carrying current center, previous center, role id, state scalars, and LOD. D3D12Scene uses the buffer for bounded agent SDF hits; D3D12Post uses the same buffer for agent temporal reprojection. Body and Imagination are the first LOD 1 role SDFs, with debug modes for role, material, step count, LOD, and cost.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl","src/Aquarium.Engine.Contracts/GraphicsSettings.cs","docs/hlsl-renderer.md","state/map.yaml","state/memory.json"]}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ renderer_state:
|
|||
- Deferred scalar Grid height target rendered from additive brush passes.
|
||||
- Self Grid brush uses a widened 17-world-unit gravity bowl plus an Aetheria-style radial cosine wave; CPU, Grid shader, scene placement, and temporal reprojection share the same brush equation.
|
||||
- Direct-traced Grid surface is a terminating perfect mirror over the scalar height field, sampling Studio2 PMREM mip 0.
|
||||
- SDF/analytic solids for Self, planets, and the cursor locator.
|
||||
- SDF/analytic solids for Self, CPU-authored agent visuals, and the cursor locator. The first agent visual path keeps fixed fallback orbit data, uploads current and previous centers through `AgentVisualGpu`, and renders Body plus Imagination with LOD 1 role SDFs.
|
||||
- Agent SDF visual language is documented against Epiphany's published CultNet surfaces: identity from agent memory, motion from heartbeat, posture from role/coordinator/result surfaces, pressure from reorient/pressure surfaces, and expression through bounded orbit wandering plus CPU-visible gravity-well pulses.
|
||||
- Body light buffer feeds Self emission and direct body lighting; future other Selves should join this light lane, not a generic field-instance table.
|
||||
- Studio2 PMREM and irradiance DDS cubemaps are loaded as D3D12 TextureCubes; PMREM serves roughness-mip specular, irradiance serves Lambertian diffuse IBL for non-metal bodies.
|
||||
|
|
@ -68,7 +68,7 @@ renderer_state:
|
|||
next:
|
||||
- Extend explicit renderer debug modes for hits, normals, depth, bins, and lighting.
|
||||
- Promote bodies and body lights from fixed renderer tables to CPU-owned registries with typed controls.
|
||||
- Add an AgentVisualState contract before replacing fixed sub-agent bodies with role-specific SDF organs.
|
||||
- Add per-agent proxy rasterization before the role SDFs grow beyond the current fullscreen bounded-march slice.
|
||||
- Add diegetic labels and object-local menus after renderer and text contracts are stable.
|
||||
|
||||
next_actions:
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@
|
|||
"Role-specific Epiphany agent bodies should be driven by published CultNet surfaces, not private React projection folklore: identity and temperament from epiphany.agent_memory, motion from epiphany.agent_heartbeat, posture from epiphany.surface.roles/coordinator/role_result, and continuity pressure from epiphany.surface.pressure/reorient. The first durable renderer seam should be an AgentVisualState contract before adding per-role SDF organs. Orbit slots are home anchors, not cages: agents may wander a bounded distance for expression, and vertical motion should come from CPU-visible gravity-well pulses that also affect Grid placement.",
|
||||
"Epiphany publishes semantic state, not Aquarium world anchors. AgentVisualState may derive local evidence, artifact, work, review, and continuity anchors, but those are Aquarium-owned diegetic layout rules. Do not require Epiphany graph nodes, jobs, or artifacts to publish spatial coordinates.",
|
||||
"Realtime role SDFs must render through per-agent proxy bounds, not a scene-global mega-SDF. Sphere-trace only conservative distance bounds, select one role SDF after proxy hit, give every expensive feature a local bound, compute normals only after hit, and require LOD plus debug views for step count, proxy hits, material id, LOD tier, and SDF cost tier before adding full organ detail.",
|
||||
"The first live AgentVisualState slice uploads current and previous centers, role id, state scalars, and LOD through AgentVisualGpu. Temporal reprojection must use those uploaded centers for agent field ids; do not rederive moving agent centers separately in post.",
|
||||
"Heavy/specialized SDF evaluators should not live inside generic packed-id helpers when those helpers are called repeatedly; avoid shader compiler path cloning.",
|
||||
"Lighting is diegetic. Self is the initial emitter; later other Selves should emit through an explicit body light lane, not generic field instances or ambient convenience fill.",
|
||||
"Keep bundled blue-noise texture assets available for future dithering/noise work even when no current pass samples them.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue