docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class HDAdditionalCameraData

    Additional component that holds HDRP specific parameters for Cameras.

    Inheritance
    object
    Object
    Component
    Behaviour
    MonoBehaviour
    HDAdditionalCameraData
    Implements
    IVersionable<HDAdditionalCameraData.Version>
    IDebugData
    IAdditionalData
    Inherited Members
    MonoBehaviour.IsInvoking()
    MonoBehaviour.CancelInvoke()
    MonoBehaviour.Invoke(string, float)
    MonoBehaviour.InvokeRepeating(string, float, float)
    MonoBehaviour.CancelInvoke(string)
    MonoBehaviour.IsInvoking(string)
    MonoBehaviour.StartCoroutine(string)
    MonoBehaviour.StartCoroutine(string, object)
    MonoBehaviour.StartCoroutine(IEnumerator)
    MonoBehaviour.StartCoroutine_Auto(IEnumerator)
    MonoBehaviour.StopCoroutine(IEnumerator)
    MonoBehaviour.StopCoroutine(Coroutine)
    MonoBehaviour.StopCoroutine(string)
    MonoBehaviour.StopAllCoroutines()
    MonoBehaviour.print(object)
    MonoBehaviour.destroyCancellationToken
    MonoBehaviour.useGUILayout
    MonoBehaviour.didStart
    MonoBehaviour.didAwake
    MonoBehaviour.runInEditMode
    Behaviour.enabled
    Behaviour.isActiveAndEnabled
    Component.GetComponent(Type)
    Component.GetComponent<T>()
    Component.TryGetComponent(Type, out Component)
    Component.TryGetComponent<T>(out T)
    Component.GetComponent(string)
    Component.GetComponentInChildren(Type, bool)
    Component.GetComponentInChildren(Type)
    Component.GetComponentInChildren<T>(bool)
    Component.GetComponentInChildren<T>()
    Component.GetComponentsInChildren(Type, bool)
    Component.GetComponentsInChildren(Type)
    Component.GetComponentsInChildren<T>(bool)
    Component.GetComponentsInChildren<T>(bool, List<T>)
    Component.GetComponentsInChildren<T>()
    Component.GetComponentsInChildren<T>(List<T>)
    Component.GetComponentInParent(Type, bool)
    Component.GetComponentInParent(Type)
    Component.GetComponentInParent<T>(bool)
    Component.GetComponentInParent<T>()
    Component.GetComponentsInParent(Type, bool)
    Component.GetComponentsInParent(Type)
    Component.GetComponentsInParent<T>(bool)
    Component.GetComponentsInParent<T>(bool, List<T>)
    Component.GetComponentsInParent<T>()
    Component.GetComponents(Type)
    Component.GetComponents(Type, List<Component>)
    Component.GetComponents<T>(List<T>)
    Component.GetComponents<T>()
    Component.GetComponentIndex()
    Component.CompareTag(string)
    Component.CompareTag(TagHandle)
    Component.SendMessageUpwards(string, object, SendMessageOptions)
    Component.SendMessageUpwards(string, object)
    Component.SendMessageUpwards(string)
    Component.SendMessageUpwards(string, SendMessageOptions)
    Component.SendMessage(string, object)
    Component.SendMessage(string)
    Component.SendMessage(string, object, SendMessageOptions)
    Component.SendMessage(string, SendMessageOptions)
    Component.BroadcastMessage(string, object, SendMessageOptions)
    Component.BroadcastMessage(string, object)
    Component.BroadcastMessage(string)
    Component.BroadcastMessage(string, SendMessageOptions)
    Component.transform
    Component.gameObject
    Component.tag
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.InstantiateAsync<T>(T)
    Object.InstantiateAsync<T>(T, Transform)
    Object.InstantiateAsync<T>(T, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int)
    Object.InstantiateAsync<T>(T, int, Transform)
    Object.InstantiateAsync<T>(T, int, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion)
    Object.InstantiateAsync<T>(T, int, Transform, Vector3, Quaternion, CancellationToken)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>)
    Object.InstantiateAsync<T>(T, int, Transform, ReadOnlySpan<Vector3>, ReadOnlySpan<Quaternion>, CancellationToken)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Scene)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Rendering.HighDefinition
    Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
    Syntax
    [AddComponentMenu("")]
    [DisallowMultipleComponent]
    [ExecuteAlways]
    [RequireComponent(typeof(Camera))]
    public class HDAdditionalCameraData : MonoBehaviour, IVersionable<HDAdditionalCameraData.Version>, IDebugData, IAdditionalData

    Fields

    SMAAQuality

    Quality of the anti-aliasing when using SMAA.

    Declaration
    public HDAdditionalCameraData.SMAAQualityLevel SMAAQuality
    Field Value
    Type Description
    HDAdditionalCameraData.SMAAQualityLevel

    TAAQuality

    Quality of the anti-aliasing when using TAA.

    Declaration
    public HDAdditionalCameraData.TAAQualityLevel TAAQuality
    Field Value
    Type Description
    HDAdditionalCameraData.TAAQualityLevel

    allowDeepLearningSuperSampling

    Allow NVIDIA Deep Learning Super Sampling (DLSS) on this camera.

    Declaration
    [Tooltip("Allow NVIDIA Deep Learning Super Sampling (DLSS) on this camera")]
    public bool allowDeepLearningSuperSampling
    Field Value
    Type Description
    bool

    allowDynamicResolution

    Allows dynamic resolution on buffers linked to this camera.

    Declaration
    [Tooltip("Allows dynamic resolution on buffers linked to this camera.")]
    public bool allowDynamicResolution
    Field Value
    Type Description
    bool

    allowFidelityFX2SuperResolution

    Allow FidelityFX Super Resolution (FSR2) on this camera.

    Declaration
    [Tooltip("Allow FidelityFX Super Resolution (FSR2) on this camera.")]
    public bool allowFidelityFX2SuperResolution
    Field Value
    Type Description
    bool

    antialiasing

    Anti-aliasing mode.

    Declaration
    public HDAdditionalCameraData.AntialiasingMode antialiasing
    Field Value
    Type Description
    HDAdditionalCameraData.AntialiasingMode

    backgroundColorHDR

    HDR color used for clearing the camera background.

    Declaration
    [ColorUsage(true, true)]
    public Color backgroundColorHDR
    Field Value
    Type Description
    Color

    clearColorMode

    Clear mode for the camera background.

    Declaration
    public HDAdditionalCameraData.ClearColorMode clearColorMode
    Field Value
    Type Description
    HDAdditionalCameraData.ClearColorMode

    clearDepth

    Clear depth as well as color.

    Declaration
    public bool clearDepth
    Field Value
    Type Description
    bool

    customRenderingSettings

    Allows you to override the default frame settings for this camera.

    Declaration
    [Tooltip("Allows you to override the default settings for this camera.")]
    public bool customRenderingSettings
    Field Value
    Type Description
    bool

    deepLearningSuperSamplingQuality

    Selects a performance quality setting for NVIDIA Deep Learning Super Sampling (DLSS) for this camera of this project.

    Declaration
    [Tooltip("Selects a performance quality setting for NVIDIA Deep Learning Super Sampling (DLSS) for this camera of this project.")]
    public uint deepLearningSuperSamplingQuality
    Field Value
    Type Description
    uint

    deepLearningSuperSamplingSharpening

    Sets the Sharpening value for NVIDIA Deep Learning Super Sampling (DLSS) for this camera.

    Declaration
    [Tooltip("Sets the Sharpening value for NVIDIA Deep Learning Super Sampling (DLSS) for this camera.")]
    [Range(0, 1)]
    public float deepLearningSuperSamplingSharpening
    Field Value
    Type Description
    float

    deepLearningSuperSamplingUseCustomAttributes

    If set to true, NVIDIA Deep Learning Super Sampling (DLSS) will utilize the Quality setting set on this camera instead of the one specified in the quality asset of this project.

    Declaration
    [Tooltip("If set to true, NVIDIA Deep Learning Super Sampling (DLSS) will utilize the attributes (Optimal Settings and Sharpness) specified on this camera, instead of the ones specified in the quality asset of this project.")]
    public bool deepLearningSuperSamplingUseCustomAttributes
    Field Value
    Type Description
    bool

    deepLearningSuperSamplingUseCustomQualitySettings

    If set to true, NVIDIA Deep Learning Super Sampling (DLSS) will utilize the Quality setting set on this camera instead of the one specified in the quality asset.

    Declaration
    [Tooltip("If set to true, NVIDIA Deep Learning Super Sampling (DLSS) will utilize the Quality setting set on this camera instead of the one specified in the quality asset.")]
    public bool deepLearningSuperSamplingUseCustomQualitySettings
    Field Value
    Type Description
    bool

    deepLearningSuperSamplingUseOptimalSettings

    Sets the sharpness and scale automatically for NVIDIA Deep Learning Super Sampling (DLSS) for this camera, depending on the values of quality settings.

    Declaration
    [Tooltip("Sets the sharpness and scale automatically for NVIDIA Deep Learning Super Sampling (DLSS) for this camera, depending on the values of quality settings.")]
    public bool deepLearningSuperSamplingUseOptimalSettings
    Field Value
    Type Description
    bool

    defaultFrameSettings

    When using default frame settings, specify which type of frame settings to use.

    Declaration
    public FrameSettingsRenderType defaultFrameSettings
    Field Value
    Type Description
    FrameSettingsRenderType

    dithering

    Use dithering to filter out minor banding.

    Declaration
    public bool dithering
    Field Value
    Type Description
    bool

    exposureTarget

    The object used as a target for centering the Exposure's Procedural Mask metering mode when target object option is set (See Exposure Volume Component).

    Declaration
    public GameObject exposureTarget
    Field Value
    Type Description
    GameObject

    fidelityFX2SuperResolutionEnableSharpening

    Enables the Sharpening pass for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera.

    Declaration
    [Tooltip("Enables the Sharpening pass for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera.")]
    public bool fidelityFX2SuperResolutionEnableSharpening
    Field Value
    Type Description
    bool

    fidelityFX2SuperResolutionQuality

    Selects a performance quality setting for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera of this project.

    Declaration
    [Tooltip("Selects a performance quality setting for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera of this project.")]
    public uint fidelityFX2SuperResolutionQuality
    Field Value
    Type Description
    uint

    fidelityFX2SuperResolutionSharpening

    Sets the Sharpening value for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera.

    Declaration
    [Tooltip("Sets the Sharpening value for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera.")]
    [Range(0, 1)]
    public float fidelityFX2SuperResolutionSharpening
    Field Value
    Type Description
    float

    fidelityFX2SuperResolutionUseCustomAttributes

    If set to true, AMD FidelityFX 2.0 Super Resolution (FSR2) will utilize the attributes (Optimal Settings and Sharpness) specified on this camera instead of the ones specified in the quality asset of this project.

    Declaration
    [Tooltip("If set to true, AMD FidelityFX 2.0 Super Resolution (FSR2) will utilize the attributes (Optimal Settings and Sharpness) specified on this camera, instead of the ones specified in the quality asset of this project.")]
    public bool fidelityFX2SuperResolutionUseCustomAttributes
    Field Value
    Type Description
    bool

    fidelityFX2SuperResolutionUseCustomQualitySettings

    If set to true, AMD FidelityFX 2.0 Super Resolution (FSR2) will utilize the Quality setting set on this camera instead of the one specified in the quality asset.

    Declaration
    [Tooltip("If set to true, AMD FidelityFX 2.0 Super Resolution (FSR2) will utilize the Quality setting set on this camera instead of the one specified in the quality asset.")]
    public bool fidelityFX2SuperResolutionUseCustomQualitySettings
    Field Value
    Type Description
    bool

    fidelityFX2SuperResolutionUseOptimalSettings

    Sets the scale automatically for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera, depending on the values of quality settings.

    Declaration
    [Tooltip("Sets the scale automatically for AMD FidelityFX 2.0 Super Resolution (FSR2) for this camera, depending on the values of quality settings.")]
    public bool fidelityFX2SuperResolutionUseOptimalSettings
    Field Value
    Type Description
    bool

    flipYMode

    Vertical flip mode.

    Declaration
    public HDAdditionalCameraData.FlipYMode flipYMode
    Field Value
    Type Description
    HDAdditionalCameraData.FlipYMode

    fsrOverrideSharpness

    If set to true, AMD FidelityFX Super Resolution (FSR) will utilize the sharpness setting set on this camera instead of the one specified in the quality asset.

    Declaration
    [Tooltip("If set to true, AMD FidelityFX Super Resolution (FSR) will utilize the sharpness setting set on this camera instead of the one specified in the quality asset.")]
    public bool fsrOverrideSharpness
    Field Value
    Type Description
    bool

    fsrSharpness

    Sets this camera's sharpness value for AMD FidelityFX Super Resolution.

    Declaration
    [Tooltip("Sets this camera's sharpness value for AMD FidelityFX Super Resolution 1.0 (FSR).")]
    [Range(0, 1)]
    public float fsrSharpness
    Field Value
    Type Description
    float

    fullscreenPassthrough

    Skips rendering settings to directly render in fullscreen (Useful for video).

    Declaration
    [Tooltip("Skips rendering settings to directly render in fullscreen (Useful for video).")]
    public bool fullscreenPassthrough
    Field Value
    Type Description
    bool

    hasPersistentHistory

    Enable to retain history buffers even if the camera is disabled.

    Declaration
    public bool hasPersistentHistory
    Field Value
    Type Description
    bool

    invertFaceCulling

    Invert face culling.

    Declaration
    public bool invertFaceCulling
    Field Value
    Type Description
    bool

    materialMipBias

    Mip bias used on texture samplers during material rendering

    Declaration
    public float materialMipBias
    Field Value
    Type Description
    float

    nonObliqueProjectionGetter

    Specify a custom getter for non oblique projection matrix.

    Declaration
    public HDAdditionalCameraData.NonObliqueProjectionGetter nonObliqueProjectionGetter
    Field Value
    Type Description
    HDAdditionalCameraData.NonObliqueProjectionGetter

    physicalParameters

    Physical camera parameters.

    Declaration
    [Obsolete("Physical camera properties have been migrated to Camera.", false)]
    public HDPhysicalCamera physicalParameters
    Field Value
    Type Description
    HDPhysicalCamera

    probeLayerMask

    Probe layer mask.

    Declaration
    public LayerMask probeLayerMask
    Field Value
    Type Description
    LayerMask

    renderingPathCustomFrameSettingsOverrideMask

    Mask specifying which frame settings are overridden when using custom frame settings.

    Declaration
    public FrameSettingsOverrideMask renderingPathCustomFrameSettingsOverrideMask
    Field Value
    Type Description
    FrameSettingsOverrideMask

    screenCoordScaleBias

    Transform used when Screen Coordinates Override is active.

    Declaration
    public Vector4 screenCoordScaleBias
    Field Value
    Type Description
    Vector4

    screenSizeOverride

    Screen size used when Screen Coordinates Override is active.

    Declaration
    public Vector4 screenSizeOverride
    Field Value
    Type Description
    Vector4

    stopNaNs

    Use a pass to eliminate NaNs contained in the color buffer before post-processing.

    Declaration
    public bool stopNaNs
    Field Value
    Type Description
    bool

    taaAntiFlicker

    Drive the anti-flicker mechanism. With high values flickering might be reduced, but it can lead to more ghosting or disocclusion artifacts.

    Declaration
    [Range(0, 1)]
    public float taaAntiFlicker
    Field Value
    Type Description
    float

    taaAntiHistoryRinging

    When enabled, ringing artifacts (dark or strangely saturated edges) caused by history sharpening will be improved. This comes at a potential loss of sharpness upon motion.

    Declaration
    public bool taaAntiHistoryRinging
    Field Value
    Type Description
    bool

    taaBaseBlendFactor

    Determines how much the history buffer is blended together with current frame result. Higher values means more history contribution.

    Declaration
    [Range(0.6, 0.95)]
    public float taaBaseBlendFactor
    Field Value
    Type Description
    float

    taaHistorySharpening

    Strength of the sharpening of the history sampled for TAA.

    Declaration
    [Range(0, 1)]
    public float taaHistorySharpening
    Field Value
    Type Description
    float

    taaJitterScale

    Scale to apply to the jittering applied when TAA is enabled.

    Declaration
    [Range(0.1, 1)]
    public float taaJitterScale
    Field Value
    Type Description
    float

    taaMotionVectorRejection

    Larger is this value, more likely history will be rejected when current and reprojected history motion vector differ by a substantial amount. Larger values can decrease ghosting but will also reintroduce aliasing on the aforementioned cases.

    Declaration
    [Range(0, 1)]
    public float taaMotionVectorRejection
    Field Value
    Type Description
    float

    taaRingingReduction

    How much to reduce the ringing from the TAA post-process sharpening. Note that some ringing might be visually desirable and that any value different than 0 will incur into a small additional cost.

    Declaration
    [Range(0, 1)]
    public float taaRingingReduction
    Field Value
    Type Description
    float

    taaSharpenMode

    How is the sharpening run sharpening.

    Declaration
    public HDAdditionalCameraData.TAASharpenMode taaSharpenMode
    Field Value
    Type Description
    HDAdditionalCameraData.TAASharpenMode

    taaSharpenStrength

    Strength of the sharpening component of temporal anti-aliasing.

    Declaration
    [Range(0, 2)]
    public float taaSharpenStrength
    Field Value
    Type Description
    float

    volumeAnchorOverride

    Optional transform override for the position where volumes are interpolated.

    Declaration
    public Transform volumeAnchorOverride
    Field Value
    Type Description
    Transform

    volumeLayerMask

    Layer mask used to select which volumes will influence this camera.

    Declaration
    [Tooltip("LayerMask HDRP uses for Volume interpolation for this Camera.")]
    public LayerMask volumeLayerMask
    Field Value
    Type Description
    LayerMask

    xrRendering

    Enable XR rendering.

    Declaration
    public bool xrRendering
    Field Value
    Type Description
    bool

    Properties

    aovRequests

    Use this property to get the aov requests.

    It is never null.

    Declaration
    public IEnumerable<AOVRequestData> aovRequests { get; }
    Property Value
    Type Description
    IEnumerable<AOVRequestData>

    hasCustomRender

    True if any Custom Render event is registered for this camera.

    Declaration
    public bool hasCustomRender { get; }
    Property Value
    Type Description
    bool

    isEditorCameraPreview

    Unity support two type of preview: Camera preview and material preview. This property allow to know that we are an editor camera preview when the type is preview.

    Declaration
    public bool isEditorCameraPreview { get; }
    Property Value
    Type Description
    bool

    renderingPathCustomFrameSettings

    Custom frame settings.

    Declaration
    public ref FrameSettings renderingPathCustomFrameSettings { get; }
    Property Value
    Type Description
    FrameSettings

    Methods

    CopyTo(HDAdditionalCameraData)

    Copy HDAdditionalCameraData.

    Declaration
    public void CopyTo(HDAdditionalCameraData data)
    Parameters
    Type Name Description
    HDAdditionalCameraData data

    Component to copy to.

    GetGraphicsBuffer(BufferAccessType)

    Returns the requested graphics buffer. Users should use the requestGraphicsBuffer event to make sure that the required buffers are requested first. Note that depending on the current frame settings some buffers may not be available.

    Declaration
    public RTHandle GetGraphicsBuffer(HDAdditionalCameraData.BufferAccessType type)
    Parameters
    Type Name Description
    HDAdditionalCameraData.BufferAccessType type

    Type of the requested buffer.

    Returns
    Type Description
    RTHandle

    Requested buffer as a RTHandle. Can be null if the buffer is not available.

    GetNonObliqueProjection(Camera)

    Returns the non oblique projection matrix for this camera.

    Declaration
    public Matrix4x4 GetNonObliqueProjection(Camera camera)
    Parameters
    Type Name Description
    Camera camera

    Requested camera.

    Returns
    Type Description
    Matrix4x4

    The non oblique projection matrix for this camera.

    SetAOVRequests(AOVRequestDataCollection)

    Set AOV requests to use.

    Declaration
    public void SetAOVRequests(AOVRequestDataCollection aovRequests)
    Parameters
    Type Name Description
    AOVRequestDataCollection aovRequests

    Describes the requests to execute.

    Examples
    using System.Collections.Generic;
    using UnityEngine;
    using UnityEngine.Rendering;
    using UnityEngine.Rendering.HighDefinition;
    using UnityEngine.Rendering.HighDefinition.Attributes;
    
    [ExecuteAlways]
    [RequireComponent(typeof(Camera))]
    [RequireComponent(typeof(HDAdditionalCameraData))]
    public class SetupAOVCallbacks : MonoBehaviour
    {
        private static RTHandle m_ColorRT;
    
        [SerializeField] private Texture m_Target;
        [SerializeField] private DebugFullScreen m_DebugFullScreen;
        [SerializeField] private DebugLightFilterMode m_DebugLightFilter;
        [SerializeField] private MaterialSharedProperty m_MaterialSharedProperty;
        [SerializeField] private LightingProperty m_LightingProperty;
        [SerializeField] private AOVBuffers m_BuffersToCopy;
        [SerializeField] private List<GameObject> m_IncludedLights;
    
    
        void OnEnable()
        {
            var aovRequest = new AOVRequest(AOVRequest.NewDefault())
                .SetLightFilter(m_DebugLightFilter);
            if (m_DebugFullScreen != DebugFullScreen.None)
                aovRequest = aovRequest.SetFullscreenOutput(m_DebugFullScreen);
            if (m_MaterialSharedProperty != MaterialSharedProperty.None)
                aovRequest = aovRequest.SetFullscreenOutput(m_MaterialSharedProperty);
            if (m_LightingProperty != LightingProperty.None)
                aovRequest = aovRequest.SetFullscreenOutput(m_LightingProperty);
    
            var add = GetComponent<HDAdditionalCameraData>();
            add.SetAOVRequests(
                new AOVRequestBuilder()
                    .Add(
                        aovRequest,
                        bufferId => m_ColorRT ?? (m_ColorRT = RTHandles.Alloc(512, 512)),
                        m_IncludedLights.Count > 0 ? m_IncludedLights : null,
                        new []{ m_BuffersToCopy },
                        (cmd, textures, properties) =>
                        {
                            if (m_Target != null)
                                cmd.Blit(textures[0], m_Target);
                        })
                    .Build()
            );
        }
    
        private void OnGUI()
        {
            GUI.DrawTexture(new Rect(10, 10, 512, 256), m_Target);
        }
    
        void OnDisable()
        {
            var add = GetComponent<HDAdditionalCameraData>();
            add.SetAOVRequests(null);
        }
    
        void OnValidate()
        {
            OnDisable();
            OnEnable();
        }
    }

    Example use case:

    • Export Normals: use MaterialSharedProperty.Normals and AOVBuffers.Color
    • Export Color before post processing: use AOVBuffers.Color
    • Export Color after post processing: use AOVBuffers.Output
    • Export Depth stencil: use AOVBuffers.DepthStencil
    • Export AO: use MaterialSharedProperty.AmbientOcclusion and AOVBuffers.Color

    Events

    customRender

    Event used to override HDRP rendering for this particular camera.

    Declaration
    public event Action<ScriptableRenderContext, HDCamera> customRender
    Event Type
    Type Description
    Action<ScriptableRenderContext, HDCamera>

    requestGraphicsBuffer

    RequestAccessDelegate used to request access to various buffers of this camera.

    Declaration
    public event HDAdditionalCameraData.RequestAccessDelegate requestGraphicsBuffer
    Event Type
    Type Description
    HDAdditionalCameraData.RequestAccessDelegate

    Implements

    IVersionable<TVersion>
    UnityEngine.Rendering.IDebugData
    UnityEngine.Rendering.IAdditionalData
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)