WIP pre-reboot checkpoint: Menu Settings Graphics + live VFX res/samples + SDFGI quality

This commit is contained in:
Meta Vens 2026-12-06 00:43:38 +01:00
commit c6221758e9
12 changed files with 1217 additions and 113 deletions

View file

@ -305,6 +305,31 @@ public partial class AtmosphereSystem : Node
_volumetricEffect?.SetEmitterPool(pool);
}
public void ApplyGraphicsSettings(GraphicsSettings settings)
{
ArgumentNullException.ThrowIfNull(settings);
EnsureInitialized();
_volumetricEffect?.ApplyGraphicsSettings(settings);
SdfgiSettingsConfig sdfgi = GraphicsSettings.GetSdfgiConfig(settings.SdfgiQuality);
_env.SdfgiEnabled = sdfgi.Enabled;
if (sdfgi.Enabled)
{
_env.SdfgiMinCellSize = sdfgi.MinCellSize;
_env.SdfgiCascades = sdfgi.Cascades;
}
if (RenderingServer.GetRenderingDevice() is not null)
{
RenderingServer.GISetUseHalfResolution(sdfgi.HalfResolution);
RenderingServer.EnvironmentSetSdfgiRayCount(
sdfgi.RayCount >= 8
? RenderingServer.EnvironmentSdfgiRayCount.Count8
: RenderingServer.EnvironmentSdfgiRayCount.Count4);
}
}
public override void _ExitTree()
{
if (_worldEnv is not null && GodotObject.IsInstanceValid(_worldEnv))