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

    Class HDShadowUtils

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

    Fields

    k_MinShadowNearPlane

    Declaration
    public static readonly float k_MinShadowNearPlane
    Field Value
    Type Description
    Single

    kCubemapFaces

    Declaration
    public static readonly Matrix4x4[] kCubemapFaces
    Field Value
    Type Description
    Matrix4x4[]

    Methods

    Asfloat(Int32)

    Declaration
    public static float Asfloat(int val)
    Parameters
    Type Name Description
    Int32 val
    Returns
    Type Description
    Single

    Asfloat(UInt32)

    Declaration
    public static float Asfloat(uint val)
    Parameters
    Type Name Description
    UInt32 val
    Returns
    Type Description
    Single

    Asint(Single)

    Declaration
    public static int Asint(float val)
    Parameters
    Type Name Description
    Single val
    Returns
    Type Description
    Int32

    Asuint(Single)

    Declaration
    public static uint Asuint(float val)
    Parameters
    Type Name Description
    Single val
    Returns
    Type Description
    UInt32

    ExtractAreaLightData(HDCamera, VisibleLight, LightTypeExtent, Vector3, Single, Single, Vector2, Vector2, Single, out Matrix4x4, out Matrix4x4, out Matrix4x4, out Matrix4x4, out ShadowSplitData)

    Declaration
    public static void ExtractAreaLightData(HDCamera camera, VisibleLight visibleLight, LightTypeExtent lightTypeExtent, Vector3 shadowPosition, float areaLightShadowCone, float shadowNearPlane, Vector2 shapeSize, Vector2 viewportSize, float normalBiasMax, out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData)
    Parameters
    Type Name Description
    HDCamera camera
    VisibleLight visibleLight
    LightTypeExtent lightTypeExtent
    Vector3 shadowPosition
    Single areaLightShadowCone
    Single shadowNearPlane
    Vector2 shapeSize
    Vector2 viewportSize
    Single normalBiasMax
    Matrix4x4 view
    Matrix4x4 invViewProjection
    Matrix4x4 projection
    Matrix4x4 deviceProjection
    ShadowSplitData splitData

    ExtractBoxLightProjectionMatrix(Single, Single, Single, Single)

    Declaration
    public static Matrix4x4 ExtractBoxLightProjectionMatrix(float range, float width, float height, float nearPlane)
    Parameters
    Type Name Description
    Single range
    Single width
    Single height
    Single nearPlane
    Returns
    Type Description
    Matrix4x4

    ExtractDirectionalLightData(VisibleLight, Vector2, UInt32, Int32, Single[], Single, CullingResults, Int32, out Matrix4x4, out Matrix4x4, out Matrix4x4, out Matrix4x4, out ShadowSplitData)

    Declaration
    public static void ExtractDirectionalLightData(VisibleLight visibleLight, Vector2 viewportSize, uint cascadeIndex, int cascadeCount, float[] cascadeRatios, float nearPlaneOffset, CullingResults cullResults, int lightIndex, out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData)
    Parameters
    Type Name Description
    VisibleLight visibleLight
    Vector2 viewportSize
    UInt32 cascadeIndex
    Int32 cascadeCount
    Single[] cascadeRatios
    Single nearPlaneOffset
    CullingResults cullResults
    Int32 lightIndex
    Matrix4x4 view
    Matrix4x4 invViewProjection
    Matrix4x4 projection
    Matrix4x4 deviceProjection
    ShadowSplitData splitData

    ExtractPointLightData(HDCamera, LightType, VisibleLight, Vector2, Single, Single, UInt32, out Matrix4x4, out Matrix4x4, out Matrix4x4, out Matrix4x4, out ShadowSplitData)

    Declaration
    public static void ExtractPointLightData(HDCamera camera, LightType lightType, VisibleLight visibleLight, Vector2 viewportSize, float nearPlane, float normalBiasMax, uint faceIndex, out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData)
    Parameters
    Type Name Description
    HDCamera camera
    LightType lightType
    VisibleLight visibleLight
    Vector2 viewportSize
    Single nearPlane
    Single normalBiasMax
    UInt32 faceIndex
    Matrix4x4 view
    Matrix4x4 invViewProjection
    Matrix4x4 projection
    Matrix4x4 deviceProjection
    ShadowSplitData splitData

    ExtractSpotLightData(HDCamera, LightType, SpotLightShape, Single, Single, Single, Single, VisibleLight, Vector2, Single, out Matrix4x4, out Matrix4x4, out Matrix4x4, out Matrix4x4, out ShadowSplitData)

    Declaration
    public static void ExtractSpotLightData(HDCamera camera, LightType lightType, SpotLightShape shape, float nearPlane, float aspectRatio, float shapeWidth, float shapeHeight, VisibleLight visibleLight, Vector2 viewportSize, float normalBiasMax, out Matrix4x4 view, out Matrix4x4 invViewProjection, out Matrix4x4 projection, out Matrix4x4 deviceProjection, out ShadowSplitData splitData)
    Parameters
    Type Name Description
    HDCamera camera
    LightType lightType
    SpotLightShape shape
    Single nearPlane
    Single aspectRatio
    Single shapeWidth
    Single shapeHeight
    VisibleLight visibleLight
    Vector2 viewportSize
    Single normalBiasMax
    Matrix4x4 view
    Matrix4x4 invViewProjection
    Matrix4x4 projection
    Matrix4x4 deviceProjection
    ShadowSplitData splitData

    ExtractSpotLightProjectionMatrix(Single, Single, Single, Single, Single)

    Declaration
    public static Matrix4x4 ExtractSpotLightProjectionMatrix(float range, float spotAngle, float nearPlane, float aspectRatio, float guardAngle)
    Parameters
    Type Name Description
    Single range
    Single spotAngle
    Single nearPlane
    Single aspectRatio
    Single guardAngle
    Returns
    Type Description
    Matrix4x4
    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