Add the optional Forward+ desktop HQ build
Package a Forward+ preset with volumetric fog, SDFGI and a volumetric flashlight for a separate Linux/Windows Desktop HQ zip. Gate the effects on a real RenderingDevice, tune LATE fog, and adapt local light falloff for Godot 4.7. Record the Compatibility/Forward+ A/B captures and metrics, add the artifact to the build/publish scripts, and keep the default Compatibility/Web path unchanged. Headless 231/231, Python 87/87; exported HQ binary boots with Vulkan.
This commit is contained in:
1 parent
64f0c6a198
commit
28f2a48811
23 files changed
+337
-46
No files matched your search
+34
-1
@@ -152,9 +152,24 @@ static func window_pane() -> StandardMaterial3D:
|
||||
mat.emission_energy_multiplier = 0.0
|
||||
return mat
|
||||
|
||||
## Godot 4.7 changed the Compatibility light falloff in practice: the same
|
||||
## attenuation/range that read well on 4.3 leaves the night scene nearly black.
|
||||
## Use this switch for local lights until the project moves its baseline to 4.7.
|
||||
static func modern_light_falloff() -> bool:
|
||||
var info := Engine.get_version_info()
|
||||
return int(info.get("major", 4)) > 4 \
|
||||
or (int(info.get("major", 4)) == 4 and int(info.get("minor", 0)) >= 7)
|
||||
|
||||
## True only when a real RenderingDevice exists. The Compatibility renderer and
|
||||
## the headless dummy renderer return null, so the desktop-only effects can be
|
||||
## gated without Web/CI builds ever enabling them.
|
||||
static func forward_plus_active() -> bool:
|
||||
return RenderingServer.get_rendering_device() != null
|
||||
|
||||
## Environment look shared by every phase: ACES tonemapping, soft glow, aerial
|
||||
## fog for depth, and a mild contrast/saturation lift. Phase values come from
|
||||
## `GameManager.PHASE_LIGHTING`.
|
||||
## `GameManager.PHASE_LIGHTING`. Volumetric fog and SDFGI are only enabled when
|
||||
## Forward+ is actually available (the optional desktop preset).
|
||||
static func configure_environment(env: Environment, cfg: Dictionary) -> void:
|
||||
if env == null:
|
||||
return
|
||||
@@ -180,6 +195,24 @@ static func configure_environment(env: Environment, cfg: Dictionary) -> void:
|
||||
env.fog_density = float(cfg.get("fog_density", 0.0035))
|
||||
env.fog_aerial_perspective = 0.25
|
||||
env.fog_sky_affect = 0.4
|
||||
var advanced := forward_plus_active()
|
||||
env.volumetric_fog_enabled = advanced
|
||||
env.sdfgi_enabled = advanced
|
||||
if advanced:
|
||||
# Desktop HQ: a shallow, cool fog gives the torch a visible shaft while
|
||||
# keeping the entrance facade readable. Phase values are tuned per phase.
|
||||
env.volumetric_fog_density = float(cfg.get("volumetric_density", 0.012))
|
||||
env.volumetric_fog_albedo = cfg.get("volumetric_albedo", Color(0.55, 0.62, 0.72))
|
||||
env.volumetric_fog_emission = cfg.get("volumetric_emission", Color.BLACK)
|
||||
env.volumetric_fog_emission_energy = float(cfg.get("volumetric_energy", 0.0))
|
||||
env.volumetric_fog_anisotropy = 0.25
|
||||
env.volumetric_fog_length = 48.0
|
||||
env.volumetric_fog_ambient_inject = 0.15
|
||||
env.volumetric_fog_sky_affect = 0.2
|
||||
env.sdfgi_use_occlusion = true
|
||||
env.sdfgi_cascades = 4
|
||||
env.sdfgi_min_cell_size = 0.2
|
||||
env.sdfgi_energy = 0.7
|
||||
env.adjustment_enabled = true
|
||||
env.adjustment_brightness = 1.0
|
||||
env.adjustment_contrast = float(cfg.get("contrast", 1.06))
|
||||
|
||||
Reference in new issue
Block a user