using System; using HTraceWSGI.Scripts.Globals; using UnityEngine; namespace HTraceWSGI.Scripts.Structs { [Serializable] public class GeneralData { [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; OnRayCountChanged?.Invoke(_rayCountMode); } } [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; HExtensions.HRangeAttributeDictionary.TryGetValue(nameof(RayLength), out HExtensions.HRangeAttributeElement attributeValue); _rayLength = Mathf.Clamp(value, attributeValue.minInt, attributeValue.maxInt); } } public Multibounce Multibounce = Multibounce.IrradianceCache; /// /// Debug different stages and resources of HTrace. /// /// More information public DebugModeWS DebugModeWS = DebugModeWS.None; internal Action OnRayCountChanged; } }