using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace UnityEngine.AdaptivePerformance
{
///
/// This class is used to store changes to a number of rendering quality settings that are applied when using
/// the Universal Render Pipeline.
///
public static class AdaptivePerformanceRenderSettings
{
private static float s_MaxShadowDistanceMultiplier = 1;
private static float s_ShadowResolutionMultiplier = 1;
private static float s_RenderScaleMultiplier = 1;
private static float s_DecalsMaxDistance = 1000;
///
/// Amount to multiply the main lights shadowmap resolution. Values are clamped between 0 and 1.
///
public static float MainLightShadowmapResolutionMultiplier
{
get { return s_ShadowResolutionMultiplier; }
set { s_ShadowResolutionMultiplier = Mathf.Clamp01(value); }
}
///
/// Adjust the drawdistance for decals.
///
public static float DecalsDrawDistance
{
get { return s_DecalsMaxDistance; }
set { s_DecalsMaxDistance = value; }
}
///
/// Adjust the number of shadow cascades for the main camera in the scene.
///
public static int MainLightShadowCascadesCountBias
{
get;
set;
}
///
/// Adjust the quality setting of shadows.
///
public static int ShadowQualityBias
{
get;
set;
}
///
/// Adjust the size of lookup tables that are used for color grading.
///
public static float LutBias
{
get;
set;
}
///
/// Adjust how far in the distance shadows will be rendered. Values are clamped between 0 and 1.
///
public static float MaxShadowDistanceMultiplier
{
get { return s_MaxShadowDistanceMultiplier; }
set { s_MaxShadowDistanceMultiplier = Mathf.Clamp01(value); }
}
///
/// Lower the resolution of the main camera to reduce fillrate and GPU load.
///
public static float RenderScaleMultiplier
{
get { return s_RenderScaleMultiplier; }
set { s_RenderScaleMultiplier = Mathf.Clamp01(value); }
}
///
/// Adjust the quality of MSAA.
///
public static int AntiAliasingQualityBias
{
get;
set;
}
///
/// Whether dynamic batching should be used when rendering multiple objects that share the same material.
/// Useful on hardware that does not support instancing.
///
public static bool SkipDynamicBatching
{
get;
set;
}
///
/// Whether depth-based sorting should be enabled.
/// When enabled, there is a higher load on the CPU but less rendering overdraw.
/// When disabled, there is less CPU pressure but more overdraw.
///
public static bool SkipFrontToBackSorting
{
get;
set;
}
///
/// Whether transparent objects should be rendered
/// When enabled, there is less rendering overdraw, but entire objects can disappear.
///
public static bool SkipTransparentObjects
{
get;
set;
}
}
}