Class ARShaderOcclusion
Add this component alongside AROcclusionManager
to copy the depth camera's texture into shader memory.
Inherited Members
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Namespace: UnityEngine.XR.ARFoundation
Assembly: Unity.XR.ARFoundation.dll
Syntax
[DisallowMultipleComponent]
[RequireComponent(typeof(AROcclusionManager))]
[AddComponentMenu("XR/AR Foundation/AR Shader Occlusion")]
public class ARShaderOcclusion : MonoBehaviour
Properties
environmentDepthNearFarPlanesPropertyId
Shader property ID for near and far clip planes.
Declaration
public int environmentDepthNearFarPlanesPropertyId { get; }
Property Value
Type | Description |
---|---|
int |
environmentDepthProjectionMatricesPropertyId
Shader property ID for the depth view-projection matrix array.
Declaration
public int environmentDepthProjectionMatricesPropertyId { get; }
Property Value
Type | Description |
---|---|
int |
hardOcclusionShaderKeyword
The shader keyword to enable hard occlusion.
Declaration
public string hardOcclusionShaderKeyword { get; }
Property Value
Type | Description |
---|---|
string |
occlusionShaderMode
Enables a global shader keyword to enable hard occlusion or default.
To enable per-object occlusion, use a provided cross-platform occlusion URP shader or modify your custom shader to support hardOcclusionShaderKeyword keyword.
Declaration
public AROcclusionShaderMode occlusionShaderMode { get; set; }
Property Value
Type | Description |
---|---|
AROcclusionShaderMode |