feat(A.5 T22.5): wire QualityPreset into renderer + streaming (commit 2/2)
GameWindow.OnLoad resolves QualitySettings.From(_persistedDisplay.Quality) + WithEnvOverrides() immediately after LoadAndApplyPersistedSettings, stores result in _resolvedQuality field. All six quality dimensions applied: - NearRadius / FarRadius: replace old T16 env-var-only block; preset drives the radii, legacy ACDREAM_STREAM_RADIUS override still honoured. - MsaaSamples: WindowOptions.Samples reads from startup quality resolution in Run() (pre-window-create read from SettingsStore). MSAA cannot change at runtime; ReapplyQualityPreset logs a restart-required warning if the new preset would change it. - AnisotropicLevel: TerrainAtlas.SetAnisotropic() called after Build() and again in ReapplyQualityPreset. Temporarily removes bindless residency before the GL TexParameter call, re-makes resident after. - AlphaToCoverage: WbDrawDispatcher.AlphaToCoverage property gates the glEnable/glDisable(SampleAlphaToCoverage) pair around the opaque pass. - MaxCompletionsPerFrame: set on StreamingController after construction and after each mid-session restart. ReapplyQualityPreset(QualityPreset) method handles mid-session changes (Settings panel Quality dropdown Save): rebuilds streamer + controller for radius changes, toggles A2C and aniso immediately, logs MSAA restart caveat. onSaveDisplay callback updated to call ReapplyQualityPreset when Quality field changes. TerrainModernRenderer.Atlas property added to expose the atlas for mid-session aniso updates. 991 tests passing, 8 pre-existing failures unchanged. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
afa4200107
commit
28d2c6018e
5 changed files with 236 additions and 16 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AcDream.UI.Abstractions.Input;
|
||||
using AcDream.UI.Abstractions.Settings;
|
||||
|
||||
namespace AcDream.UI.Abstractions.Panels.Settings;
|
||||
|
||||
|
|
@ -219,10 +220,23 @@ public sealed class SettingsPanel : IPanel
|
|||
if (renderer.Checkbox("Show FPS", ref showFps))
|
||||
_vm.SetDisplay(d with { ShowFps = showFps });
|
||||
|
||||
// A.5 T22.5: Quality preset dropdown. Drives streaming radii, MSAA,
|
||||
// anisotropic level, A2C, and max completions-per-frame as a unit.
|
||||
// Resolution + anisotropic + A2C + completions apply immediately via
|
||||
// ReapplyQualityPreset; MSAA samples require a restart (GL context
|
||||
// cannot change sample count at runtime).
|
||||
var presets = s_qualityPresetNames;
|
||||
int qIdx = (int)d.Quality;
|
||||
if (qIdx < 0 || qIdx >= presets.Length) qIdx = (int)QualityPreset.High;
|
||||
if (renderer.Combo("Quality", ref qIdx, presets))
|
||||
_vm.SetDisplay(d with { Quality = (QualityPreset)qIdx });
|
||||
|
||||
renderer.Spacing();
|
||||
renderer.TextWrapped(
|
||||
"Resolution / Fullscreen / V-Sync apply on Save. FOV + Gamma "
|
||||
+ "preview live as you drag; Cancel reverts to the saved value.");
|
||||
+ "preview live as you drag; Cancel reverts to the saved value. "
|
||||
+ "Quality preset applies streaming radius, anisotropic, and A2C "
|
||||
+ "immediately on Save; MSAA sample count requires a restart.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -446,6 +460,11 @@ public sealed class SettingsPanel : IPanel
|
|||
+ "round-trip lands.");
|
||||
}
|
||||
|
||||
// A.5 T22.5: preset label array parallel to QualityPreset enum values.
|
||||
// Order must match the enum (Low=0, Medium=1, High=2, Ultra=3).
|
||||
private static readonly string[] s_qualityPresetNames =
|
||||
{ "Low", "Medium", "High", "Ultra" };
|
||||
|
||||
private void RenderSection(IPanelRenderer renderer, string label, InputAction[] actions)
|
||||
{
|
||||
// Movement defaults open; other sections collapsed for first-run UX.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue