Struct CameraData
Struct that holds settings related to camera.
Inherited Members
Namespace: UnityEngine .Rendering.Universal
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
public struct CameraData
Fields
Name | Description |
---|---|
allow |
True if this camera allow color conversion and encoding for high dynamic range displays. |
antialiasing | Controls the anti-alising mode used by the integrated post-processing stack.
When any other value other than |
antialiasing |
Controls the anti-alising quality of the anti-aliasing mode.
antialiasing |
background |
Final background color in the active color space. |
base |
Camera at the top of the overlay camera stack |
camera | The camera component. |
camera |
Render texture settings used to create intermediate camera textures for rendering. |
camera |
The camera type.
Camera |
capture |
Provides set actions to the renderer to be triggered at the end of the render loop for camera capture. |
clear |
True if this camera should clear depth buffer. This setting only applies to cameras of type |
default |
The sorting criteria used when drawing opaque objects by the internal URP render passes. When a GPU supports hidden surface removal, URP will rely on that information to avoid sorting opaque objects front to back and benefit for more optimal static batching. |
is |
True if this camera is drawing to a viewport that maps to the entire screen. |
is |
If set to true a final post-processing pass will be applied to apply dithering. This can be combined with post-processing antialiasing. antialiasing |
is |
True if this camera should render to high dynamic range color targets. |
is |
If set to true, the integrated post-processing stack will replace any NaNs generated by render passes prior to post-processing with black/zero. Enabling this option will cause a noticeable performance impact. It should be used while in development mode to identify NaN issues. |
max |
Maximum shadow distance visible to the camera. When set to zero shadows will be disable for that camera. |
post |
True if post-processing is enabled for this camera. |
post |
Returns true if post processing passes require depth texture. |
render |
Render scale to apply when creating camera textures. Scaled extents are rounded down to integers. |
render |
The camera render type used for camera stacking.
Camera |
renderer | Returns the current renderer used by this camera.
Scriptable |
requires |
True if this camera requires to write _CameraDepthTexture. |
requires |
True if this camera requires to copy camera color texture to _CameraOpaqueTexture. |
resolve |
True if this camera is resolving rendering to the final camera render target. When rendering a stack of cameras only the last camera in the stack will resolve to camera target. |
target |
Controls the final target texture for a camera. If null camera will resolve rendering to screen. |
volume |
The camera volume layer mask. |
volume |
The camera volume trigger. |
world |
Camera position in world space. |
xr |
Returns true if XR rendering is enabled. |
Properties
Name | Description |
---|---|
hdr |
HDR Display Color Gamut |
hdr |
HDR Display information about the current display this camera is rendering to. |
is |
True if the Camera should output to an HDR display. |
is |
True if the camera rendering is for the preview window in the editor. |
is |
True if the camera rendering is for the scene window in the editor. |
renders |
True if the Camera should render overlay UI. |
xr | XRPass holds the render target information and a list of XRView. XRView contains the parameters required to render (projection and view matrices, viewport, etc) |
Methods
Name | Description |
---|---|
Get |
Returns the camera GPU projection matrix. This contains platform specific changes to handle y-flip and reverse z. Includes camera jitter if required by active features.
Similar to |
Get |
Returns the camera GPU projection matrix. This contains platform specific changes to handle y-flip and reverse z. Does not include any camera jitter.
Similar to |
Get |
Returns the camera projection matrix. Might be jittered for temporal features. |
Get |
Returns the camera view matrix. |
Is |
True if the camera device projection matrix is flipped. This happens when the pipeline is rendering to a render texture in non OpenGL platforms. If you are doing a custom Blit pass to copy camera textures (_CameraColorTexture, _CameraDepthAttachment) you need to check this flag to know if you should flip the matrix when rendering with for cmd.Draw* and reading from camera textures. |
Is |
True is the handle has its content flipped on the y axis. This happens only with certain rendering APIs. On those platforms, any handle will have its content flipped unless rendering to a backbuffer, however, the scene view will always be flipped. When transitioning from a flipped space to a non-flipped space - or vice-versa - the content must be flipped in the shader: shouldPerformYFlip = IsHandleYFlipped(source) != IsHandleYFlipped(target) |
Is |
True if the render target's projection matrix is flipped. This happens when the pipeline is rendering to a render texture in non OpenGL platforms. If you are doing a custom Blit pass to copy camera textures (_CameraColorTexture, _CameraDepthAttachment) you need to check this flag to know if you should flip the matrix when rendering with for cmd.Draw* and reading from camera textures. |