#if ENABLE_VR && ENABLE_XR_MODULE using System; namespace UnityEngine.Rendering.Universal { /// /// Class containing shader resources needed in URP for XR. /// /// [Serializable] [SupportedOnRenderPipeline(typeof(UniversalRenderPipelineAsset))] [Categorization.CategoryInfo(Name = "R: Runtime XR", Order = 1000), HideInInspector] public class UniversalRenderPipelineRuntimeXRResources : IRenderPipelineResources { /// /// Version of the XR Resources /// public int version => 0; bool IRenderPipelineGraphicsSettings.isAvailableInPlayerBuild => true; [SerializeField] [ResourcePath("Shaders/XR/XROcclusionMesh.shader")] private Shader m_xrOcclusionMeshPS; /// /// XR Occlusion mesh shader. /// public Shader xrOcclusionMeshPS { get => m_xrOcclusionMeshPS; set => this.SetValueAndNotify(ref m_xrOcclusionMeshPS, value, nameof(m_xrOcclusionMeshPS)); } [SerializeField] [ResourcePath("Shaders/XR/XRMirrorView.shader")] public Shader m_xrMirrorViewPS; /// /// XR Mirror View shader. /// public Shader xrMirrorViewPS { get => m_xrMirrorViewPS; set => this.SetValueAndNotify(ref m_xrMirrorViewPS, value, nameof(m_xrMirrorViewPS)); } [SerializeField] [ResourcePath("Shaders/XR/XRMotionVector.shader")] public Shader m_xrMotionVector; /// /// XR MotionVector shader. /// public Shader xrMotionVector { get => m_xrMotionVector; set => this.SetValueAndNotify(ref m_xrMotionVector, value, nameof(m_xrMotionVector)); } internal bool valid { get { if (xrOcclusionMeshPS == null) return false; if (xrMirrorViewPS == null) return false; if (m_xrMotionVector == null) return false; return true; } } } } #endif