Shape Self rails into emissive bands
This commit is contained in:
parent
398154bacd
commit
9834dabd2b
3 changed files with 22 additions and 8 deletions
|
|
@ -8,6 +8,7 @@ struct SelfField
|
|||
float core;
|
||||
float inlay;
|
||||
float rail;
|
||||
float stripe;
|
||||
float gate;
|
||||
float distanceValue;
|
||||
};
|
||||
|
|
@ -43,17 +44,24 @@ float selfShellRadius(float shellIndex, float pressure)
|
|||
return lerp(radius, radius * 0.88, pressure);
|
||||
}
|
||||
|
||||
void selfShellField(float3 dir, float r, float shellIndex, float pressure, float phase, inout float rail, inout float gate)
|
||||
void selfShellField(float3 dir, float r, float shellIndex, float pressure, float phase, inout float rail, inout float stripe, inout float gate)
|
||||
{
|
||||
float shell = r - selfShellRadius(shellIndex, pressure);
|
||||
float3 bands = abs(selfLatticeCoordinates(dir, shellIndex, phase)) * r;
|
||||
float thickness = lerp(0.020, 0.030, saturate(shellIndex * 0.5));
|
||||
float band = min3(bands);
|
||||
float radialHalf = lerp(0.015, 0.021, saturate(shellIndex * 0.5));
|
||||
float bandHalf = lerp(0.040, 0.058, saturate(shellIndex * 0.5));
|
||||
float rounding = radialHalf * 0.62;
|
||||
|
||||
float shellRail = length(float2(shell, min3(bands))) - thickness;
|
||||
float2 railBand = abs(float2(shell, band)) - float2(radialHalf, bandHalf);
|
||||
float shellRail = length(max(railBand, 0.0)) + min(max(railBand.x, railBand.y), 0.0) - rounding;
|
||||
float2 innerStripe = abs(float2(shell + radialHalf + rounding * 0.70, band)) - float2(radialHalf * 0.30, bandHalf * 0.18);
|
||||
float shellStripe = length(max(innerStripe, 0.0)) + min(max(innerStripe.x, innerStripe.y), 0.0) - radialHalf * 0.05;
|
||||
float crossing = length(bands);
|
||||
float shellGate = length(float2(shell * 1.35, crossing * 0.90)) - (thickness * 1.35);
|
||||
float shellGate = length(float2(shell * 1.35, crossing * 0.90)) - (bandHalf * 0.72);
|
||||
|
||||
rail = min(rail, shellRail);
|
||||
stripe = min(stripe, shellStripe);
|
||||
gate = min(gate, shellGate);
|
||||
}
|
||||
|
||||
|
|
@ -67,12 +75,13 @@ SelfField selfField(float3 local, SdfObject sdfObject, float timeSeconds)
|
|||
float3 dir = local / r;
|
||||
float coreRadius = 0.50;
|
||||
float rail = 10.0;
|
||||
float stripe = 10.0;
|
||||
float gate = 10.0;
|
||||
|
||||
[unroll]
|
||||
for (int i = 0; i < 3; i++)
|
||||
{
|
||||
selfShellField(dir, r, (float)i, pressure, phase, rail, gate);
|
||||
selfShellField(dir, r, (float)i, pressure, phase, rail, stripe, gate);
|
||||
}
|
||||
|
||||
float3 coreBands = abs(selfLatticeCoordinates(dir, -1.0, phase));
|
||||
|
|
@ -89,6 +98,7 @@ SelfField selfField(float3 local, SdfObject sdfObject, float timeSeconds)
|
|||
field.core = core;
|
||||
field.inlay = inlay;
|
||||
field.rail = rail;
|
||||
field.stripe = stripe;
|
||||
field.gate = gate;
|
||||
field.distanceValue = routed;
|
||||
return field;
|
||||
|
|
@ -111,21 +121,24 @@ SdfSurface sdfSurface(float3 p, int sdfIndex)
|
|||
|
||||
float isGate = field.gate <= min(min(field.core, field.inlay), field.rail) ? 1.0 : 0.0;
|
||||
float isRail = (1.0 - isGate) * (field.rail <= min(field.core, field.inlay) ? 1.0 : 0.0);
|
||||
float isStripe = isRail * (field.stripe <= 0.0 ? 1.0 : 0.0);
|
||||
float isInlay = (1.0 - isGate) * (1.0 - isRail) * (field.inlay <= field.core ? 1.0 : 0.0);
|
||||
float isCore = (1.0 - isGate) * (1.0 - isRail) * (1.0 - isInlay);
|
||||
|
||||
float3 coreColor = float3(0.0, 0.0, 0.0);
|
||||
float3 inlayColor = float3(1.0, 0.70, 0.22);
|
||||
float3 railColor = float3(0.86, 0.54, 0.20);
|
||||
float3 stripeColor = float3(1.0, 0.84, 0.34);
|
||||
float3 gateColor = lerp(float3(0.78, 0.66, 0.42), float3(1.0, 0.82, 0.42), saturate(sdfObject.state.x));
|
||||
|
||||
SdfSurface surface;
|
||||
surface.baseColor = coreColor * isCore + inlayColor * isInlay + railColor * isRail + gateColor * isGate;
|
||||
surface.baseColor = coreColor * isCore + inlayColor * isInlay + lerp(railColor, stripeColor, isStripe) * isRail + gateColor * isGate;
|
||||
surface.metallic = 0.0 * isCore + 0.64 * isInlay + 0.72 * isRail + 0.18 * isGate;
|
||||
surface.roughness = 1.0 * isCore + 0.20 * isInlay + 0.24 * isRail + 0.18 * isGate;
|
||||
|
||||
float3 selfLight = primitiveEmissionRadiance(sdfFieldId(sdfIndex));
|
||||
surface.emission = selfLight * (isGate * 0.08)
|
||||
+ stripeColor * isStripe * (0.92 + sdfObject.state.y * 0.16)
|
||||
+ gateColor * isGate * (0.42 + sdfObject.state.y * 0.12);
|
||||
return surface;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,3 +95,4 @@
|
|||
{"timestamp":"2026-05-13T04:32:09+01:00","topic":"self-compact-triple-band-gates","lesson":"Self gate material should mark compact lattice nodes, not every pairwise rail crossing. Pairwise gate fields stretch along shallow rail intersections and produce flat material slabs that overtake the rings. Require all three angular bands to agree for gate distance so shallow overlaps remain rail material.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","docs/epiphany-agent-sdf-visual-language.md","state/memory.json","state/evidence.jsonl"],"source":"user screenshot showed flat gate-colored slabs at shallow ring intersections"}
|
||||
{"timestamp":"2026-05-13T04:41:09+01:00","topic":"temporal-jitter-specular-fireflies","lesson":"Projection jitter was disabled because an earlier implementation made the whole frame visibly wobble. Re-enable it as a small sub-half-pixel Halton sequence with previous-jitter tracking, give the resolver a narrow SDF hot-current path so validated history can damp transient specular fireflies without relaxing travel/field/normal/coverage validation, and attenuate bloom when resolved scene luminance is lower than the raw current spike so current-frame bloom does not bypass TAA.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl","docs/hlsl-renderer.md","docs/tsr-inspired-taa-spec.md","state/memory.json","state/evidence.jsonl"],"source":"user asked to give TAA teeth for Self rail highlights"}
|
||||
{"timestamp":"2026-05-13T04:51:17+01:00","topic":"bloom-prefilter-firefly-clamp","lesson":"If a specular firefly exists for only one frame, resolving the source pixel after bloom is too late: the current-frame bloom pyramid has already spread the spike to neighbors. Clamp unsupported single-pixel HDR spikes in the bloom prefilter against local neighborhood luminance, then let temporal resolve and bloom attenuation handle the remaining supported highlights.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl","docs/hlsl-renderer.md","docs/tsr-inspired-taa-spec.md","state/memory.json","state/evidence.jsonl"],"source":"user screenshot showed one-frame glowy fireflies after temporal resolve change"}
|
||||
{"timestamp":"2026-05-13T05:31:00+01:00","topic":"self-inner-rail-emission-strip","lesson":"After reverting to the stable 1562837 Self form and attenuating same-field direct light in shared PBR, thicken rails into rounded bands rather than merely increasing tube radius. Bloom-driving rail emission should ride a narrow inner-surface center strip derived from the same shell/band coordinates; do not add separate hoop geometry or broad flat emissive paint for this read.","files":["src/Aquarium.Epiphany/Shaders/D3D12SelfBody.hlsl","state/memory.json","state/evidence.jsonl"],"source":"user asked for thicker rails with an emissive strip along the middle of the inside surface, then clarified they should thicken into bands"}
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@
|
|||
"Imagination's live shader realizes the six-petal topology as three mirrored sheet-pair fields. Keep film, rim, tendril, spark, shadow, and seed distances separated through material classification so raised rims can glow without collapsing the petal sheets into one generic blob.",
|
||||
"Do not reintroduce Imagination's old polar-lobed seed or traced half-torus shadow. The seed is a plain luminous opal bud unless the spec asks otherwise; backlog shadow needs a visual contract before it becomes traced geometry.",
|
||||
"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 black void command sphere with sharp golden Fresnel edge-light, one gold core band, and a compact log-spherical lattice around it. Rails are fixed radial shell strata crossed with angular harmonic bands, gates are compact triple-band crossings, and each concentric shell owns an orthogonal frame. Make rails readable PBR bands, not hairline emitters; reserve bloom-driving emission for gate nodes and the core Fresnel rim. Do not let pairwise shallow rail intersections become gate slabs, animate radial zero crossings, grow rings from points, stack multiple core bands, or rebuild Self as named hoop inventories, one-radius ornament layers, or repeated trigonometry piles.",
|
||||
"Self's body is the routing authority object: a black void command sphere with sharp golden Fresnel edge-light, one gold core band, and a compact log-spherical lattice around it. Rails are fixed radial shell strata crossed with angular harmonic bands, gates are compact triple-band crossings, and each concentric shell owns an orthogonal frame. Make rails readable PBR bands, not hairline emitters; bloom-driving rail emission should be a narrow inner-surface center strip derived from the same shell/band coordinates, with gate nodes and the core Fresnel rim as accents. Do not let pairwise shallow rail intersections become gate slabs, animate radial zero crossings, grow rings from points, stack multiple core bands, or rebuild Self as named hoop inventories, one-radius ornament layers, or repeated trigonometry piles.",
|
||||
"For Self, the orrery comparison is motion and topology grammar. Rails, gates, and seams should emerge from a shared orbital space with phase motion, not from independent tilted hoops, loose symbols, or literal anatomical motifs.",
|
||||
"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, gates, 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.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue