Class HDRenderPipeline
High Definition Render Pipeline class.
Implements
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
public class HDRenderPipeline : RenderPipeline, IDataProvider
Constructors
HDRenderPipeline(HDRenderPipelineAsset)
HDRenderPipeline constructor.
Declaration
public HDRenderPipeline(HDRenderPipelineAsset asset)
Parameters
Type | Name | Description |
---|---|---|
HDRenderPipelineAsset | asset | Source HDRenderPipelineAsset. |
HDRenderPipeline(HDRenderPipelineAsset, HDRenderPipelineAsset)
HDRenderPipeline constructor.
Declaration
public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset obsolete_defaultAsset)
Parameters
Type | Name | Description |
---|---|---|
HDRenderPipelineAsset | asset | Source HDRenderPipelineAsset. |
HDRenderPipelineAsset | obsolete_defaultAsset | Default HDRenderPipelineAsset. [Obsolete] |
Fields
k_ShaderTagName
Shader Tag for the High Definition Render Pipeline.
Declaration
public const string k_ShaderTagName = "HDRenderPipeline"
Field Value
Type | Description |
---|---|
string |
Properties
debugDisplaySettings
Debug display settings.
Declaration
public DebugDisplaySettings debugDisplaySettings { get; }
Property Value
Type | Description |
---|---|
DebugDisplaySettings |
defaultSettings
Accessor to the active Global Settings for the HD Render Pipeline.
Declaration
public override RenderPipelineGlobalSettings defaultSettings { get; }
Property Value
Type | Description |
---|---|
RenderPipelineGlobalSettings |
Overrides
rayTracingSupported
Flag that defines if ray tracing is supported by the current HDRP asset and platform
Declaration
public bool rayTracingSupported { get; }
Property Value
Type | Description |
---|---|
bool |
Methods
BeginRecording(int, float, float, float)
Should be called to start a multi-frame recording session. Each final frame will be an accumulation of multiple sub-frames.
Declaration
public void BeginRecording(int samples, float shutterInterval, float shutterFullyOpen = 0, float shutterBeginsClosing = 1)
Parameters
Type | Name | Description |
---|---|---|
int | samples | The number of subframes. Each recorded frame will be an accumulation of this number of framesIn case path tracing is enabled, this value will override the settign in the volume. |
float | shutterInterval | The duration the shutter of the virtual camera is open (for motion blur). Between 0 and 1. |
float | shutterFullyOpen | The time it takes for the shutter to fully open. Between 0 and 1. |
float | shutterBeginsClosing | The time when the shutter starts closing. Between 0 and 1. |
BeginRecording(int, float, AnimationCurve)
Should be called to start a multi-frame recording session. Each final frame will be an accumulation of multiple sub-frames.
Declaration
public void BeginRecording(int samples, float shutterInterval, AnimationCurve shutterProfile)
Parameters
Type | Name | Description |
---|---|---|
int | samples | The number of subframes. Each recorded frame will be an accumulation of this number of frames. In case path tracing is enabled, this value will override the settign in the volume. |
float | shutterInterval | The duration the shutter of the virtual camera is open (for motion blur). Between 0 and 1. |
AnimationCurve | shutterProfile | An animation curve (between 0 and 1) denoting the motion of the camera shutter. |
Dispose(bool)
Disposable pattern implementation.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing | Is disposing. |
Overrides
EndRecording()
Should be called to finish a multi-frame recording session
Declaration
public void EndRecording()
ExportSkyToTexture(Camera)
Export the provided camera's sky to a flattened cubemap.
Declaration
public Texture2D ExportSkyToTexture(Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | Requested camera. |
Returns
Type | Description |
---|---|
Texture2D | Result texture. |
GetMainLight()
Main directional Light for the HD Render Pipeline.
Declaration
public Light GetMainLight()
Returns
Type | Description |
---|---|
Light | The main directional Light. |
GetRaysPerFrame(RayCountValues)
This functions allows the user to have an approximation of the number of rays that were traced for a given frame.
Declaration
public uint GetRaysPerFrame(RayCountValues rayValues)
Parameters
Type | Name | Description |
---|---|---|
RayCountValues | rayValues | Specifes which ray count value should be returned. |
Returns
Type | Description |
---|---|
uint | The approximated ray count for a frame |
IsFrameCompleted(HDCamera)
Checks if the multi-frame accumulation is completed for a given camera.
Declaration
public bool IsFrameCompleted(HDCamera hdCamera)
Parameters
Type | Name | Description |
---|---|---|
HDCamera | hdCamera | Camera for which the accumulation status is checked. |
Returns
Type | Description |
---|---|
bool |
|
PrepareNewSubFrame()
Should be called during a recording session when preparing to render a new sub-frame of a multi-frame sequence where each final frame is an accumulation of multiple sub-frames.
Declaration
public void PrepareNewSubFrame()
ReleasePersistentShadowAtlases()
Release all persistent shadow atlas. In HDRP, shadow persistent atlases are allocated per light type (area, punctual or directional) when needed but never deallocated. Calling this will force deallocation of those atlases. This can be useful between levels for example when you know that some types of lights aren't used anymore.
Declaration
public void ReleasePersistentShadowAtlases()
Render(ScriptableRenderContext, List<Camera>)
RenderPipeline Render implementation.
Declaration
protected override void Render(ScriptableRenderContext renderContext, List<Camera> cameras)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | renderContext | Current ScriptableRenderContext. |
List<Camera> | cameras | List of cameras to render. |
Overrides
Render(ScriptableRenderContext, Camera[])
Declaration
protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | renderContext | |
Camera[] | cameras |
Overrides
RequestSkyEnvironmentUpdate()
Request an update of the environment lighting.
Declaration
public void RequestSkyEnvironmentUpdate()
ResetPathTracing()
Resets path tracing accumulation for all cameras.
Declaration
public void ResetPathTracing()
ResetPathTracing(HDCamera)
Resets path tracing accumulation for a specific camera.
Declaration
public void ResetPathTracing(HDCamera hdCamera)
Parameters
Type | Name | Description |
---|---|---|
HDCamera | hdCamera | Camera for which the accumulation is reset. |
ResetRTHandleReferenceSize(int, int)
Resets the reference size of the internal RTHandle System. This allows users to reduce the memory footprint of render textures after doing a super sampled rendering pass for example.
Declaration
public void ResetRTHandleReferenceSize(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | width | New width of the internal RTHandle System. |
int | height | New height of the internal RTHandle System. |