Use expected radiance for single grid events
This commit is contained in:
parent
65367f2de1
commit
73ae114878
5 changed files with 16 additions and 141 deletions
|
|
@ -23,7 +23,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
{
|
||||
private const int BackBufferCount = 2;
|
||||
private const int GridHeightTextureSize = 128;
|
||||
private const int DitherTextureSize = 512;
|
||||
private const int MediumFroxelDownscale = 8;
|
||||
private const int MediumFroxelAtlasColumns = 8;
|
||||
private const int MediumFroxelAtlasRows = 4;
|
||||
|
|
@ -39,7 +38,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
private const int BloomLevelCount = 3;
|
||||
private const float SunRadius = 1.12f;
|
||||
private const Format SceneHdrFormat = Format.R16G16B16A16_Float;
|
||||
private const string DitherTextureRelativePath = "Assets/Textures/Aetheria-LDR_LLL1_0.r8";
|
||||
private const string GridShaderRelativePath = "Render/Shaders/D3D12Grid.hlsl";
|
||||
private const string SmokeShaderRelativePath = "Render/Shaders/D3D12Smoke.hlsl";
|
||||
private const string MediumShaderRelativePath = "Render/Shaders/D3D12Medium.hlsl";
|
||||
|
|
@ -92,7 +90,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
private D3D12RenderTarget gridHeightRenderTarget;
|
||||
private D3D12RenderTarget mediumVolumeRenderTarget;
|
||||
private D3D12RenderTarget mediumTransportRenderTarget;
|
||||
private readonly ID3D12Resource ditherTexture;
|
||||
private D3D12RenderTarget sceneRenderTarget;
|
||||
private D3D12RenderTarget sceneMetadataRenderTarget;
|
||||
private D3D12RenderTarget sceneControlRenderTarget;
|
||||
|
|
@ -111,7 +108,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
private readonly D3D12StructuredBuffer fieldInstanceBuffer;
|
||||
private Int4[] froxelPrimitiveIds = [];
|
||||
private readonly FieldInstanceGpu[] fieldInstances = new FieldInstanceGpu[FieldInstanceCount];
|
||||
private readonly byte[] ditherTextureData;
|
||||
private readonly GridHeightBrushCpu[] gridHeightBrushes = new GridHeightBrushCpu[GridHeightBrushCount];
|
||||
private Viewport viewport;
|
||||
private RawRect scissorRect;
|
||||
|
|
@ -144,7 +140,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
private bool pipelineBuildInProgressReported;
|
||||
private bool initialPipelineReadyReported;
|
||||
private bool hasPresentedReadyFrame;
|
||||
private bool ditherTextureUploaded;
|
||||
private static readonly TimeSpan ShaderReloadPollInterval = TimeSpan.FromMilliseconds(250);
|
||||
private static readonly TimeSpan ShaderReloadWriteSettleTime = TimeSpan.FromMilliseconds(300);
|
||||
|
||||
|
|
@ -199,8 +194,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
gridHeightRenderTarget = CreateGridHeightRenderTarget();
|
||||
mediumVolumeRenderTarget = CreateMediumVolumeRenderTarget("medium-volume-target", "Aquarium D3D12 Medium Volume Target");
|
||||
mediumTransportRenderTarget = CreateMediumVolumeRenderTarget("medium-transport-target", "Aquarium D3D12 Medium Transport Target");
|
||||
ditherTextureData = LoadDitherTexture(Path.Combine(AppContext.BaseDirectory, DitherTextureRelativePath));
|
||||
ditherTexture = CreateDitherTexture();
|
||||
sceneRenderTarget = CreateSceneRenderTarget();
|
||||
sceneMetadataRenderTarget = CreateSceneAuxiliaryRenderTarget("scene-metadata-target", "Aquarium D3D12 Scene Metadata Target");
|
||||
sceneControlRenderTarget = CreateSceneAuxiliaryRenderTarget("scene-control-target", "Aquarium D3D12 Scene Control Target");
|
||||
|
|
@ -346,8 +339,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
fieldInstanceBuffer.CreateShaderResourceView(device, frameResources.FieldInstanceDescriptor);
|
||||
frameResources.GridHeightDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
gridHeightRenderTarget.CreateShaderResourceView(device, frameResources.GridHeightDescriptor);
|
||||
frameResources.DitherDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
CreateDitherShaderResourceView(frameResources.DitherDescriptor);
|
||||
frameResources.MediumTargetsDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
mediumVolumeRenderTarget.CreateShaderResourceView(device, frameResources.MediumTargetsDescriptor);
|
||||
frameResources.MediumTransportDescriptor = frameResources.TransientShaderDescriptors.Allocate();
|
||||
|
|
@ -398,7 +389,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
|
||||
var recordCpuStart = Stopwatch.GetTimestamp();
|
||||
commandList.BeginEvent("Aquarium D3D12 Frame");
|
||||
UploadDitherTextureIfNeeded(commandList, frameResources);
|
||||
UploadFieldResources(commandList, frameResources);
|
||||
RenderGridHeight(commandList, frameResources);
|
||||
if (ShouldRenderMediumVolume())
|
||||
|
|
@ -483,7 +473,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
fullscreenRootSignature.Dispose();
|
||||
fieldInstanceBuffer.Dispose();
|
||||
froxelPrimitiveBuffer.Dispose();
|
||||
ditherTexture.Dispose();
|
||||
DisposeBloomRenderTargets();
|
||||
DisposeHistoryRenderTargets();
|
||||
sceneRenderTarget.Dispose();
|
||||
|
|
@ -848,50 +837,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
return target;
|
||||
}
|
||||
|
||||
private ID3D12Resource CreateDitherTexture()
|
||||
{
|
||||
var resource = device.CreateCommittedResource(
|
||||
HeapType.Default,
|
||||
ResourceDescription.Texture2D(
|
||||
Format.R8_UNorm,
|
||||
DitherTextureSize,
|
||||
DitherTextureSize,
|
||||
1,
|
||||
1,
|
||||
1,
|
||||
0,
|
||||
Vortice.Direct3D12.ResourceFlags.None),
|
||||
ResourceStates.CopyDest,
|
||||
null);
|
||||
resource.Name = "Aquarium D3D12 Aetheria Blue Noise Dither Texture";
|
||||
return resource;
|
||||
}
|
||||
|
||||
private static byte[] LoadDitherTexture(string path)
|
||||
{
|
||||
var data = File.ReadAllBytes(path);
|
||||
if (data.Length != DitherTextureSize * DitherTextureSize)
|
||||
{
|
||||
throw new InvalidOperationException($"Dither texture {path} must be {DitherTextureSize}x{DitherTextureSize} R8 data.");
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
private void CreateDitherShaderResourceView(D3D12DescriptorSlot descriptor)
|
||||
{
|
||||
device.CreateShaderResourceView(
|
||||
ditherTexture,
|
||||
new ShaderResourceViewDescription
|
||||
{
|
||||
Format = Format.R8_UNorm,
|
||||
ViewDimension = Vortice.Direct3D12.ShaderResourceViewDimension.Texture2D,
|
||||
Shader4ComponentMapping = ShaderComponentMapping.Default,
|
||||
Texture2D = new Texture2DShaderResourceView { MipLevels = 1 },
|
||||
},
|
||||
descriptor.Cpu);
|
||||
}
|
||||
|
||||
private D3D12RenderTarget CreateMediumVolumeRenderTarget(string registryName, string resourceName)
|
||||
{
|
||||
var target = new D3D12RenderTarget(
|
||||
|
|
@ -934,7 +879,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
context.CommandList.SetGraphicsRootSignature(fullscreenRootSignature);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(0, frameResources.FrameConstantsDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(1, frameResources.GridHeightDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(12, frameResources.DitherDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(3, frameResources.FroxelPrimitiveDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(4, frameResources.FieldInstanceDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(5, frameResources.MediumTargetsDescriptor.Gpu);
|
||||
|
|
@ -1091,12 +1035,12 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
context.CommandList.SetGraphicsRootDescriptorTable(9, frameResources.HistoryDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(10, frameResources.HistoryMetadataDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(11, frameResources.HistoryControlDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(13, frameResources.SceneMediumPacketDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(14, frameResources.HistoryMediumPacketDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(15, frameResources.SceneEventColorDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(16, frameResources.SceneEventMetadataDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(17, frameResources.HistoryEventColorDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(18, frameResources.HistoryEventMetadataDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(12, frameResources.SceneMediumPacketDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(13, frameResources.HistoryMediumPacketDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(14, frameResources.SceneEventColorDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(15, frameResources.SceneEventMetadataDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(16, frameResources.HistoryEventColorDescriptor.Gpu);
|
||||
context.CommandList.SetGraphicsRootDescriptorTable(17, frameResources.HistoryEventMetadataDescriptor.Gpu);
|
||||
|
||||
context.CommandList.RSSetViewports(viewport);
|
||||
context.CommandList.RSSetScissorRects(scissorRect);
|
||||
|
|
@ -1134,47 +1078,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
}
|
||||
}
|
||||
|
||||
private void UploadDitherTextureIfNeeded(ID3D12GraphicsCommandList activeCommandList, FrameResources frameResources)
|
||||
{
|
||||
if (ditherTextureUploaded)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
activeCommandList.BeginEvent("Dither Texture Upload");
|
||||
try
|
||||
{
|
||||
var upload = frameResources.UploadRing.WriteArray<byte>(ditherTextureData);
|
||||
var footprint = new SubresourceFootPrint(
|
||||
Format.R8_UNorm,
|
||||
DitherTextureSize,
|
||||
DitherTextureSize,
|
||||
1,
|
||||
DitherTextureSize);
|
||||
var placedFootprint = new PlacedSubresourceFootPrint
|
||||
{
|
||||
Offset = (ulong)upload.OffsetBytes,
|
||||
Footprint = footprint,
|
||||
};
|
||||
activeCommandList.CopyTextureRegion(
|
||||
new TextureCopyLocation(ditherTexture, 0),
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
new TextureCopyLocation(frameResources.UploadRing.Resource, placedFootprint),
|
||||
null);
|
||||
activeCommandList.ResourceBarrier(ResourceBarrier.BarrierTransition(
|
||||
ditherTexture,
|
||||
ResourceStates.CopyDest,
|
||||
ResourceStates.PixelShaderResource));
|
||||
ditherTextureUploaded = true;
|
||||
}
|
||||
finally
|
||||
{
|
||||
activeCommandList.EndEvent();
|
||||
}
|
||||
}
|
||||
|
||||
private void RenderGridHeight(ID3D12GraphicsCommandList activeCommandList, FrameResources frameResources)
|
||||
{
|
||||
var viewport = new Viewport(0.0f, 0.0f, GridHeightTextureSize, GridHeightTextureSize);
|
||||
|
|
@ -1974,12 +1877,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
21,
|
||||
0,
|
||||
D3D12.DescriptorRangeOffsetAppend);
|
||||
var ditherRange = new DescriptorRange(
|
||||
DescriptorRangeType.ShaderResourceView,
|
||||
1,
|
||||
15,
|
||||
0,
|
||||
D3D12.DescriptorRangeOffsetAppend);
|
||||
var rootParameters = new[]
|
||||
{
|
||||
new RootParameter(new RootDescriptorTable([constantBufferRange]), ShaderVisibility.All),
|
||||
|
|
@ -1994,7 +1891,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
new RootParameter(new RootDescriptorTable([historyRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([historyMetadataRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([historyControlRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([ditherRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([currentMediumPacketRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([historyMediumPacketRange]), ShaderVisibility.Pixel),
|
||||
new RootParameter(new RootDescriptorTable([currentEventColorRange]), ShaderVisibility.Pixel),
|
||||
|
|
@ -2005,20 +1901,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
var staticSamplers = new[]
|
||||
{
|
||||
new StaticSamplerDescription(ShaderVisibility.Pixel, 0, 0),
|
||||
new StaticSamplerDescription(
|
||||
new Vortice.Direct3D12.SamplerDescription(
|
||||
Filter.MinMagMipPoint,
|
||||
TextureAddressMode.Wrap,
|
||||
TextureAddressMode.Wrap,
|
||||
TextureAddressMode.Wrap,
|
||||
0.0f,
|
||||
0,
|
||||
ComparisonFunction.Never,
|
||||
0.0f,
|
||||
float.MaxValue),
|
||||
ShaderVisibility.Pixel,
|
||||
1,
|
||||
0),
|
||||
};
|
||||
var description = new RootSignatureDescription(
|
||||
RootSignatureFlags.AllowInputAssemblerInputLayout,
|
||||
|
|
@ -2428,8 +2310,6 @@ public sealed class D3D12Renderer : IAquariumRenderer
|
|||
|
||||
public D3D12DescriptorSlot GridHeightDescriptor { get; set; }
|
||||
|
||||
public D3D12DescriptorSlot DitherDescriptor { get; set; }
|
||||
|
||||
public D3D12DescriptorSlot MediumTargetsDescriptor { get; set; }
|
||||
|
||||
public D3D12DescriptorSlot MediumTransportDescriptor { get; set; }
|
||||
|
|
|
|||
|
|
@ -26,9 +26,7 @@ Texture2D<float4> gridHeightTexture : register(t0);
|
|||
StructuredBuffer<int4> froxelPrimitiveIds : register(t1);
|
||||
Texture2D<float4> mediumVolumeTexture : register(t13);
|
||||
Texture2D<float4> mediumTransportTexture : register(t14);
|
||||
Texture2D<float> ditherTexture : register(t15);
|
||||
SamplerState gridSampler : register(s0);
|
||||
SamplerState ditherSampler : register(s1);
|
||||
|
||||
static const int PLANET_COUNT = 5;
|
||||
static const float SUN_RADIUS = 1.12;
|
||||
|
|
@ -53,7 +51,6 @@ static const float TERRAIN_ISOLINE_PIXEL_WIDTH = 0.54;
|
|||
static const float TERRAIN_FIELD_LINE_PIXEL_WIDTH = 0.38;
|
||||
static const float3 GRID_COLOR = float3(0.30, 0.90, 0.82);
|
||||
static const float GRID_ALPHA_SCALE = 0.56;
|
||||
static const float DITHER_TEXTURE_SIZE = 512.0;
|
||||
|
||||
struct VertexOut
|
||||
{
|
||||
|
|
@ -104,15 +101,6 @@ VertexOut FullscreenTriangleVS(uint vertexId : SV_VertexID)
|
|||
return output;
|
||||
}
|
||||
|
||||
float stochasticTransparency(float2 screenUv, float alpha)
|
||||
{
|
||||
float2 screenPixel = floor(screenUv * resolution);
|
||||
float2 frameOffset = floor(frac(frameIndex * float2(0.754877666, 0.569840296)) * DITHER_TEXTURE_SIZE);
|
||||
float2 ditherUv = (screenPixel + frameOffset + 0.5) / DITHER_TEXTURE_SIZE;
|
||||
float dither = ditherTexture.SampleLevel(ditherSampler, ditherUv, 0.0).r;
|
||||
return alpha - dither - 0.001 * (1.0 - ceil(alpha));
|
||||
}
|
||||
|
||||
void cameraBasis(float3 camera, float2 center, out float3 forward, out float3 right, out float3 up)
|
||||
{
|
||||
float3 target = float3(center, 0.0);
|
||||
|
|
@ -560,12 +548,11 @@ RayMarchResult traverseRay(float2 uv, float2 screenUv, float3 origin, float3 dir
|
|||
float mediumDensityMean = saturate(densityAccumulation / (float)MEDIUM_FROXEL_SLICE_COUNT);
|
||||
float mediumTravel = densitySum > 0.0001 ? min(densityTravelSum / densitySum, stopTravel) : farDistance + 1.0;
|
||||
|
||||
bool drawGrid = gridHit && stochasticTransparency(screenUv, gridAlpha) > 0.0;
|
||||
if (gridHit)
|
||||
{
|
||||
result.eventTravel = gridTravel;
|
||||
result.eventCoverage = gridAlpha;
|
||||
result.eventColor = drawGrid ? gridColor : 0.0;
|
||||
result.eventColor = gridColor * gridAlpha;
|
||||
}
|
||||
|
||||
if (nearestSolid.hit)
|
||||
|
|
|
|||
|
|
@ -111,3 +111,4 @@
|
|||
{"timestamp":"2026-05-09T23:45:11.0000000+01:00","topic":"d3d12-medium-temporal-lane","lesson":"Surface identity and medium identity cannot share one temporal metadata packet. A medium in front of a planet should have its own opacity, centroid travel, density, history age, and history weight even though the planet remains the hard ray terminator. D3D12 now emits a separate medium packet MRT and ping-pongs medium history beside surface history. Debug field identity can show medium where opacity exists; Grid/particles should follow with a separate stochastic-event packet rather than stealing surface or medium identity.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl","state/memory.json","state/scratch.md"]}
|
||||
{"timestamp":"2026-05-09T23:56:00.0000000+01:00","topic":"d3d12-stochastic-event-lane","lesson":"Stochastic transparent surfaces need their own temporal lane. The Grid now emits event color plus event metadata, and resolve accumulates that event history before compositing it over the surface+medium scene. Particles and billboard surfaces should join this sampled-event path rather than alpha blending or stealing surface identity.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl","state/memory.json","state/scratch.md"]}
|
||||
{"timestamp":"2026-05-10T04:52:00.0000000+01:00","topic":"d3d12-stochastic-event-retention","lesson":"A stochastic event temporal lane must retain history much more aggressively than opaque surface TAA. With a 0.92 event history cap, dither misses visibly erode low-coverage Grid lines and leave grain. Use very high validated retention for event radiance and label composite event/medium/surface debug views as lane identity rather than field identity.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Post.hlsl","src/Aquarium.Engine/Render/D3D12Renderer.cs","src/Aquarium.Engine/Render/D3D11Renderer.cs","state/scratch.md"]}
|
||||
{"timestamp":"2026-05-10T05:00:00.0000000+01:00","topic":"d3d12-event-expected-radiance","lesson":"Do not blue-noise dither a single transparent event candidate. Debug coverage/weight can look smooth while final breaks down if the event color lane still carries binary hit/miss radiance. For the current Grid-only event, write expected premultiplied radiance (`color * coverage`) and reserve blue-noise stochastic selection for a future multi-event chooser where several transparent samples compete.","files":["src/Aquarium.Engine/Render/Shaders/D3D12Scene.hlsl","src/Aquarium.Engine/Render/D3D12Renderer.cs","state/memory.json","state/scratch.md"]}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
"D3D12 Grid height must be brush-rendered, not a fullscreen per-texel loop over bodies. Use a top-down Grid-space orthographic brush pass: base field draw, then one additive up-facing quad per body into a scalar R16_Float height target. Height is one value; do not spend extra channels unless the pass contract actually gains more data. Do not use R32G32B32A32_Float for additive brush composition.",
|
||||
"D3D12 field data should live in default-heap structured buffers, updated from the per-frame upload ring by CopyBufferRegion, then bound through transient SRV descriptors owned by the consuming pass. Do not make shaders read dynamic field tables straight from upload memory. D3D11 is reference-only during migration; do not pay DRY tax to preserve it.",
|
||||
"Do not put the D3D12 Grid through transparent froxel candidate/event traversal. The one-pass transparent binning experiment made the Grid angle-dependent and brittle. The live Grid contract is direct scene tracing as a non-terminating stochastic event before the nearest solid. Grid must not write the surface packet. Medium has a separate temporal packet even when a solid is behind it; Grid/particles have a separate stochastic-event color+metadata history lane. Git holds the old experiment; runtime code should stay lean.",
|
||||
"D3D12 Grid line width normalization should match the D3D11 reference: use periodic line domains with `fwidth()` and pixel-width constants, not world-space `ddx/ddy(p.xy)` footprint guesses. D3D12 binds Aetheria's 512x512 R8 blue-noise texture at `t15` with point/wrap sampling at `s1` for stochastic coverage. Animate it by shifting the blue-noise tile per frame with a low-discrepancy pixel offset, not by giving all pixels the same threshold.",
|
||||
"D3D12 Grid line width normalization should match the D3D11 reference: use periodic line domains with `fwidth()` and pixel-width constants, not world-space `ddx/ddy(p.xy)` footprint guesses. For a single Grid event, emit expected premultiplied event radiance from analytic coverage; do not blue-noise dither one sample into visible grain. Blue-noise stochastic selection belongs in the future multi-event chooser when several transparent samples compete for one ray/pixel.",
|
||||
"D3D12 solid scene candidate discovery belongs in the view-froxel volume. At 720p the active tube is 160x90x32; primitive ids are indexed by low-res screen cell and depth slice, then scene rays test exact solid intersections inside that slice interval. The CPU-filled view-froxel buffers are bootstrap only; the durable path should become GPU/raster binning so per-frame upload bandwidth does not become the next stupid tax.",
|
||||
"D3D12 pixel shader UAV registers share the output namespace. If a shader writes SV_Target0, bind the first manual UAV at u1, not u0.",
|
||||
"D3D12 shader routing derives its editable source directory from --shader-source/AQUARIUM_SHADER_SOURCE, then watches D3D12Grid/Medium/Scene/Post/Smoke HLSL files directly. Shader/PSO builds run on a background task. During initial startup, D3D12 should not touch or present the swapchain until the first pipeline set is ready; the host keeps repainting the Win32 splash instead. This can flicker slightly, but it avoids black loading frames and stale DirectWrite loading text in live backbuffers. Hot reload keeps the previous pipeline set if compilation fails.",
|
||||
|
|
|
|||
|
|
@ -57,6 +57,13 @@ reusing field identity/travel/control.
|
|||
lines, leaving grain. Current D3D12 event lane uses 0.985 max retention with a
|
||||
stronger fresh-history floor. Debug mode 6 is named Lane Identity because it
|
||||
shows the winning diagnostic lane, not only the hard surface field id.
|
||||
- Event radiance correction: Grid is currently the only event candidate on its
|
||||
ray, so the event lane should emit expected premultiplied radiance
|
||||
(`color * coverage`) instead of a blue-noise hit/miss sample. Stochastic
|
||||
selection belongs at the future multi-event chooser, where several transparent
|
||||
samples compete and one representative event is selected for the temporal
|
||||
lane. D3D12 no longer binds/uploads the blue-noise texture until that chooser
|
||||
exists.
|
||||
|
||||
## Hot Context
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue