Example #1
0
    public void ApplyPreset(HBAO.Preset preset)
    {
        if (preset == HBAO.Preset.Custom)
        {
            this.m_Presets.preset = preset;
            return;
        }
        HBAO.DisplayMode displayMode = this.generalSettings.displayMode;
        this.m_GeneralSettings             = HBAO.GeneralSettings.defaultSettings;
        this.m_AOSettings                  = HBAO.AOSettings.defaultSettings;
        this.m_ColorBleedingSettings       = HBAO.ColorBleedingSettings.defaultSettings;
        this.m_BlurSettings                = HBAO.BlurSettings.defaultSettings;
        this.m_GeneralSettings.displayMode = displayMode;
        switch (preset)
        {
        case HBAO.Preset.FastestPerformance:
            this.m_GeneralSettings.quality    = HBAO.Quality.Lowest;
            this.m_AOSettings.radius          = 0.5f;
            this.m_AOSettings.maxRadiusPixels = 64f;
            this.m_BlurSettings.amount        = HBAO.Blur.ExtraWide;
            goto IL_149;

        case HBAO.Preset.FastPerformance:
            this.m_GeneralSettings.quality    = HBAO.Quality.Low;
            this.m_AOSettings.maxRadiusPixels = 128f;
            this.m_AOSettings.radius          = 0.5f;
            this.m_BlurSettings.amount        = HBAO.Blur.Wide;
            goto IL_149;

        case HBAO.Preset.HighQuality:
            this.m_GeneralSettings.quality = HBAO.Quality.High;
            goto IL_149;

        case HBAO.Preset.HighestQuality:
            this.m_GeneralSettings.quality = HBAO.Quality.Highest;
            this.m_AOSettings.radius       = 1.2f;
            this.m_BlurSettings.amount     = HBAO.Blur.Narrow;
            goto IL_149;
        }
        this.m_AOSettings.radius = 0.8f;
IL_149:
        this.m_Presets.preset = preset;
    }
Example #2
0
 public void UpdateAoRadius()
 {
     HBAO.AOSettings settings = hbao.aoSettings;
     settings.radius = aoRadiusSlider.value;
     hbao.aoSettings = settings;
 }
Example #3
0
 public void ApplyPreset(HBAO.Preset preset)
 {
     if (preset == HBAO.Preset.Custom)
     {
         this.m_Presets.preset = preset;
         return;
     }
     HBAO.DisplayMode displayMode = this.generalSettings.displayMode;
     this.m_GeneralSettings = HBAO.GeneralSettings.defaultSettings;
     this.m_AOSettings = HBAO.AOSettings.defaultSettings;
     this.m_ColorBleedingSettings = HBAO.ColorBleedingSettings.defaultSettings;
     this.m_BlurSettings = HBAO.BlurSettings.defaultSettings;
     this.m_GeneralSettings.displayMode = displayMode;
     switch (preset)
     {
     case HBAO.Preset.FastestPerformance:
         this.m_GeneralSettings.quality = HBAO.Quality.Lowest;
         this.m_AOSettings.radius = 0.5f;
         this.m_AOSettings.maxRadiusPixels = 64f;
         this.m_BlurSettings.amount = HBAO.Blur.ExtraWide;
         goto IL_149;
     case HBAO.Preset.FastPerformance:
         this.m_GeneralSettings.quality = HBAO.Quality.Low;
         this.m_AOSettings.maxRadiusPixels = 128f;
         this.m_AOSettings.radius = 0.5f;
         this.m_BlurSettings.amount = HBAO.Blur.Wide;
         goto IL_149;
     case HBAO.Preset.HighQuality:
         this.m_GeneralSettings.quality = HBAO.Quality.High;
         goto IL_149;
     case HBAO.Preset.HighestQuality:
         this.m_GeneralSettings.quality = HBAO.Quality.Highest;
         this.m_AOSettings.radius = 1.2f;
         this.m_BlurSettings.amount = HBAO.Blur.Narrow;
         goto IL_149;
     }
     this.m_AOSettings.radius = 0.8f;
     IL_149:
     this.m_Presets.preset = preset;
 }