Merge remote-tracking branch 'origin/gi' into large-worlds
# Conflicts: # Source/Engine/Graphics/PostProcessSettings.cpp # Source/Engine/Level/Actors/SkyLight.cpp # Source/Engine/Renderer/GBufferPass.cpp # Source/Engine/Renderer/GI/GlobalSurfaceAtlasPass.cpp # Source/Engine/Renderer/GlobalSignDistanceFieldPass.cpp # Source/Engine/Renderer/GlobalSignDistanceFieldPass.h # Source/Engine/Renderer/RenderList.h
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#define BLEND_FLOAT(name) if ((((int32)other.OverrideFlags & (int32)Override::name) != 0)) name = Math::Lerp(name, other.name, weight)
|
||||
#define BLEND_INT(name) BLEND_FLOAT(name)
|
||||
#define BLEND_VEC3(name) if ((((int32)other.OverrideFlags & (int32)Override::name) != 0)) name = Float3::Lerp(name, other.name, weight)
|
||||
#define BLEND_COL(name) if ((((int32)other.OverrideFlags & (int32)Override::name) != 0)) name = Color::Lerp(name, other.name, weight)
|
||||
#define BLEND_ENUM(name) BLEND_BOOL(name)
|
||||
#define BLEND_PROPERTY(name) BLEND_BOOL(name)
|
||||
|
||||
@@ -23,6 +24,16 @@ void AmbientOcclusionSettings::BlendWith(AmbientOcclusionSettings& other, float
|
||||
BLEND_FLOAT(FadeDistance);
|
||||
}
|
||||
|
||||
void GlobalIlluminationSettings::BlendWith(GlobalIlluminationSettings& other, float weight)
|
||||
{
|
||||
const bool isHalf = weight >= 0.5f;
|
||||
BLEND_BOOL(Mode);
|
||||
BLEND_FLOAT(Intensity);
|
||||
BLEND_FLOAT(TemporalResponse);
|
||||
BLEND_FLOAT(Distance);
|
||||
BLEND_COL(FallbackIrradiance);
|
||||
}
|
||||
|
||||
void BloomSettings::BlendWith(BloomSettings& other, float weight)
|
||||
{
|
||||
const bool isHalf = weight >= 0.5f;
|
||||
@@ -209,6 +220,7 @@ void PostFxMaterialsSettings::BlendWith(PostFxMaterialsSettings& other, float we
|
||||
void PostProcessSettings::BlendWith(PostProcessSettings& other, float weight)
|
||||
{
|
||||
AmbientOcclusion.BlendWith(other.AmbientOcclusion, weight);
|
||||
GlobalIllumination.BlendWith(other.GlobalIllumination, weight);
|
||||
Bloom.BlendWith(other.Bloom, weight);
|
||||
ToneMapping.BlendWith(other.ToneMapping, weight);
|
||||
ColorGrading.BlendWith(other.ColorGrading, weight);
|
||||
@@ -251,6 +263,9 @@ void PostProcessSettings::Serialize(SerializeStream& stream, const void* otherOb
|
||||
|
||||
stream.JKEY("AO");
|
||||
stream.Object(&AmbientOcclusion, other ? &other->AmbientOcclusion : nullptr);
|
||||
|
||||
stream.JKEY("GI");
|
||||
stream.Object(&GlobalIllumination, other ? &other->GlobalIllumination : nullptr);
|
||||
|
||||
stream.JKEY("Bloom");
|
||||
stream.Object(&Bloom, other ? &other->Bloom : nullptr);
|
||||
@@ -289,6 +304,7 @@ void PostProcessSettings::Serialize(SerializeStream& stream, const void* otherOb
|
||||
void PostProcessSettings::Deserialize(DeserializeStream& stream, ISerializeModifier* modifier)
|
||||
{
|
||||
AmbientOcclusion.DeserializeIfExists(stream, "AO", modifier);
|
||||
GlobalIllumination.DeserializeIfExists(stream, "GI", modifier);
|
||||
Bloom.DeserializeIfExists(stream, "Bloom", modifier);
|
||||
ToneMapping.DeserializeIfExists(stream, "ToneMapping", modifier);
|
||||
ColorGrading.DeserializeIfExists(stream, "ColorGrading", modifier);
|
||||
|
||||
Reference in New Issue
Block a user