Benchmark authored GPU fractal program receipts
This commit is contained in:
parent
6d56b95619
commit
67816530cd
8 changed files with 77 additions and 12 deletions
|
|
@ -5,6 +5,7 @@ param(
|
|||
[int]$Depth = 8,
|
||||
[int]$Candidates = 2,
|
||||
[int]$ReservoirUpdates = 50000,
|
||||
[int]$ProgramTransforms = 0,
|
||||
[int]$ReadbackSplats = 64
|
||||
)
|
||||
|
||||
|
|
@ -17,4 +18,5 @@ dotnet run --project (Join-Path $repoRoot "tools\Aquarium.Fractal.Receipt\Aquari
|
|||
--depth $Depth `
|
||||
--candidates $Candidates `
|
||||
--reservoir-updates $ReservoirUpdates `
|
||||
--program-transforms $ProgramTransforms `
|
||||
--readback-splats $ReadbackSplats
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ public readonly record struct AquariumPackedFractalIfsTransform(
|
|||
Vector4 OffsetScaleAmplitude,
|
||||
Vector4 RadiiRotationFalloff,
|
||||
Vector4 MaterialSeedShape,
|
||||
Vector4 Domain);
|
||||
Vector4 RotationDomain);
|
||||
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
public readonly record struct AquariumPackedSdfEnvelopeReservoir(
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ public static class FractalGpuProgramCompiler
|
|||
new Vector4(claim.Center, radius, claim.Amplitude),
|
||||
new Vector4(claim.Radii, claim.RotationRadians, claim.Falloff),
|
||||
new Vector4(material, claim.Seed, claim.ShapePower, (float)claim.PayloadKind),
|
||||
domain);
|
||||
new Vector4(MathF.Cos(claim.RotationRadians), MathF.Sin(claim.RotationRadians), domain.X, domain.Y));
|
||||
}
|
||||
|
||||
private static float StableUnit(string tags, int seed)
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ struct FractalIfsTransform
|
|||
float4 offsetScaleAmplitude;
|
||||
float4 radiiRotationFalloff;
|
||||
float4 materialSeedShape;
|
||||
float4 domain;
|
||||
float4 rotationDomain;
|
||||
};
|
||||
|
||||
cbuffer ReceiptConstants : register(b0)
|
||||
|
|
@ -87,9 +87,8 @@ float3 FractalPoint(uint index, out float radius)
|
|||
{
|
||||
uint transformIndex = Hash(n + depth * 747796405u) % ProgramTransformCount;
|
||||
FractalIfsTransform transform = ProgramTransforms[transformIndex];
|
||||
float angle = transform.radiiRotationFalloff.z;
|
||||
float c = cos(angle);
|
||||
float s = sin(angle);
|
||||
float c = transform.rotationDomain.x;
|
||||
float s = transform.rotationDomain.y;
|
||||
float2 rotated = float2((p.x * c) - (p.y * s), (p.x * s) + (p.y * c));
|
||||
float childScale = saturate(transform.offsetScaleAmplitude.z);
|
||||
p = rotated * max(childScale, 0.01) + transform.offsetScaleAmplitude.xy;
|
||||
|
|
|
|||
|
|
@ -183,3 +183,4 @@
|
|||
{"timestamp":"2026-05-20T02:08:12+01:00","topic":"visible-fractal-splat-consumption","lesson":"The first visible GPU-resident fractal consumption path is now a capped debug draw, not a CPU readback. `D3D12FractalSplatRender.hlsl` reads the computed `AquariumPackedFractalSdfSplat3D` buffer as an SRV and draws up to 131,072 splat instances into the scene. This proves the renderer can consume the compute-populated splat buffer directly; final terrain, material, and radiosity integration still need domain-correct shading over the same buffers. A Zyphos shader compile bug also surfaced here: `line` was treated as an HLSL token, so the planet debug variable is now `gridLine`.","files":["src/Aquarium.Engine/Render/Shaders/D3D12FractalSplatRender.hlsl","src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine.Contracts/Render/AquariumApp.cs","src/Aquarium.Engine.Contracts/Render/AquariumRenderPlan.cs","src/Aquarium.Zyphos/Shaders/D3D12ZyphosPlanet.hlsl","state/map.yaml"],"source":"continued Perfect Machine build: make the GPU-resident fractal splat buffer visible in the renderer"}
|
||||
{"timestamp":"2026-05-20T07:47:00+01:00","topic":"layered-fractal-reservoir-consumption","lesson":"The visible fractal splat draw must consume the same independent reservoir layers produced by compute. Reusing the temporal Gaussian descriptor slot for raw splats hid the SDF/PBR/radiosity contract. The renderer now binds raw splats plus SDF envelope, PBR material, and radiosity reservoirs as separate graphics SRVs; the debug draw uses SDF reservoirs for support, PBR reservoirs for color, radiosity reservoirs for energy, and writes per-layer confidence into the reservoir guide MRT. This is still a capped debug view, but it proves the three-layer reservoir machine reaches visible pixels without CPU readback or buffer collapse.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12FractalSplatRender.hlsl","state/map.yaml","state/memory.json"],"source":"user insisted SDF splats, PBR splats, and radiosity splats are different sampled types and the Perfect Machine must not flatten them"}
|
||||
{"timestamp":"2026-05-20T08:04:00+01:00","topic":"authored-ifs-program-gpu-splat-population","lesson":"The GPU splat producer now has a compact authored-program path. `FractalGpuProgramCompiler` lowers selected `.aquageo` claims into `AquariumPackedFractalIfsTransform` rows, Zyphos passes those rows through `AquariumFractalReservoirField.ProgramTransforms`, and D3D12 uploads them as a small compute SRV before dispatch. `D3D12FractalReservoirCompute.hlsl` uses those transforms when present and keeps the old hash fractal only as fallback/receipt mode. This keeps million-splat population GPU-resident while making the source fractal structure come from the DSL instead of private shader folklore.","files":["src/Aquarium.Engine.Contracts/Fractal/AquariumFractalContracts.cs","src/Aquarium.Engine.Contracts/Render/AquariumRenderPlan.cs","src/Aquarium.Engine.Fractal/Lod/FractalGpuProgramCompiler.cs","src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl","src/Aquarium.Zyphos/ZyphosFractalTerrain.cs","src/Aquarium.Zyphos/ZyphosSceneBuilder.cs","tests/Aquarium.Engine.Fractal.Tests/FractalGpuProgramCompilerTests.cs"],"source":"continued Perfect Machine build: replace hardcoded GPU splat generation with a DSL-driven program seam"}
|
||||
{"timestamp":"2026-05-20T08:16:00+01:00","topic":"authored-ifs-program-gpu-receipt","lesson":"The receipt harness now has a nonzero authored-program mode via `-ProgramTransforms`. On the GTX 1070, 2,000,000 splats plus 2,000,000 SDF, PBR, and radiosity reservoirs per layer with 4 IFS transforms, depth 1, 20,000 stochastic updates per reservoir layer, and 2 candidates/update measured 4.438 ms/frame, 225.3 FPS equivalent, with full reservoir coverage in 100 frames. Depth 2 and 4 are below the hundreds-FPS bar at this budget, so deeper authored IFS generation needs a better shader strategy or adaptive depth/cut scheduling instead of pretending the simple receipt covers all fractal detail depths.","files":["tools/Aquarium.Fractal.Receipt/Program.cs","scripts/fractal-splat-receipt.ps1","src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl","state/map.yaml","state/memory.json"],"source":"user demanded a receipt showing millions of splats populating a simple fractal at hundreds of FPS"}
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ renderer_state:
|
|||
- Fractal resource planning is explicit: one plan coordinates CPU contribution updates, GPU selected-cut estimated cost, RAM resident payload budget, and SSD request pressure before backend packet compilation. This same budget language should generalize to Mimir-style sensor fusion because both fractal SDF probes and camera/microphone feature detections accumulate confidence-weighted spatial samples into temporal reservoirs.
|
||||
- Fractal residency uses score-per-cost retention under RAM pressure and emits evicted node keys as planner output; real storage mutation waits for a page/payload store boundary.
|
||||
- Compact 3D SDF splats now have a stable fractal contract and CPU compiler/kernel: structural FractalProbeSample evidence can lower into AquariumFractalSdfSplat3D packets with compact shaped support before GPU rendering exists.
|
||||
- Hot fractal splats and their temporal cache layers must be GPU-resident packed buffers. AquariumPackedFractalSdfSplat3D is the 80-byte numeric splat packet; the SDF envelope, PBR material, and radiosity reservoir packets are distinct 64-byte UAV rows sampled in independent compute passes. tools/Aquarium.Fractal.Receipt proves a D3D12 compute path can keep 2,000,000 splats and 2,000,000 reservoirs per layer resident on the GTX 1070, update 50,000 entries per reservoir layer per frame with 2 candidates/update, and run at 4.471 ms/frame, 223.7 FPS equivalent, with only tiny checksum readback. The receipt now compiles the shared engine shader asset src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl instead of carrying private embedded shader text.
|
||||
- Hot fractal splats and their temporal cache layers must be GPU-resident packed buffers. AquariumPackedFractalSdfSplat3D is the 80-byte numeric splat packet; the SDF envelope, PBR material, and radiosity reservoir packets are distinct 64-byte UAV rows sampled in independent compute passes. tools/Aquarium.Fractal.Receipt proves a D3D12 compute path can keep 2,000,000 splats and 2,000,000 reservoirs per layer resident on the GTX 1070. The fallback hash-fractal receipt updates 50,000 entries per reservoir layer per frame with 2 candidates/update and runs at 4.471 ms/frame, 223.7 FPS equivalent. The authored IFS-program receipt binds 4 compact transforms, updates 20,000 entries per reservoir layer per frame, and runs at 4.438 ms/frame, 225.3 FPS equivalent, with full reservoir coverage in 100 frames. Both receipts use only tiny checksum readback and compile the shared engine shader asset src/Aquarium.Engine/Render/Shaders/D3D12FractalReservoirCompute.hlsl.
|
||||
- 2D-projected-to-3D splats have a pure compiler seam: FractalProjectedSdfSplatCompiler maps resident SignedDistance2D page payload samples through an explicit page-to-world function and normal into bounded AquariumFractalSdfSplat3D packets.
|
||||
- AquariumSceneState now carries AquariumFractalReservoirField as the narrow client-to-renderer request for GPU-resident fractal reservoirs: resident splat count, IFS depth/seed, candidates per reservoir update, and stochastic updates per pass. This is a budgeted GPU field request, not a CPU splat list.
|
||||
- D3D12Renderer owns the first live fractal reservoir compute hook: a separate root signature, four compute pipelines from D3D12FractalReservoirCompute.hlsl, lazy UAV buffers for splats/SDF/PBR/radiosity reservoirs, a UAV barrier after splat population, and per-frame dispatch when AquariumFractalReservoirField is present. Zyphos requests the 2M-splat, 50k-updates/pass field by default.
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@
|
|||
"AquariumFractalSdfSplat3D is the compact 3D SDF splat packet contract for Phase F. FractalSdfSplat3DCompiler lowers FractalProbeSample evidence into stable domain/node/payload-keyed splats, and FractalSdfSplat3DKernel owns CPU compact-weight/signed-distance parity math. Zyphos exposes a first structural splat from its probe reservoir before D3D12 lowering.",
|
||||
"Hot fractal splat storage must be GPU-resident packed buffers manipulated by compute shaders. Stable string-keyed splat contracts are metadata/debug boundaries, not million-instance hot buffers. `AquariumPackedFractalSdfSplat3D` is the numeric 80-byte packet shape; C# staging/readback paths use unsafe `FractalNativeBuffer<T>` when CPU memory is genuinely needed.",
|
||||
"Fractal reservoir compute can now take a compact authored IFS program. `FractalGpuProgramCompiler` lowers selected `.aquageo` brush claims into `AquariumPackedFractalIfsTransform` rows; Zyphos passes those rows through `AquariumFractalReservoirField.ProgramTransforms`; D3D12 uploads the small program as a compute SRV. The hash fractal remains a fallback/receipt mode, not the only live generator.",
|
||||
"The GPU splat receipt harness lives at tools/Aquarium.Fractal.Receipt and scripts/fractal-splat-receipt.ps1. The live receipt allocates one 80-byte packed SDF splat UAV plus three distinct 64-byte reservoir UAVs for SDF envelopes, PBR material envelopes, and radiosity; those reservoirs are sampled in independent compute passes under a stochastic update budget. On the local NVIDIA GTX 1070 it kept 2,000,000 splats and 2,000,000 reservoirs per layer resident, updated 50,000 entries per reservoir layer per frame with 2 candidates/update, and measured 4.471 ms/frame, 223.7 FPS equivalent over 120 frames. D3D12FractalSplatRender now consumes the raw splat, SDF, PBR, and radiosity buffers through separate graphics SRVs for the visible debug subset. This proves compute-side GPU residency, budgeted temporal convergence, and first layered GPU consumption; final terrain/material/radiosity shading is still future work.",
|
||||
"The GPU splat receipt harness lives at tools/Aquarium.Fractal.Receipt and scripts/fractal-splat-receipt.ps1. The live receipt allocates one 80-byte packed SDF splat UAV plus three distinct 64-byte reservoir UAVs for SDF envelopes, PBR material envelopes, and radiosity; those reservoirs are sampled in independent compute passes under a stochastic update budget. On the local NVIDIA GTX 1070 it kept 2,000,000 splats and 2,000,000 reservoirs per layer resident. The fallback hash-fractal receipt updated 50,000 entries per layer with 2 candidates/update at 4.471 ms/frame, 223.7 FPS equivalent. The authored IFS-program receipt used 4 compact transforms and 20,000 updates per layer at 4.438 ms/frame, 225.3 FPS equivalent, with full reservoir coverage in 100 frames. D3D12FractalSplatRender consumes the raw splat, SDF, PBR, and radiosity buffers through separate graphics SRVs for the visible debug subset. This proves compute-side GPU residency, budgeted temporal convergence, authored-program splat population, and first layered GPU consumption; final terrain/material/radiosity shading is still future work.",
|
||||
"FractalProjectedSdfSplatCompiler is the Phase G 2D-projected-to-3D lowering seam: it converts resident SignedDistance2D page payload samples into compact 3D SDF splats through an explicit page-local Vector2 -> Vector3 mapping, surface normal, support radius, and splat budget. Zyphos caches a bounded first set with a flat local mapping until cube-sphere/torus mappers are added.",
|
||||
"Zyphos camera distance limits belong to the selected spatial domain, not one global planetary clamp. Leaf/pebble domains must be able to zoom below whole-body distances, and the parent star must be a visible SDF body when it is also the primary light source.",
|
||||
"The consolidated fractal brush architecture lives in research/rendering/fractal-brush-architecture-plan.md. Its pipeline is client intent -> domain roots -> semantic IFS brush grammar -> ownership tree -> node summaries -> contribution cache/residency scheduler -> backend packets -> renderer passes -> debug/evidence. Its credibility depends on module boundaries and tests: contracts, pure CPU fractal core, D3D12 backend, client adapters, mock payload/probe/random/clock seams, shader parity tests, and deterministic performance fixtures.",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System.Diagnostics;
|
||||
using System.Numerics;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text.Json;
|
||||
using Aquarium.Engine.Fractal;
|
||||
|
|
@ -23,6 +24,7 @@ Console.WriteLine($"splats: {receipt.SplatCount:N0}");
|
|||
Console.WriteLine($"sdf reservoirs: {receipt.SdfReservoirCount:N0}");
|
||||
Console.WriteLine($"pbr reservoirs: {receipt.PbrReservoirCount:N0}");
|
||||
Console.WriteLine($"radiosity reservoirs: {receipt.RadiosityReservoirCount:N0}");
|
||||
Console.WriteLine($"ifs program transforms: {receipt.ProgramTransformCount:N0}");
|
||||
Console.WriteLine($"candidates/pass: {receipt.CandidatesPerPass}");
|
||||
Console.WriteLine($"reservoir updates/pass/frame: {receipt.ReservoirUpdatesPerPass:N0}");
|
||||
Console.WriteLine($"reservoir full-coverage frames: {receipt.ReservoirFullCoverageFrames:0.0}");
|
||||
|
|
@ -89,6 +91,7 @@ internal sealed class GpuFractalSplatReceiptRunner : IDisposable
|
|||
using var sdfReservoirs = CreateUavBuffer(reservoirBytes, "Aquarium Fractal Receipt SDF Reservoir Buffer");
|
||||
using var pbrReservoirs = CreateUavBuffer(reservoirBytes, "Aquarium Fractal Receipt PBR Reservoir Buffer");
|
||||
using var radiosityReservoirs = CreateUavBuffer(reservoirBytes, "Aquarium Fractal Receipt Radiosity Reservoir Buffer");
|
||||
using var programTransforms = CreateProgramTransformBuffer(options);
|
||||
|
||||
var readbackSplatBytes = (ulong)Math.Min(options.ReadbackSplats, options.SplatCount) * (ulong)splatStride;
|
||||
var readbackReservoirBytes = (ulong)Math.Min(options.ReadbackSplats, options.SplatCount) * (ulong)reservoirStride;
|
||||
|
|
@ -112,7 +115,7 @@ internal sealed class GpuFractalSplatReceiptRunner : IDisposable
|
|||
commandList.SetComputeRootUnorderedAccessView(2, sdfReservoirs.GPUVirtualAddress);
|
||||
commandList.SetComputeRootUnorderedAccessView(3, pbrReservoirs.GPUVirtualAddress);
|
||||
commandList.SetComputeRootUnorderedAccessView(4, radiosityReservoirs.GPUVirtualAddress);
|
||||
commandList.SetComputeRootShaderResourceView(5, splats.GPUVirtualAddress);
|
||||
commandList.SetComputeRootShaderResourceView(5, programTransforms.GPUVirtualAddress);
|
||||
commandList.EndQuery(queryHeap, QueryType.Timestamp, 0);
|
||||
Dispatch(splatPipelineState, options.SplatCount);
|
||||
commandList.ResourceBarrier(ResourceBarrier.BarrierUnorderedAccessView(splats));
|
||||
|
|
@ -159,6 +162,7 @@ internal sealed class GpuFractalSplatReceiptRunner : IDisposable
|
|||
options.SplatCount,
|
||||
options.SplatCount,
|
||||
options.SplatCount,
|
||||
options.ProgramTransformCount,
|
||||
options.CandidatesPerPass,
|
||||
options.ReservoirUpdatesPerPass,
|
||||
framePlan.Passes[0].ExpectedFullCoverageFrames,
|
||||
|
|
@ -202,6 +206,61 @@ internal sealed class GpuFractalSplatReceiptRunner : IDisposable
|
|||
return resource;
|
||||
}
|
||||
|
||||
private ID3D12Resource CreateProgramTransformBuffer(ReceiptOptions options)
|
||||
{
|
||||
var transforms = BuildReceiptProgram(options.ProgramTransformCount);
|
||||
var stride = Marshal.SizeOf<AquariumPackedFractalIfsTransform>();
|
||||
var bytes = (ulong)(Math.Max(transforms.Length, 1) * stride);
|
||||
var upload = device.CreateCommittedResource(HeapType.Upload, ResourceDescription.Buffer(bytes), ResourceStates.GenericRead, null);
|
||||
upload.Name = "Aquarium Fractal Receipt IFS Program Upload Buffer";
|
||||
unsafe
|
||||
{
|
||||
var target = (AquariumPackedFractalIfsTransform*)upload.Map<byte>(0);
|
||||
for (var index = 0; index < transforms.Length; index++)
|
||||
{
|
||||
target[index] = transforms[index];
|
||||
}
|
||||
|
||||
upload.Unmap(0);
|
||||
}
|
||||
|
||||
var resource = device.CreateCommittedResource(HeapType.Default, ResourceDescription.Buffer(bytes), ResourceStates.CopyDest, null);
|
||||
resource.Name = "Aquarium Fractal Receipt IFS Program Buffer";
|
||||
allocator.Reset();
|
||||
commandList.Reset(allocator, null);
|
||||
commandList.CopyBufferRegion(resource, 0, upload, 0, bytes);
|
||||
commandList.ResourceBarrier(ResourceBarrier.BarrierTransition(resource, ResourceStates.CopyDest, ResourceStates.NonPixelShaderResource));
|
||||
commandList.Close();
|
||||
queue.ExecuteCommandList(commandList);
|
||||
WaitForGpu();
|
||||
upload.Dispose();
|
||||
return resource;
|
||||
}
|
||||
|
||||
private static AquariumPackedFractalIfsTransform[] BuildReceiptProgram(int transformCount)
|
||||
{
|
||||
if (transformCount <= 0)
|
||||
{
|
||||
return [default];
|
||||
}
|
||||
|
||||
var transforms = new AquariumPackedFractalIfsTransform[transformCount];
|
||||
for (var index = 0; index < transforms.Length; index++)
|
||||
{
|
||||
var phase = MathF.Tau * index / Math.Max(transformCount, 1);
|
||||
var branch = new Vector2(MathF.Cos(phase), MathF.Sin(phase));
|
||||
var radius = 0.32f + (index % 5) * 0.035f;
|
||||
var scale = 0.46f + (index % 3) * 0.035f;
|
||||
transforms[index] = new AquariumPackedFractalIfsTransform(
|
||||
new Vector4(branch * 0.42f, scale, 0.18f + index * 0.013f),
|
||||
new Vector4(radius, radius * 0.62f, phase * 0.37f, 4.0f),
|
||||
new Vector4((index + 1.0f) / (transformCount + 1.0f), index * 31 + 7, 0.85f, 0.0f),
|
||||
new Vector4(MathF.Cos(phase * 0.37f), MathF.Sin(phase * 0.37f), index, transformCount));
|
||||
}
|
||||
|
||||
return transforms;
|
||||
}
|
||||
|
||||
private void BindConstants(ReceiptOptions options, int frame)
|
||||
{
|
||||
commandList.SetComputeRoot32BitConstant(0, (uint)options.SplatCount, 0);
|
||||
|
|
@ -210,7 +269,7 @@ internal sealed class GpuFractalSplatReceiptRunner : IDisposable
|
|||
commandList.SetComputeRoot32BitConstant(0, options.Seed, 3);
|
||||
commandList.SetComputeRoot32BitConstant(0, (uint)options.CandidatesPerPass, 4);
|
||||
commandList.SetComputeRoot32BitConstant(0, (uint)options.ReservoirUpdatesPerPass, 5);
|
||||
commandList.SetComputeRoot32BitConstant(0, 0u, 6);
|
||||
commandList.SetComputeRoot32BitConstant(0, (uint)options.ProgramTransformCount, 6);
|
||||
commandList.SetComputeRoot32BitConstant(0, 0u, 7);
|
||||
}
|
||||
|
||||
|
|
@ -304,6 +363,7 @@ internal sealed record ReceiptOptions(
|
|||
uint Seed,
|
||||
int CandidatesPerPass,
|
||||
int ReservoirUpdatesPerPass,
|
||||
int ProgramTransformCount,
|
||||
int ReadbackSplats,
|
||||
string ShaderPath,
|
||||
string OutputDirectory)
|
||||
|
|
@ -318,6 +378,7 @@ internal sealed record ReceiptOptions(
|
|||
0xA17EA11u,
|
||||
2,
|
||||
50_000,
|
||||
0,
|
||||
64,
|
||||
Path.Combine("src", "Aquarium.Engine", "Render", "Shaders", "D3D12FractalReservoirCompute.hlsl"),
|
||||
Path.Combine("artifacts", "fractal-splat-receipts"));
|
||||
|
|
@ -334,6 +395,7 @@ internal sealed record ReceiptOptions(
|
|||
"--seed" => options with { Seed = Convert.ToUInt32(Next(), 0) },
|
||||
"--candidates" => options with { CandidatesPerPass = int.Parse(Next()) },
|
||||
"--reservoir-updates" => options with { ReservoirUpdatesPerPass = int.Parse(Next()) },
|
||||
"--program-transforms" => options with { ProgramTransformCount = int.Parse(Next()) },
|
||||
"--readback-splats" => options with { ReadbackSplats = int.Parse(Next()) },
|
||||
"--shader" => options with { ShaderPath = Next() },
|
||||
"--out" => options with { OutputDirectory = Next() },
|
||||
|
|
@ -346,9 +408,9 @@ internal sealed record ReceiptOptions(
|
|||
throw new FileNotFoundException("Receipt shader file was not found.", options.ShaderPath);
|
||||
}
|
||||
|
||||
if (options.SplatCount <= 0 || options.WarmupFrames < 0 || options.MeasuredFrames <= 0 || options.Depth <= 0 || options.CandidatesPerPass <= 0 || options.ReservoirUpdatesPerPass <= 0 || options.ReservoirUpdatesPerPass > options.SplatCount || options.ReadbackSplats < 0)
|
||||
if (options.SplatCount <= 0 || options.WarmupFrames < 0 || options.MeasuredFrames <= 0 || options.Depth <= 0 || options.CandidatesPerPass <= 0 || options.ReservoirUpdatesPerPass <= 0 || options.ReservoirUpdatesPerPass > options.SplatCount || options.ProgramTransformCount < 0 || options.ReadbackSplats < 0)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(args), "Splats, frames, depth, candidates, and reservoir updates must be positive; reservoir updates must not exceed splats; warmup/readback must not be negative.");
|
||||
throw new ArgumentOutOfRangeException(nameof(args), "Splats, frames, depth, candidates, and reservoir updates must be positive; reservoir updates must not exceed splats; program transforms, warmup, and readback must not be negative.");
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
|
@ -360,6 +422,7 @@ internal sealed record GpuFractalSplatReceipt(
|
|||
int SdfReservoirCount,
|
||||
int PbrReservoirCount,
|
||||
int RadiosityReservoirCount,
|
||||
int ProgramTransformCount,
|
||||
int CandidatesPerPass,
|
||||
int ReservoirUpdatesPerPass,
|
||||
double ReservoirFullCoverageFrames,
|
||||
|
|
|
|||
Loading…
Reference in a new issue