remove global postfx volume and use global settings instead
This commit is contained in:
@@ -44,24 +44,19 @@ namespace Game
|
||||
{
|
||||
get
|
||||
{
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
return postFx.CameraArtifacts.VignetteIntensity.ToString();
|
||||
return "";
|
||||
return Graphics.PostProcessSettings.CameraArtifacts.VignetteIntensity.ToString();
|
||||
}
|
||||
set
|
||||
{
|
||||
if (float.TryParse(value, out float valueFloat))
|
||||
{
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
{
|
||||
valueFloat = Mathf.Clamp(valueFloat, 0.0f, 2.0f);
|
||||
valueFloat = Mathf.Clamp(valueFloat, 0.0f, 2.0f);
|
||||
|
||||
CameraArtifactsSettings cameraArtifacts = postFx.CameraArtifacts;
|
||||
cameraArtifacts.VignetteIntensity = valueFloat;
|
||||
postFx.CameraArtifacts = cameraArtifacts;
|
||||
}
|
||||
PostProcessSettings postProcessSettings = Graphics.PostProcessSettings;
|
||||
CameraArtifactsSettings cameraArtifacts = postProcessSettings.CameraArtifacts;
|
||||
cameraArtifacts.VignetteIntensity = valueFloat;
|
||||
postProcessSettings.CameraArtifacts = cameraArtifacts;
|
||||
Graphics.PostProcessSettings = postProcessSettings;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -208,18 +203,17 @@ namespace Game
|
||||
AssetManager.Globals.SetValue("Scene Lighting", boolValue);
|
||||
|
||||
|
||||
PostFxVolume postFx = Level.FindActor<PostFxVolume>();
|
||||
if (postFx != null)
|
||||
{
|
||||
AmbientOcclusionSettings aoSettings = postFx.AmbientOcclusion;
|
||||
/*aoSettings.OverrideFlags = (aoSettings.OverrideFlags & ~AmbientOcclusionSettingsOverride.Enabled) |
|
||||
(boolValue
|
||||
? AmbientOcclusionSettingsOverride.Enabled
|
||||
: 0 & AmbientOcclusionSettingsOverride.Enabled);
|
||||
*/
|
||||
aoSettings.Enabled = boolValue;
|
||||
postFx.AmbientOcclusion = aoSettings;
|
||||
}
|
||||
PostProcessSettings postProcessSettings = Graphics.PostProcessSettings;
|
||||
AmbientOcclusionSettings aoSettings = postProcessSettings.AmbientOcclusion;
|
||||
/*aoSettings.OverrideFlags = (aoSettings.OverrideFlags & ~AmbientOcclusionSettingsOverride.Enabled) |
|
||||
(boolValue
|
||||
? AmbientOcclusionSettingsOverride.Enabled
|
||||
: 0 & AmbientOcclusionSettingsOverride.Enabled);
|
||||
*/
|
||||
aoSettings.Enabled = boolValue;
|
||||
postProcessSettings.AmbientOcclusion = aoSettings;
|
||||
Graphics.PostProcessSettings = postProcessSettings;
|
||||
|
||||
|
||||
// TODO: disable GI
|
||||
Graphics.EnableGlobalSDF = boolValue;
|
||||
|
||||
@@ -839,6 +839,8 @@ namespace Game
|
||||
childModel.Name = "Batch_" + kvp.Key.Path;
|
||||
childModel.Model = batchModel;
|
||||
//childModel.Position = geom.offset;
|
||||
|
||||
sdfModels.Add(batchModel);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user