public void HandleBlur(RenderSettings rs) { var fb = new FocalBlur(rs); if(!_focalBlur.Equals(fb)) { _focalBlur = fb; _focalBlurModified = true; } }
public FocalBlur(RenderSettings rs) { _serial = _runningSerial++; UseFocalBlur = rs.FocalBlurMode == RenderSettings.FocalBlurModes.Manual; FocalDistance = (float)rs.FocalBlurDistance; FocalAperture = (float)rs.FocalBlurAperture; if (!UseFocalBlur) { FocalAperture = 0.0f; FocalDistance = 10.0f; } }
protected override void ApplyRenderSettingsChanges(RenderSettings rs) { if (rs != null) { _cameraDatabase.HandleBlur(rs); _environmentDatabase.SetBackgroundData(rs.BackgroundStyle, rs.BackgroundColorTop, rs.BackgroundColorBottom); if (rs.BackgroundStyle == BackgroundStyle.Environment) { UpdateAllEnvironments(); } else if (rs.BackgroundStyle == BackgroundStyle.WallpaperImage) { var view = GetQueueView(); var y = string.IsNullOrEmpty(view.WallpaperFilename); sdd.WriteLine( $"view has {(y ? "no" : "")} wallpaper {(y ? "" : "with filename ")} {(y ? "" : view.WallpaperFilename)} {(y ? "" : "its grayscale bool")} {(y ? "" : $"{view.ShowWallpaperInGrayScale}")} {(y ? "" : "its hidden bool")} {(y ? "" : $"{view.WallpaperHidden}")}"); _environmentDatabase.BackgroundWallpaper(view, rs.ScaleBackgroundToFit); } _environmentDatabase.SetGamma(PreProcessGamma); _renderSettingsDatabase.SetQuality(rs.AntialiasLevel); _renderEngine.Settings.SetQuality(rs.AntialiasLevel); }