Disable visible temporal jitter
This commit is contained in:
parent
2c111d40ad
commit
ce4539e3c3
7 changed files with 41 additions and 5 deletions
|
|
@ -199,6 +199,12 @@ Gate 3J restores debug mode `1` to true raw scene color and stops blending
|
|||
previous Grid color history into final Grid pixels. Grid history remains a
|
||||
diagnostic/output history surface, but final Grid color comes from the analytic
|
||||
current estimate.
|
||||
Gate 3K reconstructs that final Grid estimate from an unjittered ray and
|
||||
retraces the Grid hit, so projection jitter no longer makes the final Grid swim
|
||||
now that color history is not hiding it.
|
||||
Gate 3L scales projection jitter to zero for the live frame because Self and
|
||||
planet surfaces were visibly juddering. Jitter should remain off until the
|
||||
resolve hides it on both opaque surfaces and the Grid.
|
||||
|
||||
Temporal debug modes are available in the running window: `F1` cycles modes and
|
||||
number keys `0` through `4` select them directly. Mode `0` is final resolve,
|
||||
|
|
|
|||
|
|
@ -246,6 +246,21 @@ Current Gate 3J implementation:
|
|||
- history/age/weight debug modes remain useful diagnostics, but stale Grid color
|
||||
history no longer drives the final visible Grid
|
||||
|
||||
Current Gate 3K implementation:
|
||||
|
||||
- final analytic Grid color is reconstructed from an unjittered current ray
|
||||
- the Grid surface is retraced for that unjittered ray so hit position and color
|
||||
agree
|
||||
- projection jitter can still feed temporal diagnostics/history, but it no
|
||||
longer makes the final Grid visibly swim when Grid color history is bypassed
|
||||
|
||||
Current Gate 3L implementation:
|
||||
|
||||
- projection jitter is scaled to zero for the live frame
|
||||
- visible jitter on Self/planet surfaces means the resolve is not yet hiding the
|
||||
sample offset well enough, so jitter stays disabled until opaque and Grid
|
||||
paths both prove stable
|
||||
|
||||
This is intentionally still a surface/stochastic coverage contract. It prepares
|
||||
the resolver for volumetrics without lying that a single hit depth describes a
|
||||
whole participating medium.
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ public sealed class D3D11Renderer : IDisposable
|
|||
private const string DitherTextureRelativePath = "Assets/Textures/Aetheria-LDR_LLL1_0.r8";
|
||||
private static readonly TimeSpan ShaderReloadPollInterval = TimeSpan.FromMilliseconds(250);
|
||||
private static readonly TimeSpan ShaderReloadWriteSettleTime = TimeSpan.FromMilliseconds(150);
|
||||
private const float TemporalJitterScale = 0.0f;
|
||||
private const int GridHeightTextureSize = 128;
|
||||
private const int DitherTextureSize = 512;
|
||||
private const int FroxelCountX = 8;
|
||||
|
|
@ -662,7 +663,7 @@ public sealed class D3D11Renderer : IDisposable
|
|||
|
||||
private static Vector2 HaltonJitter(int index)
|
||||
{
|
||||
return new Vector2(Halton(index & 1023, 2) - 0.5f, Halton(index & 1023, 3) - 0.5f);
|
||||
return new Vector2(Halton(index & 1023, 2) - 0.5f, Halton(index & 1023, 3) - 0.5f) * TemporalJitterScale;
|
||||
}
|
||||
|
||||
private static float Halton(int index, int radix)
|
||||
|
|
|
|||
|
|
@ -1404,10 +1404,14 @@ ResolveOut AquariumResolvePS(VertexOut input)
|
|||
|
||||
if (currentIsGrid && currentTravel <= farDistance)
|
||||
{
|
||||
float3 currentRay = rayDirectionForPixel(pixel, jitterPixels, cameraPosition, gridCenter);
|
||||
float3 worldPosition = cameraPosition + currentRay * currentTravel;
|
||||
float4 gridOverlay = shadeGridOverlay(worldPosition);
|
||||
currentColor = gridOverlay.rgb * saturate(gridOverlay.a) + float3(0.001, 0.003, 0.004);
|
||||
float3 currentRay = rayDirectionForPixel(pixel, 0.0, cameraPosition, gridCenter);
|
||||
float3 gridHitPosition;
|
||||
float gridTravel;
|
||||
if (traceGridSurface(cameraPosition, currentRay, gridHitPosition, gridTravel))
|
||||
{
|
||||
float4 gridOverlay = shadeGridOverlay(gridHitPosition);
|
||||
currentColor = gridOverlay.rgb * saturate(gridOverlay.a) + float3(0.001, 0.003, 0.004);
|
||||
}
|
||||
}
|
||||
|
||||
float historyWeight = 0.0;
|
||||
|
|
|
|||
|
|
@ -31,3 +31,5 @@
|
|||
{"area":"renderer/taa","lesson":"TAA Gate 3H fixes Grid history smoke by separating temporal support from broad overlay alpha. Grid control coverage now stores line/contour/field-line support, not field tint alpha; current support gates Grid history, broad tint no longer keeps age alive across the surface, and Grid retention is reduced to 0.90 for crisper response.","files":["docs/tsr-inspired-taa-spec.md","docs/hlsl-renderer.md","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-08"}
|
||||
{"area":"renderer/taa","lesson":"TAA Gate 3I stops using raw stochastic Grid hit/miss color as the current radiance truth. For Grid pixels the resolve reconstructs the analytic overlay at the current world hit and uses premultiplied overlay color as the current estimate; history then stabilizes the estimate instead of trying to recover alpha from binary noise alone.","files":["docs/tsr-inspired-taa-spec.md","docs/hlsl-renderer.md","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-08"}
|
||||
{"area":"renderer/taa","lesson":"TAA Gate 3J restores debug mode 1 to true raw scene color and stops final Grid pixels from blending previous color history. The current Grid renderer now uses analytic current Grid color for final output and writes that estimate into history; history age/weight/color remain diagnostics until a real transparent/volumetric composition contract needs color history again.","files":["docs/tsr-inspired-taa-spec.md","docs/hlsl-renderer.md","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-08"}
|
||||
{"area":"renderer/taa","lesson":"TAA Gate 3K prevents visible projection jitter from swimming the final Grid after Grid color history was bypassed. Final analytic Grid color is reconstructed from an unjittered current ray and a retraced Grid hit, while jitter can still feed temporal diagnostics/history.","files":["docs/tsr-inspired-taa-spec.md","docs/hlsl-renderer.md","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-08"}
|
||||
{"area":"renderer/taa","lesson":"TAA Gate 3L disables projection jitter in the live frame by scaling Halton jitter to zero. Visible judder on Self/planet surfaces means the resolver is not yet hiding sample offsets; jitter should stay disabled until opaque and Grid paths both prove stable.","files":["docs/tsr-inspired-taa-spec.md","docs/hlsl-renderer.md","src/Aquarium.Engine/Render/D3D11Renderer.cs","state/memory.json","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-08"}
|
||||
|
|
|
|||
|
|
@ -60,6 +60,8 @@
|
|||
"Grid temporal coverage must mean current line/contour/field-line support, not broad overlay alpha. Broad low-alpha tint can render, but it must not keep history age alive across the Grid surface or stale stochastic hits billow into smoke.",
|
||||
"Grid TAA must not use the raw stochastic hit/miss scene color as the current radiance truth. The resolve should reconstruct analytic Grid overlay color at the current world hit and use premultiplied color as the current estimate, then use history for stability rather than reconstructing alpha from binary noise alone.",
|
||||
"For the current Grid renderer, final Grid color should not blend previous color history. Use analytic current Grid color for the final pixel and write it into history; keep history age/weight/debug as diagnostics until a real transparent/volumetric composition contract needs color history again.",
|
||||
"When Grid final color bypasses history, reconstruct it from an unjittered current ray and retrace the Grid hit. Otherwise projection jitter becomes visible whole-frame Grid swim instead of hidden subpixel temporal sampling.",
|
||||
"Projection jitter is currently scaled to zero. If Self or planet surfaces visibly judder, the resolve is not hiding jitter and the correct live choice is no jitter until opaque and Grid paths both prove stable.",
|
||||
"Temporal debug views are live keys: F1 cycles, 0 final, 1 raw current scene, 2 reprojected history, 3 history age, 4 history weight. Use these before guessing whether TAA is sampling, validating, or presenting the wrong signal.",
|
||||
"Bruneton-style atmospheric scattering is the later sky/planet solution, not the first Grid fog pass. Use LUTs, explicit texture mappings, and unit-tested physical terms when Aquarium reaches ground-to-space atmosphere.",
|
||||
"GigaVoxels-style ray-guided sparse bricks are only for large sparse field/world storage. Do not turn early fog into a monolithic persistent volume cache."
|
||||
|
|
|
|||
|
|
@ -92,3 +92,9 @@ prototype integrated along the camera ray before surface composition.
|
|||
- Temporal Gate 3J: debug mode 1 is raw scene again. Final Grid pixels use the
|
||||
analytic current estimate directly instead of blending previous Grid color
|
||||
history; history debug surfaces remain diagnostics.
|
||||
- Temporal Gate 3K: final Grid analytic estimate uses an unjittered current ray
|
||||
and retraces the Grid hit, so jitter no longer appears as whole-frame Grid
|
||||
swim while color history is bypassed.
|
||||
- Temporal Gate 3L: projection jitter is scaled to zero because Self/planet
|
||||
surfaces visibly juddered. Keep jitter disabled until opaque and Grid resolve
|
||||
both hide the offset.
|
||||
|
|
|
|||
Loading…
Reference in a new issue