Struct CameraData
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
renderer
Declaration
public ScriptableRenderer renderer
Field Value
renderScale
Declaration
Field Value
renderType
Declaration
public CameraRenderType renderType
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
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(Int32)
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 |
Int32 |
viewIndex |
|
Returns
See Also
GetProjectionMatrix(Int32)
Returns the camera projection matrix.
Declaration
public Matrix4x4 GetProjectionMatrix(int viewIndex = 0)
Parameters
Type |
Name |
Description |
Int32 |
viewIndex |
|
Returns
GetViewMatrix(Int32)
Returns the camera view matrix.
Declaration
public Matrix4x4 GetViewMatrix(int viewIndex = 0)
Parameters
Type |
Name |
Description |
Int32 |
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
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.