Add IndirectShadowsStrength to GI settings for artist-controlled light leaking

This commit is contained in:
2026-06-23 12:33:11 +02:00
parent 1c5197f3a8
commit 0477d37aeb
5 changed files with 19 additions and 4 deletions
@@ -33,6 +33,7 @@ void GlobalIlluminationSettings::BlendWith(GlobalIlluminationSettings& other, fl
BLEND_FLOAT(BounceIntensity);
BLEND_FLOAT(TemporalResponse);
BLEND_FLOAT(Distance);
BLEND_FLOAT(IndirectShadowsStrength);
BLEND_COL(FallbackIrradiance);
}
+12 -1
View File
@@ -334,10 +334,15 @@ API_ENUM(Attributes="Flags") enum class GlobalIlluminationSettingsOverride : int
/// </summary>
BounceIntensity = 1 << 5,
/// <summary>
/// Overrides <see cref="GlobalIlluminationSettings.IndirectShadowsStrength"/> property.
/// </summary>
IndirectShadowsStrength = 1 << 6,
/// <summary>
/// All properties.
/// </summary>
All = Mode | Intensity | TemporalResponse | Distance | FallbackIrradiance | BounceIntensity,
All = Mode | Intensity | TemporalResponse | Distance | FallbackIrradiance | BounceIntensity | IndirectShadowsStrength,
};
/// <summary>
@@ -385,6 +390,12 @@ API_STRUCT() struct FLAXENGINE_API GlobalIlluminationSettings : ISerializable
API_FIELD(Attributes="EditorOrder(30), Limit(1000), PostProcessSetting((int)GlobalIlluminationSettingsOverride.Distance), ValueCategory(Utils.ValueCategory.Distance)")
float Distance = 20000.0f;
/// <summary>
/// Indirect lighting shadows intensity. Default is 1 for fully opaque shadowing, lower values bleed the lighting into shadowed areas. Can be sued for artistic control over GI.
/// </summary>
API_FIELD(Attributes = "EditorOrder(35), Limit(0.0f, 1.0f, 0.001f), PostProcessSetting((int)GlobalIlluminationSettingsOverride.IndirectShadowsStrength)")
float IndirectShadowsStrength = 1.0f;
/// <summary>
/// The irradiance lighting outside the GI range used as a fallback to prevent pure-black scene outside the Global Illumination range.
/// </summary>