Add medium ray step debug control

This commit is contained in:
Meta Vens 2026-05-09 03:15:31 +01:00
commit 476cf9adb0
8 changed files with 129 additions and 77 deletions

View file

@ -5,7 +5,8 @@ public readonly record struct GraphicsSettings(
float SceneExposure,
float BloomIntensity,
float BloomVeilIntensity,
float MediumCompositeIntensity)
float MediumCompositeIntensity,
int MediumDebugStep)
{
public const int MinRenderDebugMode = 0;
public const int MaxRenderDebugMode = 11;
@ -17,13 +18,16 @@ public readonly record struct GraphicsSettings(
public const float MaxBloomVeilIntensity = 0.08f;
public const float MinMediumCompositeIntensity = 0.0f;
public const float MaxMediumCompositeIntensity = 1.0f;
public const int MinMediumDebugStep = 0;
public const int MaxMediumDebugStep = 47;
public static GraphicsSettings Default { get; } = new(
RenderDebugMode: 0,
SceneExposure: 0.16f,
BloomIntensity: 0.072f,
BloomVeilIntensity: 0.014f,
MediumCompositeIntensity: 0.0f);
MediumCompositeIntensity: 0.0f,
MediumDebugStep: 12);
public GraphicsSettings Normalized()
{
@ -32,6 +36,7 @@ public readonly record struct GraphicsSettings(
Math.Clamp(SceneExposure, MinSceneExposure, MaxSceneExposure),
Math.Clamp(BloomIntensity, MinBloomIntensity, MaxBloomIntensity),
Math.Clamp(BloomVeilIntensity, MinBloomVeilIntensity, MaxBloomVeilIntensity),
Math.Clamp(MediumCompositeIntensity, MinMediumCompositeIntensity, MaxMediumCompositeIntensity));
Math.Clamp(MediumCompositeIntensity, MinMediumCompositeIntensity, MaxMediumCompositeIntensity),
Math.Clamp(MediumDebugStep, MinMediumDebugStep, MaxMediumDebugStep));
}
}

View file

@ -91,6 +91,7 @@ public sealed class AquariumCultStateStore : IDisposable
state.BloomIntensity = normalized.BloomIntensity;
state.BloomVeilIntensity = normalized.BloomVeilIntensity;
state.MediumCompositeIntensity = normalized.MediumCompositeIntensity;
state.MediumDebugStep = normalized.MediumDebugStep;
state.SaveGeneration++;
cache.AddAsync(state, new CultRecordHandle<AquariumGraphicsSettingsState>(GraphicsSettingsKey)).GetAwaiter().GetResult();
backingStore.PushAll();

View file

@ -29,6 +29,9 @@ public sealed class AquariumGraphicsSettingsState
public float MediumCompositeIntensity { get; set; } = GraphicsSettings.Default.MediumCompositeIntensity;
[Key(6)]
public int MediumDebugStep { get; set; } = GraphicsSettings.Default.MediumDebugStep;
[Key(7)]
public long SaveGeneration { get; set; }
public static AquariumGraphicsSettingsState FromSettings(GraphicsSettings settings)
@ -40,12 +43,13 @@ public sealed class AquariumGraphicsSettingsState
SceneExposure = normalized.SceneExposure,
BloomIntensity = normalized.BloomIntensity,
BloomVeilIntensity = normalized.BloomVeilIntensity,
MediumCompositeIntensity = normalized.MediumCompositeIntensity
MediumCompositeIntensity = normalized.MediumCompositeIntensity,
MediumDebugStep = normalized.MediumDebugStep
};
}
public GraphicsSettings ToSettings()
{
return new GraphicsSettings(RenderDebugMode, SceneExposure, BloomIntensity, BloomVeilIntensity, MediumCompositeIntensity).Normalized();
return new GraphicsSettings(RenderDebugMode, SceneExposure, BloomIntensity, BloomVeilIntensity, MediumCompositeIntensity, MediumDebugStep).Normalized();
}
}

View file

@ -41,9 +41,9 @@ public sealed class D3D11Renderer : IDisposable
new(6, "Field Identity"),
new(7, "Bloom"),
new(8, "Exposed Luminance"),
new(9, "Density Column"),
new(10, "Medium Transmittance"),
new(11, "Medium Source"),
new(9, "Medium Ray Density"),
new(10, "Medium Ray Transmittance"),
new(11, "Medium Atlas Density"),
];
private const float SunRadius = 1.12f;
@ -333,6 +333,9 @@ public sealed class D3D11Renderer : IDisposable
BloomIntensity,
BloomVeilIntensity,
MediumCompositeIntensity,
MediumDebugStep,
0.0f,
0.0f,
0.0f);
BuildFroxelPrimitiveTable(frame);
@ -373,6 +376,8 @@ public sealed class D3D11Renderer : IDisposable
public float MediumCompositeIntensity { get; set; } = GraphicsSettings.Default.MediumCompositeIntensity;
public int MediumDebugStep { get; set; } = GraphicsSettings.Default.MediumDebugStep;
public bool DebugUiVisible
{
get => debugUi.IsVisible;
@ -391,7 +396,7 @@ public sealed class D3D11Renderer : IDisposable
public GraphicsSettings CaptureGraphicsSettings()
{
return new GraphicsSettings(RenderDebugMode, SceneExposure, BloomIntensity, BloomVeilIntensity, MediumCompositeIntensity).Normalized();
return new GraphicsSettings(RenderDebugMode, SceneExposure, BloomIntensity, BloomVeilIntensity, MediumCompositeIntensity, MediumDebugStep).Normalized();
}
public void ApplyGraphicsSettings(GraphicsSettings settings)
@ -402,6 +407,7 @@ public sealed class D3D11Renderer : IDisposable
BloomIntensity = normalized.BloomIntensity;
BloomVeilIntensity = normalized.BloomVeilIntensity;
MediumCompositeIntensity = normalized.MediumCompositeIntensity;
MediumDebugStep = normalized.MediumDebugStep;
}
private DebugUi CreateDebugUi()
@ -416,7 +422,8 @@ public sealed class D3D11Renderer : IDisposable
.Slider("Bloom Intensity", () => BloomIntensity, value => BloomIntensity = Math.Clamp(value, GraphicsSettings.MinBloomIntensity, GraphicsSettings.MaxBloomIntensity), GraphicsSettings.MinBloomIntensity, GraphicsSettings.MaxBloomIntensity, "0.###", "Strength of pre-tonemap bloom energy.")
.Slider("Bloom Veil", () => BloomVeilIntensity, value => BloomVeilIntensity = Math.Clamp(value, GraphicsSettings.MinBloomVeilIntensity, GraphicsSettings.MaxBloomVeilIntensity), GraphicsSettings.MinBloomVeilIntensity, GraphicsSettings.MaxBloomVeilIntensity, "0.###", "Low-frequency veil from bright HDR energy.")
.Section("Medium")
.Slider("Composite", () => MediumCompositeIntensity, value => MediumCompositeIntensity = Math.Clamp(value, GraphicsSettings.MinMediumCompositeIntensity, GraphicsSettings.MaxMediumCompositeIntensity), GraphicsSettings.MinMediumCompositeIntensity, GraphicsSettings.MaxMediumCompositeIntensity, "0.###", "Blends registered medium transport into the final scene."));
.Slider("Composite", () => MediumCompositeIntensity, value => MediumCompositeIntensity = Math.Clamp(value, GraphicsSettings.MinMediumCompositeIntensity, GraphicsSettings.MaxMediumCompositeIntensity), GraphicsSettings.MinMediumCompositeIntensity, GraphicsSettings.MaxMediumCompositeIntensity, "0.###", "Blends registered medium transport into the final scene.")
.Slider("Ray Step", () => MediumDebugStep, value => MediumDebugStep = Math.Clamp(value, GraphicsSettings.MinMediumDebugStep, GraphicsSettings.MaxMediumDebugStep), GraphicsSettings.MinMediumDebugStep, GraphicsSettings.MaxMediumDebugStep, "Selects the medium raymarch sample shown by ray debug views.", () => RenderDebugMode is 9 or 10));
}
public void Dispose()
@ -1096,7 +1103,10 @@ public sealed class D3D11Renderer : IDisposable
float BloomIntensity,
float BloomVeilIntensity,
float MediumCompositeIntensity,
float Padding);
float MediumDebugStep,
float Padding0,
float Padding1,
float Padding2);
private readonly record struct FroxelCell(int X, int Y, int Z);

View file

@ -18,7 +18,8 @@ cbuffer AquariumFrame : register(b0)
float bloomIntensity;
float bloomVeilIntensity;
float mediumCompositeIntensity;
float presentationPadding;
float mediumDebugStep;
float3 presentationPadding;
};
Texture2D<float4> gridHeightTexture : register(t0);
@ -461,6 +462,43 @@ void integrateRegisteredMedium(float3 rayOrigin, float3 rayDirection, float maxT
}
}
void previewRegisteredMediumStep(float3 rayOrigin, float3 rayDirection, float maxTravel, float requestedStep, out float stepDensity, out float transmittance)
{
stepDensity = 0.0;
transmittance = 1.0;
float marchEnd = min(maxTravel, farDistance);
float stepLength = max(marchEnd / 40.0, 0.08);
int selectedStep = clamp((int)round(requestedStep), 0, 47);
float travel = stepLength * 0.5;
[loop]
for (int stepIndex = 0; stepIndex < 48; stepIndex++)
{
if (travel >= marchEnd || transmittance < 0.02)
{
break;
}
float3 p = rayOrigin + rayDirection * travel;
float3 scattering;
float density = registeredMediumDensity(p, scattering);
float extinction = density * 0.16;
if (stepIndex == selectedStep)
{
stepDensity = density;
return;
}
if (density > 0.001)
{
transmittance *= exp(-extinction * stepLength);
}
travel += stepLength;
}
}
float4 sampleMediumVolume(float2 uv)
{
return mediumVolumeTexture.SampleLevel(gridSampler, uv, 0.0);
@ -1473,39 +1511,6 @@ float3 debugFieldIdColor(float fieldId)
return float3(1.0, 0.0, 1.0);
}
float mediumDensityColumnDebug(float3 rayDirection)
{
float denominator = rayDirection.z;
if (abs(denominator) < 0.0001)
{
return 0.0;
}
float travel = (0.0 - cameraPosition.z) / denominator;
if (travel <= 0.0 || travel >= farDistance)
{
return 0.0;
}
float2 xy = (cameraPosition + rayDirection * travel).xy;
float gridMask = 1.0 - smoothstep(gridRadius * 0.98, gridRadius * 1.04, length(xy - gridCenter));
float maxDensity = 0.0;
float meanDensity = 0.0;
[loop]
for (int sampleIndex = 0; sampleIndex < 16; sampleIndex++)
{
float z = lerp(-2.25, 3.5, ((float)sampleIndex + 0.5) / 16.0);
float3 scattering;
float density = registeredMediumDensity(float3(xy, z), scattering);
maxDensity = max(maxDensity, density);
meanDensity += density;
}
meanDensity /= 16.0;
return saturate((maxDensity * 0.85 + meanDensity * 1.75) * gridMask);
}
struct SceneOut
{
float4 colorTravel : SV_Target0;
@ -1850,18 +1855,23 @@ ResolveOut AquariumResolvePS(VertexOut input)
else if (renderDebugMode >= 8.5 && renderDebugMode < 9.5)
{
float3 debugRay = rayDirectionForPixel(pixel, jitterPixels, cameraPosition, gridCenter);
float densityColumn = mediumDensityColumnDebug(debugRay);
finalColor = lerp(float3(0.006, 0.016, 0.026), float3(0.32, 0.86, 1.0), densityColumn);
float stepDensity;
float stepTransmittance;
previewRegisteredMediumStep(cameraPosition, debugRay, farDistance, mediumDebugStep, stepDensity, stepTransmittance);
float densityDebug = saturate(stepDensity * 3.0);
finalColor = lerp(float3(0.006, 0.016, 0.026), float3(0.32, 0.86, 1.0), densityDebug);
}
else if (renderDebugMode >= 9.5 && renderDebugMode < 10.5)
{
float transmittance = saturate(1.0 - currentMediumOpacity);
finalColor = lerp(float3(0.10, 0.02, 0.01), float3(0.72, 1.0, 0.86), transmittance);
float3 debugRay = rayDirectionForPixel(pixel, jitterPixels, cameraPosition, gridCenter);
float stepDensity;
float stepTransmittance;
previewRegisteredMediumStep(cameraPosition, debugRay, farDistance, mediumDebugStep, stepDensity, stepTransmittance);
finalColor = lerp(float3(0.10, 0.02, 0.01), float3(0.72, 1.0, 0.86), saturate(stepTransmittance));
}
else if (renderDebugMode >= 10.5 && renderDebugMode < 11.5)
{
float source = saturate(dot(atlasMediumInScattering, float3(0.2126, 0.7152, 0.0722)) * 18.0);
finalColor = lerp(float3(0.015, 0.015, 0.028), float3(0.95, 0.74, 0.36), source);
finalColor = lerp(float3(0.006, 0.016, 0.026), float3(0.32, 0.86, 1.0), saturate(mediumDensityMean * 6.0));
}
ResolveOut output;

View file

@ -69,7 +69,7 @@ internal sealed class DebugUi
WantsMouse = Contains(panelBounds, mousePosition);
closeButtonHovered = Contains(CloseButtonBounds(), mousePosition);
closeButtonActive = closeButtonHovered && input.LeftMouseDown;
foreach (var control in controls)
foreach (var control in controls.Where(control => control.IsVisible))
{
control.UpdateHover(mousePosition);
control.IsActive = control.Id == activeControlId && input.LeftMouseDown;
@ -83,7 +83,7 @@ internal sealed class DebugUi
if (activeSliderId is { } sliderId)
{
if (controls.FirstOrDefault(control => control.Id == sliderId) is SliderControl activeSlider)
if (controls.FirstOrDefault(control => control.IsVisible && control.Id == sliderId) is SliderControl activeSlider)
{
activeSlider.IsActive = true;
activeSlider.Drag(mousePosition);
@ -107,6 +107,11 @@ internal sealed class DebugUi
for (var index = controls.Count - 1; index >= 0; index--)
{
var control = controls[index];
if (!control.IsVisible)
{
continue;
}
if (!control.HitTest(mousePosition))
{
continue;
@ -125,7 +130,7 @@ internal sealed class DebugUi
break;
}
foreach (var control in controls)
foreach (var control in controls.Where(control => control.IsVisible))
{
if (!ReferenceEquals(control, clickedControl))
{
@ -194,7 +199,7 @@ internal sealed class DebugUi
closeBrush,
closeButtonActive ? 2.0f : 1.25f);
foreach (var control in controls)
foreach (var control in controls.Where(control => control.IsVisible))
{
control.Draw(
target,
@ -219,7 +224,7 @@ internal sealed class DebugUi
private void Layout()
{
var y = PanelTop + HeaderHeight + 10.0f;
foreach (var control in controls)
foreach (var control in controls.Where(control => control.IsVisible))
{
var height = control.LayoutHeight;
control.Bounds = RectFromEdges(PanelLeft + 10.0f, y, PanelLeft + PanelWidth - 10.0f, y + height);
@ -250,7 +255,7 @@ internal sealed class DebugUi
{
var tooltip = closeButtonHovered
? "Close panel. Press F2 to show it again."
: controls.FirstOrDefault(control => control.IsHovered)?.Tooltip;
: controls.FirstOrDefault(control => control.IsVisible && control.IsHovered)?.Tooltip;
if (string.IsNullOrWhiteSpace(tooltip))
{
return;
@ -305,46 +310,46 @@ internal sealed class DebugUi
this.controls = controls;
}
public DebugUiPanel Section(string title)
public DebugUiPanel Section(string title, Func<bool>? isVisible = null)
{
controls.Add(new SectionControl(title));
controls.Add(new SectionControl(title, isVisible));
return this;
}
public DebugUiPanel Button(string label, Action action, string? tooltip = null)
public DebugUiPanel Button(string label, Action action, string? tooltip = null, Func<bool>? isVisible = null)
{
controls.Add(new ButtonControl(label, action, tooltip));
controls.Add(new ButtonControl(label, action, tooltip, isVisible));
return this;
}
public DebugUiPanel Toggle(string label, Func<bool> read, Action<bool> write, string? tooltip = null)
public DebugUiPanel Toggle(string label, Func<bool> read, Action<bool> write, string? tooltip = null, Func<bool>? isVisible = null)
{
controls.Add(new ToggleControl(label, read, write, tooltip));
controls.Add(new ToggleControl(label, read, write, tooltip, isVisible));
return this;
}
public DebugUiPanel Slider(string label, Func<float> read, Action<float> write, float min, float max, string format = "0.###", string? tooltip = null)
public DebugUiPanel Slider(string label, Func<float> read, Action<float> write, float min, float max, string format = "0.###", string? tooltip = null, Func<bool>? isVisible = null)
{
controls.Add(new FloatSliderControl(label, read, write, min, max, format, tooltip));
controls.Add(new FloatSliderControl(label, read, write, min, max, format, tooltip, isVisible));
return this;
}
public DebugUiPanel Slider(string label, Func<int> read, Action<int> write, int min, int max, string? tooltip = null)
public DebugUiPanel Slider(string label, Func<int> read, Action<int> write, int min, int max, string? tooltip = null, Func<bool>? isVisible = null)
{
controls.Add(new IntSliderControl(label, read, write, min, max, tooltip));
controls.Add(new IntSliderControl(label, read, write, min, max, tooltip, isVisible));
return this;
}
public DebugUiPanel Options(string label, Func<int> read, Action<int> write, IReadOnlyList<DebugUiOption> options, string? tooltip = null)
public DebugUiPanel Options(string label, Func<int> read, Action<int> write, IReadOnlyList<DebugUiOption> options, string? tooltip = null, Func<bool>? isVisible = null)
{
controls.Add(new OptionControl(label, read, write, options, tooltip));
controls.Add(new OptionControl(label, read, write, options, tooltip, isVisible));
return this;
}
}
public readonly record struct DebugUiOption(int Value, string Label);
internal abstract class DebugUiControl(string label, string? tooltip = null)
internal abstract class DebugUiControl(string label, string? tooltip = null, Func<bool>? isVisible = null)
{
private static int nextId;
@ -354,6 +359,8 @@ internal sealed class DebugUi
public string? Tooltip { get; } = tooltip;
public bool IsVisible => isVisible?.Invoke() ?? true;
public Rect Bounds { get; set; }
public bool IsHovered { get; set; }
@ -421,7 +428,7 @@ internal sealed class DebugUi
}
}
private sealed class SectionControl(string label) : DebugUiControl(label)
private sealed class SectionControl(string label, Func<bool>? isVisible) : DebugUiControl(label, isVisible: isVisible)
{
public override bool IsInteractive => false;
@ -452,7 +459,7 @@ internal sealed class DebugUi
}
}
private sealed class ButtonControl(string label, Action action, string? tooltip) : DebugUiControl(label, tooltip)
private sealed class ButtonControl(string label, Action action, string? tooltip, Func<bool>? isVisible) : DebugUiControl(label, tooltip, isVisible)
{
public override void Click(Vector2 mouse) => action();
@ -478,7 +485,7 @@ internal sealed class DebugUi
}
}
private sealed class ToggleControl(string label, Func<bool> read, Action<bool> write, string? tooltip) : DebugUiControl(label, tooltip)
private sealed class ToggleControl(string label, Func<bool> read, Action<bool> write, string? tooltip, Func<bool>? isVisible) : DebugUiControl(label, tooltip, isVisible)
{
public override void Click(Vector2 mouse) => write(!read());
@ -516,7 +523,8 @@ internal sealed class DebugUi
Func<int> read,
Action<int> write,
IReadOnlyList<DebugUiOption> options,
string? tooltip) : DebugUiControl(label, tooltip)
string? tooltip,
Func<bool>? isVisible) : DebugUiControl(label, tooltip, isVisible)
{
private bool isOpen;
private int hoveredOptionIndex = -1;
@ -643,7 +651,7 @@ internal sealed class DebugUi
}
}
private abstract class SliderControl(string label, string? tooltip) : DebugUiControl(label, tooltip)
private abstract class SliderControl(string label, string? tooltip, Func<bool>? isVisible) : DebugUiControl(label, tooltip, isVisible)
{
private const float ThumbRadius = 4.0f;
private const float ThumbHitRadius = 8.0f;
@ -756,7 +764,8 @@ internal sealed class DebugUi
float min,
float max,
string format,
string? tooltip) : SliderControl(label, tooltip)
string? tooltip,
Func<bool>? isVisible) : SliderControl(label, tooltip, isVisible)
{
protected override float ReadNormalized()
{
@ -780,7 +789,8 @@ internal sealed class DebugUi
Action<int> write,
int min,
int max,
string? tooltip) : SliderControl(label, tooltip)
string? tooltip,
Func<bool>? isVisible) : SliderControl(label, tooltip, isVisible)
{
protected override float ReadNormalized()
{

View file

@ -53,3 +53,5 @@
{"area":"renderer/volumetrics","lesson":"Do not label a view-dependent transport projection as Medium Density. Mode 9 now evaluates the registered medium field on a world-anchored Grid-altitude slice, while modes 10 and 11 remain frustum transport diagnostics. Density debugging and transport debugging are different tools.","files":["src/Aquarium.Engine/Render/D3D11Renderer.cs","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","docs/hlsl-renderer.md","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx"],"ts":"2026-05-09"}
{"area":"renderer/volumetrics","lesson":"A single Grid-altitude density slice can be legitimately blank when local media live above or below the Grid. Mode 9 is now a world-anchored density column over the Grid plane, sampling a fixed z range and visualizing max/mean density. Source debug is boosted independently from physical transport so near-black source patches do not masquerade as useful diagnostics.","files":["src/Aquarium.Engine/Render/D3D11Renderer.cs","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","docs/hlsl-renderer.md","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4"],"ts":"2026-05-09"}
{"area":"dev-reload/headless","lesson":"Headless verification must wait for the Aquarium process to exit after its requested frames, not return when the process merely starts. Hidden headless windows prevent stuck smoke tests from leaving visible non-responsive windows, stdout startup checkpoints reveal where startup wedged, and shader debug loops that call the registered medium stack should stay rolled instead of forcing D3DCompiler to unroll a huge expansion.","files":["scripts/dev-reload.ps1","src/Aquarium.Engine/AquariumHost.cs","src/Aquarium.Engine/Platform/Win32Window.cs","src/Aquarium.Engine/Render/D3D11Renderer.cs","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 -HeadlessTimeoutSeconds 60","Get-Process Aquarium.Engine returned no remaining processes"],"ts":"2026-05-09"}
{"area":"renderer/volumetrics","lesson":"Do not expose a Medium Source debug mode until the renderer has a real light-injection/scattering stage. Source means in-scattered radiance, not a tinted-density placeholder. Medium debugging should first show direct camera-ray density, direct camera-ray transmittance, and atlas/pass density so missing media can be diagnosed without semantic fog.","files":["src/Aquarium.Engine/Render/D3D11Renderer.cs","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4 -HeadlessTimeoutSeconds 60"],"ts":"2026-05-09"}
{"area":"debug-ui/volumetrics","lesson":"Ray-based debug views need a visible step selector instead of more opaque modes. DebugUi controls now support conditional visibility; the persisted MediumDebugStep slider appears only for medium ray preview modes and drives shader inspection of the selected raymarch sample or cumulative transmittance to that sample.","files":["src/Aquarium.Engine.Contracts/GraphicsSettings.cs","src/Aquarium.Engine.Live/State/AquariumGraphicsSettingsState.cs","src/Aquarium.Engine.Live/State/AquariumCultStateStore.cs","src/Aquarium.Engine/Render/Ui/DebugUi.cs","src/Aquarium.Engine/Render/D3D11Renderer.cs","src/Aquarium.Engine/Render/Shaders/Aquarium.hlsl","state/scratch.md"],"verification":["dotnet build Aquarium.Engine.slnx",".\\scripts\\dev-reload.ps1 -Headless -RetainSlots 4 -HeadlessTimeoutSeconds 60"],"ts":"2026-05-09"}

View file

@ -176,3 +176,13 @@ prototype integrated along the camera ray before surface composition.
failure: the medium density-column debug loop must stay rolled because forcing
an unroll expands the registered medium density stack beyond D3DCompiler's
tolerance.
- Medium debug correction: "Medium Source" was a misleading view. In volume
rendering source should mean injected/in-scattered radiance from a real light
field, but Aquarium does not have that injection stage yet. Debug modes now
separate direct camera-ray density, direct camera-ray transmittance, and the
low-resolution atlas density diagnostic.
- Medium ray preview UI: debug controls can now be conditionally visible.
`GraphicsSettings.MediumDebugStep` persists a ray sample index. The Ray Step
slider appears only in Medium Ray Density / Medium Ray Transmittance modes;
density mode shows density at that selected sample, and transmittance mode
shows accumulated survival to that sample.