Split fractal field resolve passes
This commit is contained in:
parent
112abbe5f6
commit
7b9cd89f4e
6 changed files with 114 additions and 22 deletions
|
|
@ -120,7 +120,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
private ID3D12PipelineState? scenePipelineState;
|
||||
private ID3D12PipelineState? temporalGaussianPipelineState;
|
||||
private ID3D12PipelineState? localCastFusionPipelineState;
|
||||
private ID3D12PipelineState? fractalSplatRenderPipelineState;
|
||||
private ID3D12PipelineState? fractalSurfaceSplatRenderPipelineState;
|
||||
private ID3D12PipelineState? fractalTransparentSplatRenderPipelineState;
|
||||
private ID3D12PipelineState? fractalSplatPipelineState;
|
||||
private ID3D12PipelineState? fractalSdfReservoirPipelineState;
|
||||
private ID3D12PipelineState? fractalPbrReservoirPipelineState;
|
||||
|
|
@ -818,7 +819,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
&& scenePipelineState is not null
|
||||
&& temporalGaussianPipelineState is not null
|
||||
&& localCastFusionPipelineState is not null
|
||||
&& fractalSplatRenderPipelineState is not null
|
||||
&& fractalSurfaceSplatRenderPipelineState is not null
|
||||
&& fractalTransparentSplatRenderPipelineState is not null
|
||||
&& fractalSplatPipelineState is not null
|
||||
&& fractalSdfReservoirPipelineState is not null
|
||||
&& fractalPbrReservoirPipelineState is not null
|
||||
|
|
@ -1018,8 +1020,10 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
temporalGaussian.Name = "Aquarium D3D12 Temporal Gaussian Pipeline";
|
||||
var localCastFusion = CreateLocalCastFusionPipelineState(paths.LocalCastFusion);
|
||||
localCastFusion.Name = "Aquarium D3D12 LocalCast Fusion Compute Pipeline";
|
||||
var fractalSplatRender = CreateFractalSplatRenderPipelineState(paths.FractalSplatRender);
|
||||
fractalSplatRender.Name = "Aquarium D3D12 Fractal Splat Render Pipeline";
|
||||
var fractalSurfaceSplatRender = CreateFractalSurfaceSplatRenderPipelineState(paths.FractalSplatRender);
|
||||
fractalSurfaceSplatRender.Name = "Aquarium D3D12 Fractal Surface Splat Render Pipeline";
|
||||
var fractalTransparentSplatRender = CreateFractalTransparentSplatRenderPipelineState(paths.FractalSplatRender);
|
||||
fractalTransparentSplatRender.Name = "Aquarium D3D12 Fractal Transparent Splat Render Pipeline";
|
||||
var fractalSplat = CreateFractalReservoirPipelineState(paths.FractalReservoir, "D3D12FractalSplatReceiptCS");
|
||||
fractalSplat.Name = "Aquarium D3D12 Fractal Splat Compute Pipeline";
|
||||
var fractalSdfReservoir = CreateFractalReservoirPipelineState(paths.FractalReservoir, "D3D12SdfEnvelopeReservoirCS");
|
||||
|
|
@ -1052,7 +1056,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
scene,
|
||||
temporalGaussian,
|
||||
localCastFusion,
|
||||
fractalSplatRender,
|
||||
fractalSurfaceSplatRender,
|
||||
fractalTransparentSplatRender,
|
||||
fractalSplat,
|
||||
fractalSdfReservoir,
|
||||
fractalPbrReservoir,
|
||||
|
|
@ -1521,7 +1526,9 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
context.CommandList.SetGraphicsRootShaderResourceView(RootFractalSdfReservoirSrv, fractalSdfReservoirBuffer.Resource.GPUVirtualAddress);
|
||||
context.CommandList.SetGraphicsRootShaderResourceView(RootFractalPbrReservoirSrv, fractalPbrReservoirBuffer.Resource.GPUVirtualAddress);
|
||||
context.CommandList.SetGraphicsRootShaderResourceView(RootFractalRadiosityReservoirSrv, fractalRadiosityReservoirBuffer.Resource.GPUVirtualAddress);
|
||||
context.CommandList.SetPipelineState(fractalSplatRenderPipelineState!);
|
||||
context.CommandList.SetPipelineState(fractalSurfaceSplatRenderPipelineState!);
|
||||
context.CommandList.DrawInstanced(6, (uint)visibleFractalSplatCount, 0, 0);
|
||||
context.CommandList.SetPipelineState(fractalTransparentSplatRenderPipelineState!);
|
||||
context.CommandList.DrawInstanced(6, (uint)visibleFractalSplatCount, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
@ -2303,7 +2310,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
scenePipelineState!,
|
||||
temporalGaussianPipelineState!,
|
||||
localCastFusionPipelineState!,
|
||||
fractalSplatRenderPipelineState!,
|
||||
fractalSurfaceSplatRenderPipelineState!,
|
||||
fractalTransparentSplatRenderPipelineState!,
|
||||
fractalSplatPipelineState!,
|
||||
fractalSdfReservoirPipelineState!,
|
||||
fractalPbrReservoirPipelineState!,
|
||||
|
|
@ -2324,7 +2332,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
scenePipelineState = pipelines.Scene;
|
||||
temporalGaussianPipelineState = pipelines.TemporalGaussian;
|
||||
localCastFusionPipelineState = pipelines.LocalCastFusion;
|
||||
fractalSplatRenderPipelineState = pipelines.FractalSplatRender;
|
||||
fractalSurfaceSplatRenderPipelineState = pipelines.FractalSurfaceSplatRender;
|
||||
fractalTransparentSplatRenderPipelineState = pipelines.FractalTransparentSplatRender;
|
||||
fractalSplatPipelineState = pipelines.FractalSplat;
|
||||
fractalSdfReservoirPipelineState = pipelines.FractalSdfReservoir;
|
||||
fractalPbrReservoirPipelineState = pipelines.FractalPbrReservoir;
|
||||
|
|
@ -2348,7 +2357,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
scenePipelineState = null;
|
||||
temporalGaussianPipelineState = null;
|
||||
localCastFusionPipelineState = null;
|
||||
fractalSplatRenderPipelineState = null;
|
||||
fractalSurfaceSplatRenderPipelineState = null;
|
||||
fractalTransparentSplatRenderPipelineState = null;
|
||||
fractalSplatPipelineState = null;
|
||||
fractalSdfReservoirPipelineState = null;
|
||||
fractalPbrReservoirPipelineState = null;
|
||||
|
|
@ -2674,9 +2684,20 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
return CreateFullscreenPipelineState(path, "D3D12TemporalGaussianVS", "D3D12TemporalGaussianPS", [SceneHdrFormat, SceneHdrFormat, SceneHdrFormat, SceneHdrFormat], enableDepth: true);
|
||||
}
|
||||
|
||||
private ID3D12PipelineState CreateFractalSplatRenderPipelineState(string path)
|
||||
private ID3D12PipelineState CreateFractalSurfaceSplatRenderPipelineState(string path)
|
||||
{
|
||||
return CreateFullscreenPipelineState(path, "D3D12FractalSplatVS", "D3D12FractalSplatPS", [SceneHdrFormat, SceneHdrFormat, SceneHdrFormat, SceneHdrFormat], enableDepth: true);
|
||||
return CreateFullscreenPipelineState(path, "D3D12FractalSplatVS", "D3D12FractalSurfaceSplatPS", [SceneHdrFormat, SceneHdrFormat, SceneHdrFormat, SceneHdrFormat], enableDepth: true);
|
||||
}
|
||||
|
||||
private ID3D12PipelineState CreateFractalTransparentSplatRenderPipelineState(string path)
|
||||
{
|
||||
return CreateFullscreenPipelineState(
|
||||
path,
|
||||
"D3D12FractalSplatVS",
|
||||
"D3D12FractalTransparentSplatPS",
|
||||
[SceneHdrFormat, SceneHdrFormat, SceneHdrFormat, SceneHdrFormat],
|
||||
CreateTransparentFieldBlend(),
|
||||
enableDepth: false);
|
||||
}
|
||||
|
||||
private ID3D12PipelineState CreateLocalCastFusionPipelineState(string path)
|
||||
|
|
@ -2745,6 +2766,40 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
new BlendDescription(Blend.One, Blend.One, Blend.One, Blend.One));
|
||||
}
|
||||
|
||||
private static BlendDescription CreateTransparentFieldBlend()
|
||||
{
|
||||
var blend = BlendDescription.Opaque;
|
||||
blend.IndependentBlendEnable = true;
|
||||
blend.RenderTarget[0] = new RenderTargetBlendDescription(
|
||||
blendEnable: true,
|
||||
logicOpEnable: false,
|
||||
srcBlend: Blend.One,
|
||||
destBlend: Blend.One,
|
||||
blendOp: BlendOperation.Add,
|
||||
srcBlendAlpha: Blend.Zero,
|
||||
destBlendAlpha: Blend.One,
|
||||
blendOpAlpha: BlendOperation.Add,
|
||||
logicOp: LogicOp.Noop,
|
||||
renderTargetWriteMask: ColorWriteEnable.All);
|
||||
|
||||
for (var index = 1; index < 8; index++)
|
||||
{
|
||||
blend.RenderTarget[index] = new RenderTargetBlendDescription(
|
||||
blendEnable: false,
|
||||
logicOpEnable: false,
|
||||
srcBlend: Blend.One,
|
||||
destBlend: Blend.Zero,
|
||||
blendOp: BlendOperation.Add,
|
||||
srcBlendAlpha: Blend.One,
|
||||
destBlendAlpha: Blend.Zero,
|
||||
blendOpAlpha: BlendOperation.Add,
|
||||
logicOp: LogicOp.Noop,
|
||||
renderTargetWriteMask: ColorWriteEnable.None);
|
||||
}
|
||||
|
||||
return blend;
|
||||
}
|
||||
|
||||
private ID3D12PipelineState CreateFullscreenPipelineState(
|
||||
string path,
|
||||
string vertexEntryPoint,
|
||||
|
|
@ -2931,7 +2986,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
ID3D12PipelineState Scene,
|
||||
ID3D12PipelineState TemporalGaussian,
|
||||
ID3D12PipelineState LocalCastFusion,
|
||||
ID3D12PipelineState FractalSplatRender,
|
||||
ID3D12PipelineState FractalSurfaceSplatRender,
|
||||
ID3D12PipelineState FractalTransparentSplatRender,
|
||||
ID3D12PipelineState FractalSplat,
|
||||
ID3D12PipelineState FractalSdfReservoir,
|
||||
ID3D12PipelineState FractalPbrReservoir,
|
||||
|
|
@ -2954,7 +3010,8 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
FractalPbrReservoir.Dispose();
|
||||
FractalSdfReservoir.Dispose();
|
||||
FractalSplat.Dispose();
|
||||
FractalSplatRender.Dispose();
|
||||
FractalTransparentSplatRender.Dispose();
|
||||
FractalSurfaceSplatRender.Dispose();
|
||||
LocalCastFusion.Dispose();
|
||||
TemporalGaussian.Dispose();
|
||||
foreach (var sdfProxy in SdfProxies)
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ struct SceneOut
|
|||
|
||||
static const float FIELD_ID_FRACTAL_SPLAT_BASE = 4000.0;
|
||||
static const float FIELD_ENCODING_DENSITY = 2.0;
|
||||
static const float FIELD_ENCODING_EXTINCTION = 3.0;
|
||||
|
||||
void cameraBasis(float3 camera, float3 target, out float3 forward, out float3 right, out float3 up)
|
||||
{
|
||||
|
|
@ -160,7 +161,13 @@ FractalSplatVertexOut D3D12FractalSplatVS(uint vertexId : SV_VertexID, uint inst
|
|||
return output;
|
||||
}
|
||||
|
||||
SceneOut D3D12FractalSplatPS(FractalSplatVertexOut input)
|
||||
bool IsTransparentField(float encoding)
|
||||
{
|
||||
return abs(encoding - FIELD_ENCODING_DENSITY) < 0.5 ||
|
||||
abs(encoding - FIELD_ENCODING_EXTINCTION) < 0.5;
|
||||
}
|
||||
|
||||
SceneOut ResolveFractalSplat(FractalSplatVertexOut input, bool renderTransparent)
|
||||
{
|
||||
float r2 = dot(input.quad, input.quad);
|
||||
if (r2 >= 1.0)
|
||||
|
|
@ -176,7 +183,12 @@ SceneOut D3D12FractalSplatPS(FractalSplatVertexOut input)
|
|||
bool sdfResident = sdf.weightTargetCount.z > 0.5;
|
||||
bool pbrResident = pbr.weightTargetCount.z > 0.5;
|
||||
bool radiosityResident = radiosity.weightTargetCount.z > 0.5;
|
||||
bool densityField = abs(splat.materialConfidence.z - FIELD_ENCODING_DENSITY) < 0.5;
|
||||
bool transparentField = IsTransparentField(splat.materialConfidence.z);
|
||||
if (transparentField != renderTransparent)
|
||||
{
|
||||
discard;
|
||||
}
|
||||
|
||||
float surfaceZ = sqrt(saturate(1.0 - r2));
|
||||
float3 tangentOffset = (input.basisRight * input.quad.x) + (input.basisUp * input.quad.y);
|
||||
float3 normal = normalize(input.basisForward * (0.92 + surfaceZ * 0.08) + tangentOffset * 0.16);
|
||||
|
|
@ -185,7 +197,7 @@ SceneOut D3D12FractalSplatPS(FractalSplatVertexOut input)
|
|||
float viewFacing = saturate(dot(normalize(cameraPosition - surfaceWorld), normal));
|
||||
float starFacing = saturate(dot(normal, normalize(float3(0.25, 0.006, 0.077) - surfaceWorld)));
|
||||
float material = saturate(splat.materialConfidence.x);
|
||||
float3 fallbackColor = densityField
|
||||
float3 fallbackColor = transparentField
|
||||
? lerp(float3(0.18, 0.08, 0.32), float3(1.0, 0.44, 0.12), material)
|
||||
: lerp(float3(0.08, 0.38, 0.18), float3(0.78, 0.61, 0.32), material);
|
||||
float3 pbrColor = lerp(float3(0.06, 0.30, 0.14), saturate(pbr.baseColorRoughMetal.rgb), 0.72);
|
||||
|
|
@ -197,19 +209,19 @@ SceneOut D3D12FractalSplatPS(FractalSplatVertexOut input)
|
|||
radiosityResident ? saturate(radiosity.validation.x) : 0.0));
|
||||
float3 color = pbrResident ? pbrColor : fallbackColor;
|
||||
float roughness = pbrResident ? saturate(pbr.baseColorRoughMetal.w) : 0.6;
|
||||
float diffuse = densityField ? 0.52 + 0.36 * viewFacing : 0.32 + 0.50 * starFacing + 0.18 * viewFacing;
|
||||
float diffuse = transparentField ? 0.52 + 0.36 * viewFacing : 0.32 + 0.50 * starFacing + 0.18 * viewFacing;
|
||||
float fresnel = pow(saturate(1.0 - viewFacing), 2.2);
|
||||
float3 litColor = color * diffuse + color * 0.18;
|
||||
litColor += radiosityResident ? radiosityColor * (0.24 + reservoirConfidence * 0.48) : 0.0;
|
||||
litColor += lerp(float3(0.015, 0.06, 0.05), densityField ? float3(0.95, 0.28, 0.08) : float3(0.24, 0.30, 0.20), 1.0 - roughness) * fresnel * (densityField ? 0.72 : 0.48);
|
||||
float opacity = densityField
|
||||
litColor += lerp(float3(0.015, 0.06, 0.05), transparentField ? float3(0.95, 0.28, 0.08) : float3(0.24, 0.30, 0.20), 1.0 - roughness) * fresnel * (transparentField ? 0.72 : 0.48);
|
||||
float opacity = transparentField
|
||||
? saturate(edgeCoverage * edgeCoverage * (0.18 + reservoirConfidence * 0.32))
|
||||
: saturate(edgeCoverage * (0.78 + reservoirConfidence * 0.22));
|
||||
|
||||
SceneOut output;
|
||||
output.colorTravel = float4(litColor * opacity, min(input.travel - surfaceZ * input.worldRadius, farDistance + 1.0));
|
||||
output.metadata = float4(FIELD_ID_FRACTAL_SPLAT_BASE, normal);
|
||||
output.control = float4(opacity, reservoirConfidence, densityField ? FIELD_ENCODING_DENSITY / 10.0 : saturate((sdfResident ? sdf.centerRadius.w : splat.centerRadius.w) * 40.0), 0.0);
|
||||
output.control = float4(opacity, reservoirConfidence, transparentField ? splat.materialConfidence.z / 10.0 : saturate((sdfResident ? sdf.centerRadius.w : splat.centerRadius.w) * 40.0), 0.0);
|
||||
output.reservoirGuide = float4(
|
||||
sdfResident ? saturate(sdf.validation.x) : 0.0,
|
||||
pbrResident ? saturate(pbr.validation.x) : 0.0,
|
||||
|
|
@ -218,3 +230,18 @@ SceneOut D3D12FractalSplatPS(FractalSplatVertexOut input)
|
|||
output.depth = saturate(input.travel / max(farDistance, 0.0001));
|
||||
return output;
|
||||
}
|
||||
|
||||
SceneOut D3D12FractalSurfaceSplatPS(FractalSplatVertexOut input)
|
||||
{
|
||||
return ResolveFractalSplat(input, false);
|
||||
}
|
||||
|
||||
SceneOut D3D12FractalTransparentSplatPS(FractalSplatVertexOut input)
|
||||
{
|
||||
return ResolveFractalSplat(input, true);
|
||||
}
|
||||
|
||||
SceneOut D3D12FractalSplatPS(FractalSplatVertexOut input)
|
||||
{
|
||||
return D3D12FractalSurfaceSplatPS(input);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -202,3 +202,4 @@
|
|||
{"timestamp":"2026-05-21T10:05:00+01:00","topic":"aquageo-transparent-form-claims","lesson":"The `.aquageo` DSL now has first-class `density` and `extinction` field claims, and the recursive `flame` primitive emits Density payloads instead of pretending to be height. FractalSummaryBuilder scores Height, SignedDistance, Density, and Extinction as Form contribution. FractalHeightBrushCompiler filters mixed trees to Height payloads for height-field lowering, preserving the invariant that backend compilers lower only the payloads they own.","files":["src/Aquarium.Engine.Contracts/Fractal/AquariumFractalContracts.cs","src/Aquarium.Engine.Fractal/Grammar/FractalDslCompiler.cs","src/Aquarium.Engine.Fractal/Grammar/FractalSummaryBuilder.cs","src/Aquarium.Engine.Fractal/Brushes/FractalHeightBrushCompiler.cs","tests/Aquarium.Engine.Fractal.Tests/FractalDslCompilerTests.cs","tests/Aquarium.Engine.Fractal.Tests/FractalHeightBrushCompilerTests.cs","tests/Aquarium.Engine.Fractal.Tests/ZyphosFractalTerrainTests.cs","docs/perfect-machine-architecture.md","state/map.yaml","state/memory.json"],"source":"continued code migration after density claims exposed height lowering as a hidden payload router"}
|
||||
{"timestamp":"2026-05-21T10:20:00+01:00","topic":"gpu-field-encoding-tag","lesson":"D3D12FractalReservoirCompute now tags flame-mode splats as Density in an existing material/confidence lane, preserving the 80-byte hot splat stride. D3D12FractalSplatRender branches on the encoding tag for a softer transparent-field visualization while opaque SDF splats keep the existing surface resolve. The receipt harness now reports Form/Appearance/Transport reservoir layers while keeping backend slice names in parentheses. This is field-aware GPU consumption, not full participating-media integration.","files":["src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl","src/Aquarium.Engine/Render/Shaders/D3D12FractalSplatRender.hlsl","tools/Aquarium.Fractal.Receipt/Program.cs","state/map.yaml","state/memory.json"],"source":"continued runtime migration after shared CPU reservoir and DSL field claims were in place"}
|
||||
{"timestamp":"2026-05-21T10:45:00+01:00","topic":"summary-form-encoding-mask","lesson":"AquariumFractalSummary now carries a FormEncodingMask. FractalSummaryBuilder records Height, SignedDistance, Density, and Extinction form encodings from claims; FractalStructuralProbeGenerator derives density or extinction probes from density-only or extinction-only summaries unless a caller explicitly overrides the encoding. This prevents selected-cut structural probes from silently defaulting transparent form nodes back into SDF.","files":["src/Aquarium.Engine.Contracts/Fractal/AquariumFractalContracts.cs","src/Aquarium.Engine.Fractal/Grammar/FractalSummaryBuilder.cs","src/Aquarium.Engine.Fractal/Lod/FractalStructuralProbeGenerator.cs","src/Aquarium.Engine.Fractal/Lod/FractalStructuralProbeReservoir.cs","tests/Aquarium.Engine.Fractal.Tests/FractalSummaryBuilderTests.cs","tests/Aquarium.Engine.Fractal.Tests/FractalStructuralProbeGeneratorTests.cs","tests/Aquarium.Engine.Fractal.Tests/FractalStructuralProbeReservoirTests.cs","state/memory.json"],"source":"continued after noticing summaries had no authority to describe which field encodings they summarized"}
|
||||
{"timestamp":"2026-05-21T11:20:00+01:00","topic":"fractal-resolve-pass-split","lesson":"The first visible field-aware splat renderer now splits output-merge authority instead of hiding opaque and transparent Form encodings behind one pixel shader branch. D3D12Renderer compiles separate surface and transparent fractal splat pipelines over the same GPU-resident splat/SDF/PBR/radiosity buffers. Surface splats use D3D12FractalSurfaceSplatPS with depth enabled for SignedDistance claims; density/extinction splats use D3D12FractalTransparentSplatPS with depth disabled and additive color-only blending while metadata/control/reservoir guide remain owned by opaque surfaces. This preserves the shared reservoir and 80-byte hot packet invariant while making the future volumetric target boundary honest.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12FractalSplatRender.hlsl","state/map.yaml","state/memory.json","state/scratch-fractal-resolve-split.md"],"source":"continued Perfect Machine build after the user rejected stopping before the renderer could distinguish transparent fields from opaque surfaces"}
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ renderer_state:
|
|||
- The Apophysis/FLAM3 reference subset now has a runtime parser/evaluator boundary: FractalFlameFileParser reads `.flame` xforms with weight, color, affine coefficients, and `linear`/`spherical`/`bubble` variation weights; FractalFlameChaosGame produces deterministic point sets; FractalPointHistogramBuilder produces fixed histogram checksums for parity receipts.
|
||||
- tools/Aquarium.Fractal.Receipt can now run a CPU flame histogram receipt with `--flame`; scripts/fractal-flame-receipt.ps1 emits the default linear/spherical/bubble fixture checksum 0xAEB1C81B under artifacts/fractal-flame-receipts. It can also hash binary PPM renders with `--reference-ppm`; scripts/fractal-flame-reference-render.ps1 drives a local external `flam3-render` through FLAM3's documented env vars and records image-shape/non-black/checksum receipts under artifacts/fractal-flame-reference without vendoring GPL renderer code.
|
||||
- D3D12FractalReservoirCompute has an explicit flame 2D program mode for the proven FLAM3-style subset. FractalGpuProgramCompiler lowers flame rows into packed affine/variation program rows, and tools/Aquarium.Fractal.Receipt can run them with `--program-flame`. Flame mode now keeps 32-byte AquariumPackedFractalFlameState rows in a GPU UAV so touched splats advance persistent chaos-game state instead of replaying from the origin. Local GTX 1070 JWildfire selftest receipt after 8 full-population acquisition frames: 2,000,000 resident splats, 2,000,000 flame states, 2,000,000 first-slice Form/Appearance/Transport reservoirs each, steady 50,000 splat updates/frame, 15,000 reservoir updates/pass/frame, depth 8, 1.011 ms/frame, 988.8 FPS equivalent, 84.85% CPU-slice distribution parity, checksum 0xC633FADC3BD7E5BE.
|
||||
- The live GPU splat packet now carries a Form encoding tag in the existing material/confidence lane without changing the 80-byte stride. Flame-mode compute writes Density encoding; the visible fractal splat pass branches on that encoding for a softer transparent-field resolve while keeping opaque SDF splats on the existing surface path. This is not full volume ray integration, but it keeps the hot path field-aware without adding a parallel transparent buffer.
|
||||
- The live GPU splat packet now carries a Form encoding tag in the existing material/confidence lane without changing the 80-byte stride. Flame-mode compute writes Density encoding; the visible fractal splat renderer uses two explicit graphics pipeline states over the same GPU-resident buffers: opaque signed-distance surface splats depth-test/write through D3D12FractalSurfaceSplatPS, while density/extinction splats run through D3D12FractalTransparentSplatPS with depth disabled and additive color-only blending. This is not full volume ray integration, but it makes depth/blend ownership explicit without adding a parallel transparent reservoir or buffer.
|
||||
- The first visual parity receipt compares GPU flame splat XY histograms against the CPU flame oracle. With 250,000 GPU readback splats and 1,000,000 CPU reference samples in 128x128 bounds -8,-8,8,8, the mixed flame fixture scores 84.05% distribution parity at frame 1, 84.10% at frame 5, 84.20% at frame 20, and 84.24% after the 60-frame/10-warmup receipt, with cosine similarity around 0.9955. This is a stable sampler score, not proof of learned convergence; visual-error feedback is still future work.
|
||||
- View-conditioned visual parity now scores named camera windows instead of trusting one global histogram. For the depth-16 flame receipt, global -8..8 scores 97.09%, mid -1..1 scores 91.93%, close -0.5..0.5 scores 88.97%, and micro -0.25..0.25 scores 82.05% with 2,656 starved reference bins and 17.95% underrepresented mass. This is the current hard loss: the reservoir is not yet spending work based on camera-conditioned underrepresentation.
|
||||
- High-reference flame contact sheets should use at least 20M CPU oracle samples for visual judgment. The current artifact is artifacts/fractal-contact-sheet-hq/flame-parity-contact-sheet-hq.png, comparing 20M CPU oracle histograms against 250k Aquarium GPU readback samples for global frame 1/10 and zoom frame 1/10. The 1M-sample oracle was too noisy and should be treated as a scalar smoke check only.
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@
|
|||
"The local Apophysis/FLAM3 subset parser owns only a small proven flame shape: xform weight/color, affine coefficients, and `linear`, `spherical`, and `bubble` variation weights. `FractalFlameChaosGame` and `FractalPointHistogramBuilder` provide deterministic CPU receipts. External renderer proof stays optional and outside runtime through FLAM3-compatible PPM receipt hashing.",
|
||||
"Use `scripts/fractal-flame-receipt.ps1` for the local CPU flame receipt. The default mixed linear/spherical/bubble fixture uses 8192 samples, 64 burn-in, 64x64 bounds -8,-8,8,8, seed 0x0BADC0DE, and checksum 0xAEB1C81B. Use `scripts/fractal-flame-reference-render.ps1` with a local `flam3-render` executable to produce external PPM image receipts under artifacts/fractal-flame-reference; Aquarium does not vendor Apophysis or FLAM3.",
|
||||
"FractalGpuProgramCompiler can lower the proven FLAM3-style flame subset into GPU program rows for D3D12FractalReservoirCompute's explicit flame 2D program mode. Flame mode owns a 32-byte AquariumPackedFractalFlameState UAV row per resident splat; touched rows advance persistent chaos-game state instead of replaying from the origin. The cache has two phases: full-population acquisition, then budgeted stochastic maintenance. On 2026-05-21 the GTX 1070 ran JWildfire FARender selftest.flame with 2,000,000 splats, 2,000,000 flame states, three 2,000,000-row first-slice Form/Appearance/Transport reservoir layers, 8 full acquisition frames, steady 50,000 splat updates/frame, 15,000 reservoir updates/pass/frame, depth 8, at 1.011 ms/frame / 988.8 FPS equivalent, 84.85% CPU-slice distribution parity, checksum 0xC633FADC3BD7E5BE. Without acquisition, the same steady budget scored only 32.64%; do not confuse a cold persistent cache with a bad sampler.",
|
||||
"The live GPU splat packet carries a Form encoding tag in an existing material/confidence lane so flame-mode compute can mark splats as Density without changing the 80-byte hot stride. D3D12FractalSplatRender branches on that tag for the current transparent-field visualization. This is a field-aware debug/consumption path, not full volume ray integration; do not add a second transparent splat buffer unless a measured resolve need beats the shared packet invariant.",
|
||||
"The live GPU splat packet carries a Form encoding tag in an existing material/confidence lane so flame-mode compute can mark splats as Density without changing the 80-byte hot stride. D3D12FractalSplatRender now compiles separate surface and transparent graphics pipeline states over the same GPU-resident buffers: signed-distance surface claims depth-test/write as opaque geometry, while density/extinction claims use a depth-disabled additive color-only pass. This is a field-aware debug/consumption path, not full volume ray integration; do not add a second transparent reservoir or buffer unless a measured resolve need beats the shared packet invariant.",
|
||||
"The first visual parity metric compares GPU flame splat XY histograms against the local CPU flame oracle. With 250,000 GPU readback splats, 1,000,000 CPU reference samples, 128x128 bounds -8,-8,8,8, and the mixed FLAM3-style fixture, distribution score is 84.05% at frame 1, 84.10% at frame 5, 84.20% at frame 20, and 84.24% after the 60-frame/10-warmup receipt; cosine similarity stays about 0.9955. This is high distribution similarity but not learned convergence: the current reservoir path initializes splats and stochastically replaces them, without visual-error feedback or ReSTIR/MIS target correction yet.",
|
||||
"Global flame parity is not enough. View-conditioned parity now scores named viewport bounds and reports GPU/reference hits, starved reference bins, and underrepresented mass. First depth-16 GTX 1070 receipt with 250k GPU readback splats vs 1M CPU samples: global -8..8 scores 97.09%, mid -1..1 scores 91.93%, close -0.5..0.5 scores 88.97%, micro -0.25..0.25 scores 82.05% with 2,656 starved bins and 17.95% underrepresented mass. This proves the current reservoir is fast but not view-adaptive; next work needs camera-conditioned target weights and underrepresented-region feedback.",
|
||||
"Do not use the quick 1M-sample flame oracle image for visual judgment; it is too noisy. The high-reference contact sheet uses 20,000,000 CPU oracle samples and 250,000 Aquarium GPU readback splats per panel at artifacts/fractal-contact-sheet-hq/flame-parity-contact-sheet-hq.png. It makes the zoom failure legible: the CPU oracle smooths out while Aquarium remains under-sampled after zoom because the current reservoir is not view-adaptive.",
|
||||
|
|
|
|||
7
state/scratch-fractal-resolve-split.md
Normal file
7
state/scratch-fractal-resolve-split.md
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Objective: keep the shared Form reservoir while making render resolve semantics explicit.
|
||||
|
||||
Current mechanism before this slice: one D3D12FractalSplatRender pixel path drew both opaque SDF surface claims and transparent density claims. That preserved the packet stride but hid depth/blend behavior in shader conditionals.
|
||||
|
||||
Invariant after this slice: one GPU-resident splat/reservoir set can carry multiple Form encodings, but renderer pass ownership must split where output-merge semantics split. SignedDistance owns opaque depth-writing surface resolve. Density/Extinction owns transparent additive color accumulation until a real volumetric target exists.
|
||||
|
||||
Cut line: do not add a parallel transparent reservoir or CPU-side splat list to paper over pass semantics. Add targets/passes only when the invariant they protect is explicit and measured.
|
||||
Loading…
Reference in a new issue