Use analytic Grid color for final resolve
This commit is contained in:
parent
2c13a74220
commit
2c111d40ad
6 changed files with 25 additions and 1 deletions
|
|
@ -195,6 +195,10 @@ Gate 3I reconstructs analytic Grid overlay color in the resolve pass for Grid
|
|||
pixels. Raw scene debug mode can still show stochastic hit/miss noise; final
|
||||
resolve uses the analytic current estimate plus validated history instead of
|
||||
averaging binary coverage like a tiny broken casino.
|
||||
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.
|
||||
|
||||
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,
|
||||
|
|
|
|||
|
|
@ -237,6 +237,15 @@ Current Gate 3I implementation:
|
|||
- debug mode `1` can remain noisy because it shows the raw stochastic scene;
|
||||
mode `0` should now use the analytic Grid estimate plus validated history
|
||||
|
||||
Current Gate 3J implementation:
|
||||
|
||||
- debug mode `1` is restored to raw current scene color, before Grid analytic
|
||||
reconstruction
|
||||
- Grid final color no longer blends previous color history; it uses the analytic
|
||||
current Grid estimate and writes that estimate into history
|
||||
- history/age/weight debug modes remain useful diagnostics, but stale Grid color
|
||||
history no longer drives the final visible Grid
|
||||
|
||||
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.
|
||||
|
|
|
|||
|
|
@ -1391,6 +1391,7 @@ ResolveOut AquariumResolvePS(VertexOut input)
|
|||
float2 pixel = screenUv * resolution;
|
||||
float4 current = currentSceneTexture.SampleLevel(gridSampler, input.uv, 0.0);
|
||||
float currentTravel = current.a;
|
||||
float3 rawCurrentColor = current.rgb;
|
||||
float3 currentColor = current.rgb;
|
||||
float4 currentMetadata = sampleCurrentMetadata(input.uv);
|
||||
float4 currentControl = sampleCurrentControl(input.uv);
|
||||
|
|
@ -1467,10 +1468,15 @@ ResolveOut AquariumResolvePS(VertexOut input)
|
|||
}
|
||||
|
||||
float3 resolved = lerp(currentColor, historyColor, historyWeight);
|
||||
if (currentIsGrid)
|
||||
{
|
||||
resolved = currentColor;
|
||||
}
|
||||
|
||||
float3 finalColor = aces(resolved);
|
||||
if (renderDebugMode > 0.5 && renderDebugMode < 1.5)
|
||||
{
|
||||
finalColor = aces(currentColor);
|
||||
finalColor = aces(rawCurrentColor);
|
||||
}
|
||||
else if (renderDebugMode >= 1.5 && renderDebugMode < 2.5)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,3 +30,4 @@
|
|||
{"area":"renderer/taa","lesson":"TAA Gate 3G fixes foreground glow leaking into background Grid history. Identity/control buffers are now point-loaded and field ids use exact equality, while Grid history color uses nearest identity-aligned sampling instead of bilinear color sampling. Grid max history weight was also reduced from 0.975 to 0.94 to keep linework less over-smoothed.","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 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"}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@
|
|||
"TAA identity/control buffers must be point-loaded, not linearly sampled. Field ids are identities, not colors; interpolating them at silhouettes lets foreground solids contaminate background Grid history. Grid history color should use identity-aligned nearest sampling to avoid bright foreground bleed.",
|
||||
"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.",
|
||||
"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."
|
||||
|
|
|
|||
|
|
@ -89,3 +89,6 @@ prototype integrated along the camera ray before surface composition.
|
|||
current world hit and uses premultiplied color as the current estimate. Raw
|
||||
scene debug mode may still be noisy; final no longer treats stochastic
|
||||
hit/miss color as ground truth.
|
||||
- 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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue