Class HDRenderPipeline
High Definition Render Pipeline class.
Namespace: UnityEngine.Rendering.HighDefinition
Syntax
public class HDRenderPipeline : IDataProvider, RenderPipeline
Constructors
HDRenderPipeline(HDRenderPipelineAsset, HDRenderPipelineAsset)
HDRenderPipeline constructor.
Declaration
public HDRenderPipeline(HDRenderPipelineAsset asset, HDRenderPipelineAsset defaultAsset)
Parameters
Type | Name | Description |
---|---|---|
HDRenderPipelineAsset | asset | Source HDRenderPipelineAsset. |
HDRenderPipelineAsset | defaultAsset | Defauklt HDRenderPipelineAsset. |
Fields
k_ShaderTagName
Shader Tag for the High Definition Render Pipeline.
Declaration
public const string k_ShaderTagName = null
Field Value
Type | Description |
---|---|
String |
Properties
debugDisplaySettings
Debug display settings.
Declaration
public DebugDisplaySettings debugDisplaySettings { get; }
Property Value
Type | Description |
---|---|
DebugDisplaySettings |
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 |
---|---|
Boolean |
Methods
BeginRecording(Int32, Single, 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 |
---|---|---|
Int32 | 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. |
Single | 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. |
BeginRecording(Int32, Single, Single, Single)
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 = 0F, float shutterBeginsClosing = 1F)
Parameters
Type | Name | Description |
---|---|---|
Int32 | 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. |
Single | shutterInterval | The duration the shutter of the virtual camera is open (for motion blur). Between 0 and 1. |
Single | shutterFullyOpen | The time it takes for the shutter to fully open. Between 0 and 1. |
Single | shutterBeginsClosing | The time when the shutter starts closing. Between 0 and 1. |
Dispose(Boolean)
Disposable pattern implementation.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | Is disposing. |
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. |
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 |
---|---|
UInt32 | The approximated ray count for a frame |
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()
Render(ScriptableRenderContext, Camera[])
RenderPipeline Render implementation.
Declaration
protected override void Render(ScriptableRenderContext renderContext, Camera[] cameras)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | renderContext | Current ScriptableRenderContext. |
Camera[] | cameras | List of cameras to render. |
RequestSkyEnvironmentUpdate()
Request an update of the environment lighting.
Declaration
public void RequestSkyEnvironmentUpdate()
ResetRTHandleReferenceSize(Int32, Int32)
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 |
---|---|---|
Int32 | width | New width of the internal RTHandle System. |
Int32 | height | New height of the internal RTHandle System. |