Class HDCamera | High Definition RP | 7.1.8
docs.unity3d.com
    Show / Hide Table of Contents

    Class HDCamera

    Inheritance
    Object
    HDCamera
    Namespace: UnityEngine.Rendering.HighDefinition
    Syntax
    public class HDCamera

    Constructors

    HDCamera(Camera)

    Declaration
    public HDCamera(Camera cam)
    Parameters
    Type Name Description
    Camera cam

    Fields

    camera

    Declaration
    public Camera camera
    Field Value
    Type Description
    Camera

    colorPyramidHistoryIsValid

    Declaration
    public bool colorPyramidHistoryIsValid
    Field Value
    Type Description
    Boolean

    colorPyramidHistoryMipCount

    Declaration
    public int colorPyramidHistoryMipCount
    Field Value
    Type Description
    Int32

    finalViewport

    Declaration
    public Rect finalViewport
    Field Value
    Type Description
    Rect

    frustum

    Declaration
    public Frustum frustum
    Field Value
    Type Description
    Frustum

    frustumPlaneEquations

    Declaration
    public Vector4[] frustumPlaneEquations
    Field Value
    Type Description
    Vector4[]

    mainViewConstants

    Declaration
    public HDCamera.ViewConstants mainViewConstants
    Field Value
    Type Description
    HDCamera.ViewConstants

    projectionParams

    Declaration
    public Vector4 projectionParams
    Field Value
    Type Description
    Vector4

    screenParams

    Declaration
    public Vector4 screenParams
    Field Value
    Type Description
    Vector4

    screenSize

    Declaration
    public Vector4 screenSize
    Field Value
    Type Description
    Vector4

    taaFrameIndex

    Declaration
    public int taaFrameIndex
    Field Value
    Type Description
    Int32

    taaJitter

    Declaration
    public Vector4 taaJitter
    Field Value
    Type Description
    Vector4

    taaSharpenStrength

    Declaration
    public float taaSharpenStrength
    Field Value
    Type Description
    Single

    unity_OrthoParams

    Declaration
    public Vector4 unity_OrthoParams
    Field Value
    Type Description
    Vector4

    vBufferParams

    Declaration
    public VBufferParameters[] vBufferParams
    Field Value
    Type Description
    VBufferParameters[]

    volumeAnchor

    Declaration
    public Transform volumeAnchor
    Field Value
    Type Description
    Transform

    volumeLayerMask

    Declaration
    public int volumeLayerMask
    Field Value
    Type Description
    Int32

    volumetricHistoryIsValid

    Declaration
    public bool volumetricHistoryIsValid
    Field Value
    Type Description
    Boolean

    xrViewConstants

    Declaration
    public HDCamera.ViewConstants[] xrViewConstants
    Field Value
    Type Description
    HDCamera.ViewConstants[]

    zBufferParams

    Declaration
    public Vector4 zBufferParams
    Field Value
    Type Description
    Vector4

    Properties

    actualHeight

    Declaration
    public int actualHeight { get; }
    Property Value
    Type Description
    Int32

    actualWidth

    Declaration
    public int actualWidth { get; }
    Property Value
    Type Description
    Int32

    antialiasing

    Declaration
    public HDAdditionalCameraData.AntialiasingMode antialiasing { get; }
    Property Value
    Type Description
    HDAdditionalCameraData.AntialiasingMode

    aovRequests

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

    backgroundColorHDR

    Declaration
    public Color backgroundColorHDR { get; }
    Property Value
    Type Description
    Color

    clearColorMode

    Declaration
    public HDAdditionalCameraData.ClearColorMode clearColorMode { get; }
    Property Value
    Type Description
    HDAdditionalCameraData.ClearColorMode

    clearDepth

    Declaration
    public bool clearDepth { get; }
    Property Value
    Type Description
    Boolean

    dithering

    Declaration
    public bool dithering { get; }
    Property Value
    Type Description
    Boolean

    flipYMode

    Declaration
    public HDAdditionalCameraData.FlipYMode flipYMode { get; }
    Property Value
    Type Description
    HDAdditionalCameraData.FlipYMode

    frameSettings

    Declaration
    public FrameSettings frameSettings { get; }
    Property Value
    Type Description
    FrameSettings

    historyRTHandleProperties

    Declaration
    public RTHandleProperties historyRTHandleProperties { get; }
    Property Value
    Type Description
    RTHandleProperties

    invertFaceCulling

    Declaration
    public bool invertFaceCulling { get; }
    Property Value
    Type Description
    Boolean

    invProjParam

    Declaration
    public Vector4 invProjParam { get; }
    Property Value
    Type Description
    Vector4

    isFirstFrame

    Declaration
    public bool isFirstFrame { get; }
    Property Value
    Type Description
    Boolean

    isMainGameView

    Declaration
    public bool isMainGameView { get; }
    Property Value
    Type Description
    Boolean

    msaaSamples

    Declaration
    public MSAASamples msaaSamples { get; }
    Property Value
    Type Description
    MSAASamples

    nonObliqueProjMatrix

    Declaration
    public Matrix4x4 nonObliqueProjMatrix { get; }
    Property Value
    Type Description
    Matrix4x4

    physicalParameters

    Declaration
    public HDPhysicalCamera physicalParameters { get; }
    Property Value
    Type Description
    HDPhysicalCamera

    probeLayerMask

    Declaration
    public LayerMask probeLayerMask { get; }
    Property Value
    Type Description
    LayerMask

    SMAAQuality

    Declaration
    public HDAdditionalCameraData.SMAAQualityLevel SMAAQuality { get; }
    Property Value
    Type Description
    HDAdditionalCameraData.SMAAQualityLevel

    stopNaNs

    Declaration
    public bool stopNaNs { get; }
    Property Value
    Type Description
    Boolean

    viewCount

    Declaration
    public int viewCount { get; }
    Property Value
    Type Description
    Int32

    xr

    Declaration
    public XRPass xr { get; }
    Property Value
    Type Description
    XRPass

    Methods

    AllocateAmbientOcclusionHistoryBuffer(Single)

    Declaration
    public void AllocateAmbientOcclusionHistoryBuffer(float scaleFactor)
    Parameters
    Type Name Description
    Single scaleFactor

    AllocHistoryFrameRT(Int32, Func<String, Int32, RTHandleSystem, RTHandle>, Int32)

    Declaration
    public RTHandle AllocHistoryFrameRT(int id, Func<string, int, RTHandleSystem, RTHandle> allocator, int bufferCount)
    Parameters
    Type Name Description
    Int32 id
    Func<String, Int32, RTHandleSystem, RTHandle> allocator
    Int32 bufferCount
    Returns
    Type Description
    RTHandle

    BeginRender(CommandBuffer)

    Declaration
    public void BeginRender(CommandBuffer cmd)
    Parameters
    Type Name Description
    CommandBuffer cmd

    CleanUnused()

    Declaration
    public static void CleanUnused()

    ClearAll()

    Declaration
    public static void ClearAll()

    ComputePixelCoordToWorldSpaceViewDirectionMatrix(HDCamera.ViewConstants, Vector4, Single)

    Compute the matrix from screen space (pixel) to world space direction (RHS).

    You can use this matrix on the GPU to compute the direction to look in a cubemap for a specific screen pixel.

    Declaration
    public Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(HDCamera.ViewConstants viewConstants, Vector4 resolution, float aspect = -1F)
    Parameters
    Type Name Description
    HDCamera.ViewConstants viewConstants
    Vector4 resolution

    The target texture resolution.

    Single aspect

    The aspect ratio to use.

    if negative, then the aspect ratio of resolution will be used.

    It is different from the aspect ratio of resolution for anamorphic projections.

    Returns
    Type Description
    Matrix4x4

    Dispose()

    Declaration
    public void Dispose()

    GetCurrentFrameRT(Int32)

    Declaration
    public RTHandle GetCurrentFrameRT(int id)
    Parameters
    Type Name Description
    Int32 id
    Returns
    Type Description
    RTHandle

    GetOrCreate(Camera, Int32)

    Declaration
    public static HDCamera GetOrCreate(Camera camera, int xrMultipassId = 0)
    Parameters
    Type Name Description
    Camera camera
    Int32 xrMultipassId
    Returns
    Type Description
    HDCamera

    GetPixelCoordToViewDirWS(Vector4, Single, ref Matrix4x4[])

    Declaration
    public void GetPixelCoordToViewDirWS(Vector4 resolution, float aspect, ref Matrix4x4[] transforms)
    Parameters
    Type Name Description
    Vector4 resolution
    Single aspect

    The aspect ratio to use.

    if negative, then the aspect ratio of resolution will be used.

    It is different from the aspect ratio of resolution for anamorphic projections.

    Matrix4x4[] transforms

    GetPreviousFrameRT(Int32)

    Declaration
    public RTHandle GetPreviousFrameRT(int id)
    Parameters
    Type Name Description
    Int32 id
    Returns
    Type Description
    RTHandle

    GetViewID()

    Declaration
    public long GetViewID()
    Returns
    Type Description
    Int64

    IsTAAEnabled()

    Declaration
    public bool IsTAAEnabled()
    Returns
    Type Description
    Boolean

    IsVolumetricReprojectionEnabled()

    Declaration
    public bool IsVolumetricReprojectionEnabled()
    Returns
    Type Description
    Boolean

    ReleaseHistoryFrameRT(Int32)

    Declaration
    public void ReleaseHistoryFrameRT(int id)
    Parameters
    Type Name Description
    Int32 id

    Reset()

    Declaration
    public void Reset()

    SetupGlobalParams(CommandBuffer, Single, Single, Int32)

    Declaration
    public void SetupGlobalParams(CommandBuffer cmd, float time, float lastTime, int frameCount)
    Parameters
    Type Name Description
    CommandBuffer cmd
    Single time
    Single lastTime
    Int32 frameCount

    Update(FrameSettings, HDRenderPipeline, MSAASamples, XRPass)

    Declaration
    public void Update(FrameSettings currentFrameSettings, HDRenderPipeline hdrp, MSAASamples msaaSamples, XRPass xrPass)
    Parameters
    Type Name Description
    FrameSettings currentFrameSettings
    HDRenderPipeline hdrp
    MSAASamples msaaSamples
    XRPass xrPass

    UpdateAllViewConstants(Boolean)

    Declaration
    public void UpdateAllViewConstants(bool jitterProjectionMatrix)
    Parameters
    Type Name Description
    Boolean jitterProjectionMatrix
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023