Class HDUtils | High Definition RP | 6.7.1-preview
docs.unity3d.com
    Show / Hide Table of Contents

    Class HDUtils

    Inheritance
    Object
    HDUtils
    Namespace: UnityEngine.Experimental.Rendering.HDPipeline
    Syntax
    public class HDUtils

    Fields

    k_RendererConfigurationBakedLighting

    Declaration
    public const PerObjectData k_RendererConfigurationBakedLighting = null
    Field Value
    Type Description
    PerObjectData

    k_RendererConfigurationBakedLightingWithShadowMask

    Declaration
    public const PerObjectData k_RendererConfigurationBakedLightingWithShadowMask = null
    Field Value
    Type Description
    PerObjectData

    Properties

    clearTexture3D

    Declaration
    public static Texture3D clearTexture3D { get; }
    Property Value
    Type Description
    Texture3D

    debugStep

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

    hdrpSettings

    Declaration
    public static RenderPipelineSettings hdrpSettings { get; }
    Property Value
    Type Description
    RenderPipelineSettings

    s_DefaultAdditionalShadowData

    Declaration
    public static AdditionalShadowData s_DefaultAdditionalShadowData { get; }
    Property Value
    Type Description
    AdditionalShadowData

    s_DefaultHDAdditionalCameraData

    Declaration
    public static HDAdditionalCameraData s_DefaultHDAdditionalCameraData { get; }
    Property Value
    Type Description
    HDAdditionalCameraData

    s_DefaultHDAdditionalLightData

    Declaration
    public static HDAdditionalLightData s_DefaultHDAdditionalLightData { get; }
    Property Value
    Type Description
    HDAdditionalLightData

    s_DefaultHDAdditionalReflectionData

    Declaration
    public static HDAdditionalReflectionData s_DefaultHDAdditionalReflectionData { get; }
    Property Value
    Type Description
    HDAdditionalReflectionData

    Methods

    BlitCameraTexture(CommandBuffer, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, Rect, Single, Boolean)

    Declaration
    public static void BlitCameraTexture(CommandBuffer cmd, RTHandleSystem.RTHandle source, RTHandleSystem.RTHandle destination, Rect destViewport, float mipLevel = 0F, bool bilinear = false)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle source
    RTHandleSystem.RTHandle destination
    Rect destViewport
    Single mipLevel
    Boolean bilinear

    BlitCameraTexture(CommandBuffer, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, Single, Boolean)

    Declaration
    public static void BlitCameraTexture(CommandBuffer cmd, RTHandleSystem.RTHandle source, RTHandleSystem.RTHandle destination, float mipLevel = 0F, bool bilinear = false)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle source
    RTHandleSystem.RTHandle destination
    Single mipLevel
    Boolean bilinear

    BlitCameraTexture(CommandBuffer, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, Vector4, Single, Boolean)

    Declaration
    public static void BlitCameraTexture(CommandBuffer cmd, RTHandleSystem.RTHandle source, RTHandleSystem.RTHandle destination, Vector4 scaleBias, float mipLevel = 0F, bool bilinear = false)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle source
    RTHandleSystem.RTHandle destination
    Vector4 scaleBias
    Single mipLevel
    Boolean bilinear

    BlitQuad(CommandBuffer, Texture, Vector4, Vector4, Int32, Boolean)

    Declaration
    public static void BlitQuad(CommandBuffer cmd, Texture source, Vector4 scaleBiasTex, Vector4 scaleBiasRT, int mipLevelTex, bool bilinear)
    Parameters
    Type Name Description
    CommandBuffer cmd
    Texture source
    Vector4 scaleBiasTex
    Vector4 scaleBiasRT
    Int32 mipLevelTex
    Boolean bilinear

    BlitTexture(CommandBuffer, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, Vector4, Single, Boolean)

    Declaration
    public static void BlitTexture(CommandBuffer cmd, RTHandleSystem.RTHandle source, RTHandleSystem.RTHandle destination, Vector4 scaleBias, float mipLevel, bool bilinear)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle source
    RTHandleSystem.RTHandle destination
    Vector4 scaleBias
    Single mipLevel
    Boolean bilinear

    CheckRTCreated(RenderTexture)

    Declaration
    public static void CheckRTCreated(RenderTexture rt)
    Parameters
    Type Name Description
    RenderTexture rt

    ComputeLinearDistanceFade(Single, Single)

    Declaration
    public static float ComputeLinearDistanceFade(float distanceToCamera, float fadeDistance)
    Parameters
    Type Name Description
    Single distanceToCamera
    Single fadeDistance
    Returns
    Type Description
    Single

    ComputePixelCoordToWorldSpaceViewDirectionMatrix(Single, Vector2, Vector4, Matrix4x4, Boolean)

    Declaration
    public static Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(float verticalFoV, Vector2 lensShift, Vector4 screenSize, Matrix4x4 worldToViewMatrix, bool renderToCubemap)
    Parameters
    Type Name Description
    Single verticalFoV
    Vector2 lensShift
    Vector4 screenSize
    Matrix4x4 worldToViewMatrix
    Boolean renderToCubemap
    Returns
    Type Description
    Matrix4x4

    ComputeUvScaleAndLimit(Vector2Int, Vector2Int)

    Declaration
    public static Vector4 ComputeUvScaleAndLimit(Vector2Int viewportResolution, Vector2Int bufferSize)
    Parameters
    Type Name Description
    Vector2Int viewportResolution
    Vector2Int bufferSize
    Returns
    Type Description
    Vector4

    ComputZPlaneTexelSpacing(Single, Single, Single)

    Declaration
    public static float ComputZPlaneTexelSpacing(float planeDepth, float verticalFoV, float resolutionY)
    Parameters
    Type Name Description
    Single planeDepth
    Single verticalFoV
    Single resolutionY
    Returns
    Type Description
    Single

    ConvertGUIDToVector4(String)

    Declaration
    public static Vector4 ConvertGUIDToVector4(string guid)
    Parameters
    Type Name Description
    String guid
    Returns
    Type Description
    Vector4

    ConvertVector4ToGUID(Vector4)

    Declaration
    public static string ConvertVector4ToGUID(Vector4 vector)
    Parameters
    Type Name Description
    Vector4 vector
    Returns
    Type Description
    String

    DivRoundUp(Int32, Int32)

    Declaration
    public static int DivRoundUp(int x, int y)
    Parameters
    Type Name Description
    Int32 x
    Int32 y
    Returns
    Type Description
    Int32

    DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier[], RTHandleSystem.RTHandle, MaterialPropertyBlock, Int32)

    Declaration
    public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RenderTargetIdentifier[] colorBuffers, RTHandleSystem.RTHandle depthStencilBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
    Parameters
    Type Name Description
    CommandBuffer commandBuffer
    Material material
    RenderTargetIdentifier[] colorBuffers
    RTHandleSystem.RTHandle depthStencilBuffer
    MaterialPropertyBlock properties
    Int32 shaderPassId

    DrawFullScreen(CommandBuffer, Material, RTHandleSystem.RTHandle, MaterialPropertyBlock, Int32)

    Declaration
    public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RTHandleSystem.RTHandle colorBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
    Parameters
    Type Name Description
    CommandBuffer commandBuffer
    Material material
    RTHandleSystem.RTHandle colorBuffer
    MaterialPropertyBlock properties
    Int32 shaderPassId

    DrawFullScreen(CommandBuffer, Material, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, MaterialPropertyBlock, Int32)

    Declaration
    public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RTHandleSystem.RTHandle colorBuffer, RTHandleSystem.RTHandle depthStencilBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
    Parameters
    Type Name Description
    CommandBuffer commandBuffer
    Material material
    RTHandleSystem.RTHandle colorBuffer
    RTHandleSystem.RTHandle depthStencilBuffer
    MaterialPropertyBlock properties
    Int32 shaderPassId

    DrawFullScreen(CommandBuffer, Rect, Material, RenderTargetIdentifier, MaterialPropertyBlock, Int32)

    Declaration
    public static void DrawFullScreen(CommandBuffer commandBuffer, Rect viewport, Material material, RenderTargetIdentifier destination, MaterialPropertyBlock properties = null, int shaderPassId = 0)
    Parameters
    Type Name Description
    CommandBuffer commandBuffer
    Rect viewport
    Material material
    RenderTargetIdentifier destination
    MaterialPropertyBlock properties
    Int32 shaderPassId

    DrawFullScreen(CommandBuffer, RTHandleProperties, Material, RenderTargetIdentifier, MaterialPropertyBlock, Int32)

    Declaration
    public static void DrawFullScreen(CommandBuffer commandBuffer, RTHandleProperties rtHandleProperties, Material material, RenderTargetIdentifier colorBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
    Parameters
    Type Name Description
    CommandBuffer commandBuffer
    RTHandleProperties rtHandleProperties
    Material material
    RenderTargetIdentifier colorBuffer
    MaterialPropertyBlock properties
    Int32 shaderPassId

    DrawRendererList(ScriptableRenderContext, CommandBuffer, RendererList)

    Declaration
    public static void DrawRendererList(ScriptableRenderContext renderContext, CommandBuffer cmd, RendererList rendererList)
    Parameters
    Type Name Description
    ScriptableRenderContext renderContext
    CommandBuffer cmd
    RendererList rendererList

    GetBlitMaterial(TextureDimension)

    Declaration
    public static Material GetBlitMaterial(TextureDimension dimension)
    Parameters
    Type Name Description
    TextureDimension dimension
    Returns
    Type Description
    Material

    GetCorePath()

    Declaration
    public static string GetCorePath()
    Returns
    Type Description
    String

    GetHDRenderPipelinePath()

    Declaration
    public static string GetHDRenderPipelinePath()
    Returns
    Type Description
    String

    GetMouseClickCoordinates(HDCamera)

    Declaration
    public static Vector4 GetMouseClickCoordinates(HDCamera camera)
    Parameters
    Type Name Description
    HDCamera camera
    Returns
    Type Description
    Vector4

    GetMouseCoordinates(HDCamera)

    Declaration
    public static Vector4 GetMouseCoordinates(HDCamera camera)
    Parameters
    Type Name Description
    HDCamera camera
    Returns
    Type Description
    Vector4

    GetRenderPipelineMaterialList()

    Declaration
    public static List<RenderPipelineMaterial> GetRenderPipelineMaterialList()
    Returns
    Type Description
    List<RenderPipelineMaterial>

    GetScaleAndBiasForLinearDistanceFade(Single, out Single, out Single)

    Declaration
    public static void GetScaleAndBiasForLinearDistanceFade(float fadeDistance, out float scale, out float bias)
    Parameters
    Type Name Description
    Single fadeDistance
    Single scale
    Single bias

    GetViewProjectionMatrix(Matrix4x4, Matrix4x4)

    Declaration
    public static Matrix4x4 GetViewProjectionMatrix(Matrix4x4 worldToViewMatrix, Matrix4x4 projectionMatrix)
    Parameters
    Type Name Description
    Matrix4x4 worldToViewMatrix
    Matrix4x4 projectionMatrix
    Returns
    Type Description
    Matrix4x4

    IsOperatingSystemSupported(String)

    Declaration
    public static bool IsOperatingSystemSupported(string os)
    Parameters
    Type Name Description
    String os
    Returns
    Type Description
    Boolean

    IsQuaternionValid(Quaternion)

    Declaration
    public static bool IsQuaternionValid(Quaternion q)
    Parameters
    Type Name Description
    Quaternion q
    Returns
    Type Description
    Boolean

    IsRegularPreviewCamera(Camera)

    Declaration
    public static bool IsRegularPreviewCamera(Camera camera)
    Parameters
    Type Name Description
    Camera camera
    Returns
    Type Description
    Boolean

    IsSupportedGraphicDevice(GraphicsDeviceType)

    Declaration
    public static bool IsSupportedGraphicDevice(GraphicsDeviceType graphicDevice)
    Parameters
    Type Name Description
    GraphicsDeviceType graphicDevice
    Returns
    Type Description
    Boolean

    NextOverlayCoord(ref Single, ref Single, Single, Single, HDCamera)

    Declaration
    public static void NextOverlayCoord(ref float x, ref float y, float overlayWidth, float overlayHeight, HDCamera hdCamera)
    Parameters
    Type Name Description
    Single x
    Single y
    Single overlayWidth
    Single overlayHeight
    HDCamera hdCamera

    NormalizeColor(Color)

    Declaration
    public static Color NormalizeColor(Color color)
    Parameters
    Type Name Description
    Color color
    Returns
    Type Description
    Color

    PostProcessIsFinalPass()

    Declaration
    public static bool PostProcessIsFinalPass()
    Returns
    Type Description
    Boolean

    ResetOverlay()

    Declaration
    public static void ResetOverlay()

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandleSystem.RTHandle)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RTHandleSystem.RTHandle depthBuffer)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RenderTargetIdentifier[] colorBuffers
    RTHandleSystem.RTHandle depthBuffer

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandleSystem.RTHandle, ClearFlag)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RTHandleSystem.RTHandle depthBuffer, ClearFlag clearFlag = null)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RenderTargetIdentifier[] colorBuffers
    RTHandleSystem.RTHandle depthBuffer
    ClearFlag clearFlag

    SetRenderTarget(CommandBuffer, RenderTargetIdentifier[], RTHandleSystem.RTHandle, ClearFlag, Color)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RenderTargetIdentifier[] colorBuffers, RTHandleSystem.RTHandle depthBuffer, ClearFlag clearFlag, Color clearColor)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RenderTargetIdentifier[] colorBuffers
    RTHandleSystem.RTHandle depthBuffer
    ClearFlag clearFlag
    Color clearColor

    SetRenderTarget(CommandBuffer, RTHandleSystem.RTHandle, ClearFlag, Color, Int32, CubemapFace, Int32)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandleSystem.RTHandle buffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle buffer
    ClearFlag clearFlag
    Color clearColor
    Int32 miplevel
    CubemapFace cubemapFace
    Int32 depthSlice

    SetRenderTarget(CommandBuffer, RTHandleSystem.RTHandle, ClearFlag, Int32, CubemapFace, Int32)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandleSystem.RTHandle buffer, ClearFlag clearFlag = null, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle buffer
    ClearFlag clearFlag
    Int32 miplevel
    CubemapFace cubemapFace
    Int32 depthSlice

    SetRenderTarget(CommandBuffer, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, ClearFlag, Color, Int32, CubemapFace, Int32)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandleSystem.RTHandle colorBuffer, RTHandleSystem.RTHandle depthBuffer, ClearFlag clearFlag, Color clearColor, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle colorBuffer
    RTHandleSystem.RTHandle depthBuffer
    ClearFlag clearFlag
    Color clearColor
    Int32 miplevel
    CubemapFace cubemapFace
    Int32 depthSlice

    SetRenderTarget(CommandBuffer, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, ClearFlag, Int32, CubemapFace, Int32)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandleSystem.RTHandle colorBuffer, RTHandleSystem.RTHandle depthBuffer, ClearFlag clearFlag, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle colorBuffer
    RTHandleSystem.RTHandle depthBuffer
    ClearFlag clearFlag
    Int32 miplevel
    CubemapFace cubemapFace
    Int32 depthSlice

    SetRenderTarget(CommandBuffer, RTHandleSystem.RTHandle, RTHandleSystem.RTHandle, Int32, CubemapFace, Int32)

    Declaration
    public static void SetRenderTarget(CommandBuffer cmd, RTHandleSystem.RTHandle colorBuffer, RTHandleSystem.RTHandle depthBuffer, int miplevel = 0, CubemapFace cubemapFace = null, int depthSlice = -1)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle colorBuffer
    RTHandleSystem.RTHandle depthBuffer
    Int32 miplevel
    CubemapFace cubemapFace
    Int32 depthSlice

    SetViewport(CommandBuffer, RTHandleSystem.RTHandle)

    Declaration
    public static void SetViewport(CommandBuffer cmd, RTHandleSystem.RTHandle target)
    Parameters
    Type Name Description
    CommandBuffer cmd
    RTHandleSystem.RTHandle target
    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