Class HDUtils
Syntax
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 |
|
clearTexture3DRTH
Declaration
public static RTHandle clearTexture3DRTH { get; }
Property Value
Type |
Description |
RTHandle |
|
hdrpSettings
Declaration
public static RenderPipelineSettings hdrpSettings { get; }
Property Value
s_DefaultHDAdditionalCameraData
Default HDAdditionalCameraData
Declaration
public static HDAdditionalCameraData s_DefaultHDAdditionalCameraData { get; }
Property Value
s_DefaultHDAdditionalLightData
Default HDAdditionalLightData
Declaration
public static HDAdditionalLightData s_DefaultHDAdditionalLightData { get; }
Property Value
s_DefaultHDAdditionalReflectionData
Default HDAdditionalReflectionData
Declaration
public static HDAdditionalReflectionData s_DefaultHDAdditionalReflectionData { get; }
Property Value
Methods
BlitCameraTexture(CommandBuffer, RTHandle, RTHandle, Rect, Single, Boolean)
Declaration
public static void BlitCameraTexture(CommandBuffer cmd, RTHandle source, RTHandle destination, Rect destViewport, float mipLevel = 0F, bool bilinear = false)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RTHandle |
source |
|
RTHandle |
destination |
|
Rect |
destViewport |
|
Single |
mipLevel |
|
Boolean |
bilinear |
|
BlitCameraTexture(CommandBuffer, RTHandle, RTHandle, Single, Boolean)
Declaration
public static void BlitCameraTexture(CommandBuffer cmd, RTHandle source, RTHandle destination, float mipLevel = 0F, bool bilinear = false)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RTHandle |
source |
|
RTHandle |
destination |
|
Single |
mipLevel |
|
Boolean |
bilinear |
|
BlitCameraTexture(CommandBuffer, RTHandle, RTHandle, Vector4, Single, Boolean)
Declaration
public static void BlitCameraTexture(CommandBuffer cmd, RTHandle source, RTHandle destination, Vector4 scaleBias, float mipLevel = 0F, bool bilinear = false)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RTHandle |
source |
|
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, RTHandle, Vector4, Single, Boolean)
Declaration
public static void BlitTexture(CommandBuffer cmd, RTHandle source, Vector4 scaleBias, float mipLevel, bool bilinear)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
RTHandle |
source |
|
Vector4 |
scaleBias |
|
Single |
mipLevel |
|
Boolean |
bilinear |
|
CheckRTCreated(RenderTexture)
Declaration
public static void CheckRTCreated(RenderTexture rt)
Parameters
Type |
Name |
Description |
RenderTexture |
rt |
|
ComputeLinearDistanceFade(Single, Single)
Compute the linear fade distance
Declaration
public static float ComputeLinearDistanceFade(float distanceToCamera, float fadeDistance)
Parameters
Type |
Name |
Description |
Single |
distanceToCamera |
Distance from the object to fade from the camera
|
Single |
fadeDistance |
Distance at witch the object is totally faded
|
Returns
Type |
Description |
Single |
Computed fade factor
|
ComputePixelCoordToWorldSpaceViewDirectionMatrix(Single, Vector2, Vector4, Matrix4x4, Boolean, Single)
Declaration
public static Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(float verticalFoV, Vector2 lensShift, Vector4 screenSize, Matrix4x4 worldToViewMatrix, bool renderToCubemap, float aspectRatio = -1F)
Parameters
Type |
Name |
Description |
Single |
verticalFoV |
|
Vector2 |
lensShift |
|
Vector4 |
screenSize |
|
Matrix4x4 |
worldToViewMatrix |
|
Boolean |
renderToCubemap |
|
Single |
aspectRatio |
|
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
ComputeWeightedLinearFadeDistance(Vector3, Vector3, Single, Single)
Compute the linear fade distance between two position with an additional weight multiplier
Declaration
public static float ComputeWeightedLinearFadeDistance(Vector3 position1, Vector3 position2, float weight, float fadeDistance)
Parameters
Type |
Name |
Description |
Vector3 |
position1 |
Object/camera position
|
Vector3 |
position2 |
Camera/object position
|
Single |
weight |
Weight multiplior
|
Single |
fadeDistance |
Distance at witch the object is totally faded
|
Returns
Type |
Description |
Single |
Computed fade factor
|
ComputZPlaneTexelSpacing(Single, Single, Single)
Declaration
public static float ComputZPlaneTexelSpacing(float planeDepth, float verticalFoV, float resolutionY)
Parameters
Returns
ConvertGUIDToVector4(String)
Declaration
public static Vector4 ConvertGUIDToVector4(string guid)
Parameters
Type |
Name |
Description |
String |
guid |
|
Returns
ConvertVector4ToGUID(Vector4)
Declaration
public static string ConvertVector4ToGUID(Vector4 vector)
Parameters
Type |
Name |
Description |
Vector4 |
vector |
|
Returns
DivRoundUp(Int32, Int32)
Declaration
public static int DivRoundUp(int x, int y)
Parameters
Returns
DrawFullScreen(CommandBuffer, Material, RenderTargetIdentifier[], RTHandle, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RenderTargetIdentifier[] colorBuffers, RTHandle depthStencilBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
Parameters
Type |
Name |
Description |
CommandBuffer |
commandBuffer |
|
Material |
material |
|
RenderTargetIdentifier[] |
colorBuffers |
|
RTHandle |
depthStencilBuffer |
|
MaterialPropertyBlock |
properties |
|
Int32 |
shaderPassId |
|
DrawFullScreen(CommandBuffer, Material, RTHandle, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RTHandle colorBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
Parameters
Type |
Name |
Description |
CommandBuffer |
commandBuffer |
|
Material |
material |
|
RTHandle |
colorBuffer |
|
MaterialPropertyBlock |
properties |
|
Int32 |
shaderPassId |
|
DrawFullScreen(CommandBuffer, Material, RTHandle, RTHandle, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Material material, RTHandle colorBuffer, RTHandle depthStencilBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
Parameters
Type |
Name |
Description |
CommandBuffer |
commandBuffer |
|
Material |
material |
|
RTHandle |
colorBuffer |
|
RTHandle |
depthStencilBuffer |
|
MaterialPropertyBlock |
properties |
|
Int32 |
shaderPassId |
|
DrawFullScreen(CommandBuffer, Rect, Material, RenderTargetIdentifier, MaterialPropertyBlock, Int32, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Rect viewport, Material material, RenderTargetIdentifier destination, MaterialPropertyBlock properties = null, int shaderPassId = 0, int depthSlice = -1)
Parameters
Type |
Name |
Description |
CommandBuffer |
commandBuffer |
|
Rect |
viewport |
|
Material |
material |
|
RenderTargetIdentifier |
destination |
|
MaterialPropertyBlock |
properties |
|
Int32 |
shaderPassId |
|
Int32 |
depthSlice |
|
DrawFullScreen(CommandBuffer, Rect, Material, RenderTargetIdentifier, RTHandle, MaterialPropertyBlock, Int32)
Declaration
public static void DrawFullScreen(CommandBuffer commandBuffer, Rect viewport, Material material, RenderTargetIdentifier destination, RTHandle depthStencilBuffer, MaterialPropertyBlock properties = null, int shaderPassId = 0)
Parameters
Type |
Name |
Description |
CommandBuffer |
commandBuffer |
|
Rect |
viewport |
|
Material |
material |
|
RenderTargetIdentifier |
destination |
|
RTHandle |
depthStencilBuffer |
|
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, Boolean)
Declaration
public static Material GetBlitMaterial(TextureDimension dimension, bool singleSlice = false)
Parameters
Type |
Name |
Description |
TextureDimension |
dimension |
|
Boolean |
singleSlice |
|
Returns
Type |
Description |
Material |
|
GetCorePath()
Declaration
public static string GetCorePath()
Returns
GetHDRenderPipelinePath()
Declaration
public static string GetHDRenderPipelinePath()
Returns
GetMouseClickCoordinates(HDCamera)
Declaration
public static Vector4 GetMouseClickCoordinates(HDCamera camera)
Parameters
Returns
GetMouseCoordinates(HDCamera)
Declaration
public static Vector4 GetMouseCoordinates(HDCamera camera)
Parameters
Returns
GetScaleAndBiasForLinearDistanceFade(Single, out Single, out Single)
Extract scale and bias from a fade distance to achieve a linear fading starting at 90% of the fade distance.
Declaration
public static void GetScaleAndBiasForLinearDistanceFade(float fadeDistance, out float scale, out float bias)
Parameters
Type |
Name |
Description |
Single |
fadeDistance |
Distance at which object should be totally fade
|
Single |
scale |
[OUT] Slope of the fading on the fading part
|
Single |
bias |
[OUT] Ordinate of the fading part at abscissa 0
|
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
IsQuaternionValid(Quaternion)
Declaration
public static bool IsQuaternionValid(Quaternion q)
Parameters
Type |
Name |
Description |
Quaternion |
q |
|
Returns
IsRegularPreviewCamera(Camera)
Declaration
public static bool IsRegularPreviewCamera(Camera camera)
Parameters
Type |
Name |
Description |
Camera |
camera |
|
Returns
IsSupportedGraphicDevice(GraphicsDeviceType)
Declaration
public static bool IsSupportedGraphicDevice(GraphicsDeviceType graphicDevice)
Parameters
Type |
Name |
Description |
GraphicsDeviceType |
graphicDevice |
|
Returns
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
NormalizeColor(Color)
Declaration
public static Color NormalizeColor(Color color)
Parameters
Type |
Name |
Description |
Color |
color |
|
Returns
PostProcessIsFinalPass()
Declaration
public static bool PostProcessIsFinalPass()
Returns
ProjectionMatrixAspect(Matrix4x4)
Get the aspect ratio of a projection matrix.
Declaration
public static float ProjectionMatrixAspect(in Matrix4x4 matrix)
Parameters
Type |
Name |
Description |
Matrix4x4 |
matrix |
|
Returns
ResetOverlay()
Declaration
public static void ResetOverlay()