public LoadResults ReloadCalibration() { var results = Plugin.GetLoadResults(Plugin.PopulateLKGDisplays()); // loads calibration as well // create a calibration object. // if we find that the target display matches a plugged in looking glass, // use matching calibration cal = new Calibration(Plugin.GetLKGcalIndex(0)); if (results.calibrationFound && results.lkgDisplayFound) { for (int i = 0; i < Plugin.GetLKGcount(); i++) { if (targetDisplay == Plugin.GetLKGunityIndex(i)) { cal = new Calibration(Plugin.GetLKGcalIndex(i)); targetLKG = i; } } } PassSettingsToMaterial(); return(results); }
// functions public static Settings GetPreset(Preset preset, Calibration cal) { if (preset != Preset.Automatic) { return(presets[(int)preset]); } // if (QualitySettings.lodBias > 2f) return presets[(int)Preset.UltraHi]; if (QualitySettings.lodBias > 1f) { // making an exception here for higher res systems if (cal.screenWidth > 4000 || cal.screenHeight > 2000) { return(presets[(int)Preset.Maximum]); } return(presets[(int)Preset.HiRes]); } if (QualitySettings.lodBias > 0.5f) { return(presets[(int)Preset.Standard]); } return(presets[(int)Preset.ExtraLow]); }