Struct CameraData
Assembly: Unity.RenderPipelines.Universal.Runtime.dll
Syntax
Fields
antialiasing
Declaration
public AntialiasingMode antialiasing
Field Value
antialiasingQuality
Declaration
public AntialiasingQuality antialiasingQuality
Field Value
camera
Declaration
Field Value
cameraTargetDescriptor
Declaration
public RenderTextureDescriptor cameraTargetDescriptor
Field Value
cameraType
Declaration
public CameraType cameraType
Field Value
captureActions
Declaration
public IEnumerator<Action<RenderTargetIdentifier, CommandBuffer>> captureActions
Field Value
clearDepth
Declaration
Field Value
defaultOpaqueSortFlags
Declaration
public SortingCriteria defaultOpaqueSortFlags
Field Value
isDefaultViewport
Declaration
public bool isDefaultViewport
Field Value
isDitheringEnabled
Declaration
public bool isDitheringEnabled
Field Value
isHdrEnabled
Declaration
Field Value
isStopNaNEnabled
Declaration
public bool isStopNaNEnabled
Field Value
maxShadowDistance
Declaration
public float maxShadowDistance
Field Value
postProcessEnabled
Declaration
public bool postProcessEnabled
Field Value
postProcessingRequiresDepthTexture
Returns true if post processing passes require depth texture.
Declaration
public bool postProcessingRequiresDepthTexture
Field Value
renderScale
Declaration
Field Value
renderType
Declaration
public CameraRenderType renderType
Field Value
renderer
Declaration
public ScriptableRenderer renderer
Field Value
requiresDepthTexture
Declaration
public bool requiresDepthTexture
Field Value
requiresOpaqueTexture
Declaration
public bool requiresOpaqueTexture
Field Value
resolveFinalTarget
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.
Declaration
public bool resolveFinalTarget
Field Value
targetTexture
Declaration
public RenderTexture targetTexture
Field Value
volumeLayerMask
Declaration
public LayerMask volumeLayerMask
Field Value
volumeTrigger
Declaration
public Transform volumeTrigger
Field Value
worldSpaceCameraPos
Camera position in world space.
Declaration
public Vector3 worldSpaceCameraPos
Field Value
xrRendering
Declaration
Field Value
Properties
isPreviewCamera
True if the camera rendering is for the preview window in the editor
Declaration
public bool isPreviewCamera { get; }
Property Value
isSceneViewCamera
True if the camera rendering is for the scene window in the editor
Declaration
public bool isSceneViewCamera { get; }
Property Value
Methods
GetGPUProjectionMatrix(int)
Returns the camera GPU projection matrix. This contains platform specific changes to handle y-flip and reverse z.
Similar to GL.GetGPUProjectionMatrix
but queries URP internal state to know if the pipeline is rendering to render texture.
For more info on platform differences regarding camera projection check: https://docs.unity3d.com/Manual/SL-PlatformDifferences.html
Declaration
public Matrix4x4 GetGPUProjectionMatrix(int viewIndex = 0)
Parameters
Type |
Name |
Description |
int |
viewIndex |
|
Returns
See Also
GetProjectionMatrix(int)
Returns the camera projection matrix.
Declaration
public Matrix4x4 GetProjectionMatrix(int viewIndex = 0)
Parameters
Type |
Name |
Description |
int |
viewIndex |
|
Returns
GetViewMatrix(int)
Returns the camera view matrix.
Declaration
public Matrix4x4 GetViewMatrix(int viewIndex = 0)
Parameters
Type |
Name |
Description |
int |
viewIndex |
|
Returns
IsCameraProjectionMatrixFlipped()
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.
Declaration
public bool IsCameraProjectionMatrixFlipped()
Returns