Class HDShadowUtils
Inheritance
HDShadowUtils
Syntax
public static class HDShadowUtils
Fields
k_MinShadowNearPlane
Declaration
public static readonly float k_MinShadowNearPlane
Field Value
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
Asfloat(UInt32)
Declaration
public static float Asfloat(uint val)
Parameters
| Type |
Name |
Description |
| UInt32 |
val |
|
Returns
Asint(Single)
Declaration
public static int Asint(float val)
Parameters
| Type |
Name |
Description |
| Single |
val |
|
Returns
Asuint(Single)
Declaration
public static uint Asuint(float val)
Parameters
| Type |
Name |
Description |
| Single |
val |
|
Returns
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
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
Returns
| Type |
Description |
| Matrix4x4 |
|