-
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
made very low less demanding, made low more useable
- Loading branch information
Showing
4 changed files
with
116 additions
and
51 deletions.
There are no files selected for viewing
45 changes: 0 additions & 45 deletions
45
...sis Framework/SettingsManagerModules/General/UnityModules/SMModuleAnisotropicFiltering.cs
This file was deleted.
Oops, something went wrong.
109 changes: 109 additions & 0 deletions
109
...asis Framework/SettingsManagerModules/URP Only Modules/SMModuleQualityAndQualitySetURP.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
using UnityEngine; | ||
using UnityEngine.Rendering.Universal; | ||
using static UnityEngine.Analytics.IAnalytic; | ||
namespace BattlePhaze.SettingsManager.Intergrations | ||
{ | ||
public class SMModuleQualityAndQualitySetURP : SettingsManagerOption | ||
{ | ||
public UniversalAdditionalCameraData Data; | ||
public override void ReceiveOption(SettingsMenuInput Option, SettingsManager Manager) | ||
{ | ||
if (NameReturn(0, Option)) | ||
{ | ||
ChangeQualityLevel(Option.SelectedValue); | ||
} | ||
} | ||
public AnisotropicFiltering VeryLow = AnisotropicFiltering.Disable; | ||
public AnisotropicFiltering low = AnisotropicFiltering.Disable; | ||
public AnisotropicFiltering medium = AnisotropicFiltering.Enable; | ||
public AnisotropicFiltering high = AnisotropicFiltering.Enable; | ||
public AnisotropicFiltering ultra = AnisotropicFiltering.Enable; | ||
public Camera Camera; | ||
public void ChangeQualityLevel(string Quality) | ||
{ | ||
if (Camera == null) | ||
{ | ||
Camera = Camera.main; | ||
Data = Camera.GetComponent<UniversalAdditionalCameraData>(); | ||
} | ||
switch (Quality) | ||
{ | ||
case "very low": | ||
QualitySettings.anisotropicFiltering = VeryLow; | ||
QualitySettings.SetQualityLevel(2); | ||
QualitySettings.realtimeReflectionProbes = false; | ||
QualitySettings.softParticles = false; | ||
QualitySettings.particleRaycastBudget = 256; | ||
if (Data != null) | ||
{ | ||
Data.renderPostProcessing = false; | ||
Data.requiresColorOption = CameraOverrideOption.Off; | ||
Data.requiresDepthOption = CameraOverrideOption.Off; | ||
Data.renderShadows = false; | ||
Data.stopNaN = false; | ||
} | ||
break; | ||
case "low": | ||
QualitySettings.anisotropicFiltering = low; | ||
QualitySettings.SetQualityLevel(2); | ||
QualitySettings.realtimeReflectionProbes = true; | ||
QualitySettings.softParticles = true; | ||
QualitySettings.particleRaycastBudget = 512; | ||
if (Data != null) | ||
{ | ||
Data.renderPostProcessing = true; | ||
Data.requiresColorOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.requiresDepthOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.renderShadows = true; | ||
Data.stopNaN = true; | ||
} | ||
break; | ||
case "medium": | ||
QualitySettings.anisotropicFiltering = medium; | ||
QualitySettings.SetQualityLevel(1); | ||
QualitySettings.realtimeReflectionProbes = true; | ||
QualitySettings.softParticles = true; | ||
QualitySettings.particleRaycastBudget = 1024; | ||
if (Data != null) | ||
{ | ||
Data.renderPostProcessing = true; | ||
Data.requiresColorOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.requiresDepthOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.renderShadows = true; | ||
Data.stopNaN = true; | ||
} | ||
break; | ||
case "high": | ||
QualitySettings.anisotropicFiltering = high; | ||
QualitySettings.SetQualityLevel(0); | ||
QualitySettings.realtimeReflectionProbes = true; | ||
QualitySettings.softParticles = true; | ||
QualitySettings.particleRaycastBudget = 2048; | ||
if (Data != null) | ||
{ | ||
Data.renderPostProcessing = true; | ||
Data.requiresColorOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.requiresDepthOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.renderShadows = true; | ||
Data.stopNaN = true; | ||
} | ||
break; | ||
case "ultra": | ||
QualitySettings.anisotropicFiltering = ultra; | ||
QualitySettings.SetQualityLevel(0); | ||
QualitySettings.realtimeReflectionProbes = true; | ||
QualitySettings.softParticles = true; | ||
QualitySettings.particleRaycastBudget = 4096; | ||
if (Data != null) | ||
{ | ||
Data.renderPostProcessing = true; | ||
Data.requiresColorOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.requiresDepthOption = CameraOverrideOption.UsePipelineSettings; | ||
Data.renderShadows = true; | ||
Data.stopNaN = true; | ||
} | ||
break; | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters