From 07ee2ec518b9f0bdaa650aff3085dfa04c57e4dd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 13 May 2026 02:59:34 +0100 Subject: [PATCH] Tame Self body emission --- .../Shaders/D3D12SelfBody.hlsl | 25 ++++++++++--------- state/evidence.jsonl | 1 + state/memory.json | 1 + 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl b/src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl index e807aa9..31ee95c 100644 --- a/src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl +++ b/src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl @@ -85,7 +85,7 @@ SelfParts selfParts(float3 local, SdfObject sdfObject, float timeSeconds) float pressure = saturate(sdfObject.state.z); float phase = timeSeconds * 0.55 + heartbeat * 6.28318; float pulse = 0.025 * sin(phase); - float core = sdSphere(local, 0.62 + pulse); + float core = sdSphere(local, 0.48 + pulse); float arc0 = sdRoutingArc(local, 0.00, 0.50, pressure, phase); float arc1 = sdRoutingArc(local, 1.57, -0.58, pressure, phase + 1.2); @@ -116,11 +116,11 @@ SelfParts selfParts(float3 local, SdfObject sdfObject, float timeSeconds) float pupil3 = eyePupil(local, -1.18, 0.28, -0.72 + phase * 0.05, 0.74); float pupil = min(min(pupil0, pupil1), min(pupil2, pupil3)); - float seamRing = sdTorus(local.xzy, float2(0.63, 0.012)); + float seamRing = sdTorus(local.xzy, float2(0.50, 0.010)); float seamMask = abs(local.z) - 0.10; float seam = max(seamRing, -seamMask); - float routed = smoothUnion(core, rail, 0.045); + float routed = smoothUnion(core, rail, 0.030); routed = smoothUnion(routed, halo, 0.020); routed = smoothUnion(routed, gate, 0.036); routed = smoothUnion(routed, pupil, 0.010); @@ -159,10 +159,10 @@ SdfSurface sdfSurface(float3 p, int sdfIndex) float isSeam = (1.0 - isPupil) * (1.0 - isGate) * (1.0 - isRail) * (1.0 - isHalo) * (parts.seam <= min(parts.core, nonCore) ? 1.0 : 0.0); float isCore = (1.0 - isPupil) * (1.0 - isGate) * (1.0 - isRail) * (1.0 - isHalo) * (1.0 - isSeam); float glow = 0.5 + 0.5 * sin(timeSeconds * 1.4 + local.x * 2.0 - local.y * 1.5 + local.z * 2.5); - float3 coreColor = lerp(float3(0.82, 0.46, 0.24), float3(1.0, 0.72, 0.42), glow); - float3 railColor = float3(0.96, 0.58, 0.20); + float3 coreColor = lerp(float3(0.50, 0.26, 0.15), float3(0.82, 0.48, 0.26), glow); + float3 railColor = float3(0.78, 0.45, 0.16); float3 haloColor = float3(0.70, 0.53, 0.34); - float3 gateColor = lerp(float3(0.90, 0.78, 0.54), float3(1.0, 0.92, 0.68), saturate(sdfObject.state.x)); + float3 gateColor = lerp(float3(0.70, 0.62, 0.46), float3(0.92, 0.78, 0.50), saturate(sdfObject.state.x)); float3 pupilColor = float3(0.10, 0.045, 0.018); float3 seamColor = float3(0.06, 0.028, 0.020); @@ -170,12 +170,13 @@ SdfSurface sdfSurface(float3 p, int sdfIndex) surface.baseColor = coreColor * isCore + railColor * isRail + haloColor * isHalo + gateColor * isGate + pupilColor * isPupil + seamColor * isSeam; surface.metallic = 0.0 * isCore + 0.65 * isRail + 0.82 * isHalo + 0.0 * isGate + 0.0 * isPupil + 0.0 * isSeam; surface.roughness = 0.42 * isCore + 0.26 * isRail + 0.22 * isHalo + 0.18 * isGate + 0.32 * isPupil + 0.78 * isSeam; - surface.emission = primitiveEmissionRadiance(sdfFieldId(sdfIndex)) - + coreColor * isCore * 0.10 - + railColor * isRail * 0.42 - + haloColor * isHalo * 0.10 - + gateColor * isGate * (0.34 + sdfObject.state.y * 0.18) - + float3(1.0, 0.62, 0.14) * isPupil * (1.4 + sdfObject.state.y * 0.30) + float3 selfLight = primitiveEmissionRadiance(sdfFieldId(sdfIndex)); + surface.emission = selfLight * (isRail * 0.05 + isGate * 0.04 + isPupil * 0.12) + + coreColor * isCore * 0.015 + + railColor * isRail * 0.16 + + haloColor * isHalo * 0.025 + + gateColor * isGate * (0.10 + sdfObject.state.y * 0.06) + + float3(1.0, 0.50, 0.08) * isPupil * (0.65 + sdfObject.state.y * 0.18) + seamColor * isSeam * 0.01; return surface; } diff --git a/state/evidence.jsonl b/state/evidence.jsonl index 638b270..0814b6d 100644 --- a/state/evidence.jsonl +++ b/state/evidence.jsonl @@ -81,3 +81,4 @@ {"timestamp":"2026-05-13T02:13:00+01:00","topic":"continuous-form-first-rule","lesson":"Carve this into local practice: when a spec describes a continuous visual, physical, or simulation form, start with continuous field math or a coherent parameterization that owns the form. Piecewise capsules, boxes, slabs, helper organs, adapters, and compensators are not acceptable lazy shortcuts; use them only when the form is actually piecewise or measured constraints force a documented cut.","files":["AGENTS.md","state/memory.json","state/evidence.jsonl"],"source":"user instruction after Imagination correction"} {"timestamp":"2026-05-13T02:40:00+01:00","topic":"self-routing-heart-sdf","lesson":"Self should not be a raw emissive placeholder sphere. Its live SDF is the routing authority object: a warm central sphere, continuous clipped torus-arc rails, gate nodes, and dark review seam, all returning standard PBR material fields plus emission. This keeps Self central and radiant without leaking special shading bypasses.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","state/memory.json","state/evidence.jsonl"],"source":"user asked to prioritize Self visual body"} {"timestamp":"2026-05-13T02:56:00+01:00","topic":"self-orrery-material-legibility","lesson":"Self needs fantasy orrery / many-eyed angelic authority, but material legibility matters more than raw glow. Add continuous tilted rings and eye/gate nodes, make rails/halos metallic, keep the core ceramic-warm, reserve strong emission for pupils and active routing accents, and update the visual spec so future passes do not flatten the components back into a glow cloud.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","docs/epiphany-agent-sdf-visual-language.md","state/memory.json","state/evidence.jsonl"],"source":"user visual correction"} +{"timestamp":"2026-05-13T03:00:00+01:00","topic":"self-emission-whiteout","lesson":"A Self body can be the scene light without painting full primitive light radiance onto every visible surface. Adding primitiveEmissionRadiance uniformly to the material made the core tonemap into a white disk and hid the orrery anatomy. Scale field-owned radiance to small rail/gate/pupil accents, reduce core emission, and keep geometry readable through PBR contrast.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","state/memory.json","state/evidence.jsonl"],"source":"user screenshot showed Self white-out"} diff --git a/state/memory.json b/state/memory.json index 4c9da03..b37743f 100644 --- a/state/memory.json +++ b/state/memory.json @@ -65,6 +65,7 @@ "Imagination's ribbon sheets should use one continuous pair-space field for film and raised edge rims. Do not rebuild the bloom from piecewise rim capsules or straight root/tip posts when the sheet parameterization can own the silhouette directly.", "Self's body is the routing authority object: a warm central sphere crossed by continuous clipped torus-arc rails, bright gate nodes, and a dark review seam. Keep it decisive and radiant through PBR surface regions plus emission; do not collapse it back to a raw emissive placeholder sphere.", "Self should read as a fantasy orrery with controlled many-eyed angelic authority: tilted metallic rings and rails around a warm command core, pale gate/eye bodies, bright pupils/active gates, and restrained emission that accents structure instead of flattening it into glow.", + "Self is allowed to be a scene light, but its visible body must not add full primitive light radiance to every surface. Scale field-owned radiance to small accents and let PBR material contrast carry the core, rails, halos, gates, pupils, and seam.", "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.",