Beispiel #1
0
 public void ToggleShowAO()
 {
     if (hbao.generalSettings.displayMode != HBAO.DisplayMode.Normal)
     {
         HBAO.GeneralSettings settings = hbao.generalSettings;
         settings.displayMode = HBAO.DisplayMode.Normal;
         hbao.generalSettings = settings;
     }
     else
     {
         HBAO.GeneralSettings settings = hbao.generalSettings;
         settings.displayMode = HBAO.DisplayMode.AOOnly;
         hbao.generalSettings = settings;
     }
 }
Beispiel #2
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;
    }
Beispiel #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;
 }