//pipelinedefine #define H_URP using HTraceWSGI.Scripts.Globals; using System; using HTraceWSGI.Scripts.Extensions; using UnityEngine; using UnityEngine.Serialization; namespace HTraceWSGI.Scripts.Data.Public { [Serializable] public class GeneralSettings { /// /// Debug different stages and resources of HTrace. /// /// More information public DebugModeWS DebugModeWS = DebugModeWS.None; public HBuffer HBuffer = HBuffer.Multi; public bool VolumetricDebug = true; [SerializeField] private float _intensity = 1f; /// /// /// /// [0.1;5.0] [HExtensions.HRangeAttribute(0.1f,5.0f)] public float Intensity { get => _intensity; set { if (Mathf.Abs(value - _intensity) < Mathf.Epsilon) return; _intensity = HExtensions.Clamp(value, typeof(GeneralSettings), nameof(GeneralSettings.Intensity)); } } [SerializeField] public bool AmbientOverride = true; [SerializeField] public bool MetallicIndirectFallback = false; [SerializeField] private float _renderScale = 1f; /// /// /// /// [0.5;1.0] [HExtensions.HRangeAttribute(0.5f,1.0f)] public float RenderScale { get => _renderScale; set { if (Mathf.Abs(value - _renderScale) < Mathf.Epsilon) return; _renderScale = HExtensions.Clamp(value, typeof(GeneralSettings), nameof(GeneralSettings.RenderScale)); } } public TracingMode TracingMode = TracingMode.SoftwareTracing; [SerializeField] private RayCountMode _rayCountMode = RayCountMode.Quality; /// /// Defines the pixel spacing between screen-space probes, affecting the number of probes spawned. /// Ray Count has the biggest impact on the overall performance , memory consumption and visual quality. /// /// More information public RayCountMode RayCountMode { get { return _rayCountMode; } set { if (value == _rayCountMode) return; _rayCountMode = value; } } [SerializeField] private int _rayLength = 50; /// /// The maximum distance a ray can travel in world space. /// /// [1;100] /// More information [HExtensions.HRangeAttribute(0, 100)] public int RayLength { get { return _rayLength; } set { if (value == _rayLength) return; _rayLength = HExtensions.Clamp(value, typeof(GeneralSettings), nameof(GeneralSettings.RayLength)); } } public Multibounce Multibounce = Multibounce.IrradianceCache; #if UNITY_2023_3_OR_NEWER public RenderingLayerMask ExcludeCastingMask = 0; public RenderingLayerMask ExcludeReceivingMask = 0; #endif } }