Class HDCamera
HDCamera class. This class holds all information for a given camera. Constants used for shading as well as buffers persistent from one frame to another etc.
Inherited Members
Namespace: UnityEngine.Rendering.HighDefinition
Assembly: Unity.RenderPipelines.HighDefinition.Runtime.dll
Syntax
public class HDCamera
Fields
Name | Description |
---|---|
camera | Camera component. |
colorPyramidHistoryIsValid | Color pyramid history buffer state. |
currentSSRAlgorithm | Store current algorithm which help to know if we trigger to reset history SSR Buffers. |
frustum | Camera frustum. |
mainViewConstants | View constants. |
materialsDirty | Flag that tracks if one of the objects that is included into the RTAS had its material changed. |
rayTracingAccelerationStructure | Ray tracing acceleration structure that is used in case the user specified the build mode as manual for the RTAS. |
screenSize | Screen resolution information. Width, height, inverse width, inverse height. |
taaJitter | TAA jitter information. |
time | Current time for this camera. |
transformsDirty | Flag that tracks if one of the objects that is included into the RTAS had its transform changed. |
volumetricHistoryIsValid | Volumetric history buffer state. |
Properties
Name | Description |
---|---|
actualHeight | Height actually used for rendering after dynamic resolution and XR is applied. |
actualWidth | Width actually used for rendering after dynamic resolution and XR is applied. |
frameSettings | Frame settings for this camera. |
historyRTHandleProperties | RTHandle properties for the camera history buffers. |
msaaEnabled | Returns true if MSAA is enabled for this camera (equivalent to msaaSamples != MSAASamples.None). |
msaaSamples | Number of MSAA samples used for this frame. |
name | Camera name. |
postProcessScreenSize | Screen resolution information for post processes passes. Width, height, inverse width, inverse height. |
volumeStack | Volume stack used for this camera. |
Methods
Name | Description |
---|---|
AllocHistoryFrameRT(int, Func<string, int, RTHandleSystem, RTHandle>, int) | Allocates a history RTHandle with the unique identifier id. |
GetCurrentFrameRT(int) | Returns the id RTHandle of the current frame. |
GetOrCreate(Camera, int) | Get the existing HDCamera for the provided camera or create a new if it does not exist yet. |
GetPreviousFrameRT(int) | Returns the id RTHandle from the previous frame. |
Reset() | Reset the camera persistent informations. This needs to be used when doing camera cuts for example in order to avoid information from previous unrelated frames to be used. |