Example #1
0
        public void OnDistortionBtnClick()
        {
            this._modifiedPersonalSetting.IsUserDefinedGrade    = false;
            this._modifiedPersonalSetting.IsUserDefinedVolatile = true;
            bool useDistortion = this._modifiedPersonalSetting.VolatileSetting.UseDistortion;

            this._modifiedPersonalSetting.VolatileSetting.UseDistortion = !useDistortion;
            GraphicsSettingUtil.EnableDistortion(useDistortion);
            this.ShowDistortion(this._modifiedPersonalSetting.VolatileSetting.UseDistortion, false, true);
        }
Example #2
0
        public static void ApplySettingConfig(ConfigGraphicsSetting setting)
        {
            GraphicsSettingUtil.SetTargetFrameRate(setting.TargetFrameRate);
            bool forceWhenDisable = true;

            GraphicsSettingUtil.EnablePostFX(setting.VolatileSetting.UsePostFX, forceWhenDisable);
            GraphicsSettingUtil.ApplyResolution(setting.ResolutionPercentage, setting.ResolutionQuality, setting.RecommendResolutionX, setting.RecommendResolutionY);
            GraphicsSettingUtil.SetPostEffectBufferSizeByQuality(setting.PostFxGradeBufferSize, setting.VolatileSetting.PostFXGrade);
            GraphicsSettingUtil.EnableHDR(setting.VolatileSetting.UseHDR);
            GraphicsSettingUtil.EnableDistortion(setting.VolatileSetting.UseDistortion);
            GraphicsSettingUtil.EnableReflection(setting.VolatileSetting.UseReflection);
            GraphicsSettingUtil.EnableFXAA(setting.VolatileSetting.UseFXAA);
            GraphicsSettingUtil.EnableDynamicBone(setting.VolatileSetting.UseDynamicBone);
            GraphicsSettingUtil.EnableStaticCloudMode(!setting.VolatileSetting.UseDynamicBone);
        }