Add Global Illumination options to PostFx Settings

This commit is contained in:
Wojciech Figat
2022-06-10 18:48:17 +02:00
parent aa58665740
commit d4839b9c78
20 changed files with 314 additions and 94 deletions

View File

@@ -43,6 +43,7 @@ void PostFxVolume::Collect(RenderContext& renderContext)
void PostFxVolume::Blend(PostProcessSettings& other, float weight)
{
other.AmbientOcclusion.BlendWith(AmbientOcclusion, weight);
other.GlobalIllumination.BlendWith(GlobalIllumination, weight);
other.Bloom.BlendWith(Bloom, weight);
other.ToneMapping.BlendWith(ToneMapping, weight);
other.ColorGrading.BlendWith(ColorGrading, weight);
@@ -118,6 +119,9 @@ void PostFxVolume::Serialize(SerializeStream& stream, const void* otherObj)
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);
@@ -169,6 +173,7 @@ void PostFxVolume::Deserialize(DeserializeStream& stream, ISerializeModifier* mo
{
auto& settingsStream = settingsMember->value;
AmbientOcclusion.DeserializeIfExists(settingsStream, "AO", modifier);
GlobalIllumination.DeserializeIfExists(settingsStream, "GI", modifier);
Bloom.DeserializeIfExists(settingsStream, "Bloom", modifier);
ToneMapping.DeserializeIfExists(settingsStream, "ToneMapping", modifier);
ColorGrading.DeserializeIfExists(settingsStream, "ColorGrading", modifier);