Class HDCamera
Syntax
Constructors
HDCamera(Camera)
Declaration
public HDCamera(Camera cam)
Parameters
Type |
Name |
Description |
Camera |
cam |
|
Fields
camera
Declaration
Field Value
colorPyramidHistoryIsValid
Declaration
public bool colorPyramidHistoryIsValid
Field Value
colorPyramidHistoryMipCount
Declaration
public int colorPyramidHistoryMipCount
Field Value
finalViewport
Declaration
public Rect finalViewport
Field Value
frustum
Declaration
Field Value
frustumPlaneEquations
Declaration
public Vector4[] frustumPlaneEquations
Field Value
Type |
Description |
Vector4[] |
|
mainViewConstants
Declaration
public HDCamera.ViewConstants mainViewConstants
Field Value
projectionParams
Declaration
public Vector4 projectionParams
Field Value
screenParams
Declaration
public Vector4 screenParams
Field Value
screenSize
Declaration
public Vector4 screenSize
Field Value
taaFrameIndex
Declaration
Field Value
taaJitter
Declaration
Field Value
taaSharpenStrength
Declaration
public float taaSharpenStrength
Field Value
unity_OrthoParams
Declaration
public Vector4 unity_OrthoParams
Field Value
vBufferParams
Declaration
public VBufferParameters[] vBufferParams
Field Value
volumeAnchor
Declaration
public Transform volumeAnchor
Field Value
Type |
Description |
Transform |
|
volumeLayerMask
Declaration
public int volumeLayerMask
Field Value
volumetricHistoryIsValid
Declaration
public bool volumetricHistoryIsValid
Field Value
xrViewConstants
Declaration
public HDCamera.ViewConstants[] xrViewConstants
Field Value
zBufferParams
Declaration
public Vector4 zBufferParams
Field Value
Properties
actualHeight
Declaration
public int actualHeight { get; }
Property Value
actualWidth
Declaration
public int actualWidth { get; }
Property Value
antialiasing
Declaration
public HDAdditionalCameraData.AntialiasingMode antialiasing { get; }
Property Value
aovRequests
Declaration
public IEnumerable<AOVRequestData> aovRequests { get; }
Property Value
backgroundColorHDR
Declaration
public Color backgroundColorHDR { get; }
Property Value
clearColorMode
Declaration
public HDAdditionalCameraData.ClearColorMode clearColorMode { get; }
Property Value
clearDepth
Declaration
public bool clearDepth { get; }
Property Value
dithering
Declaration
public bool dithering { get; }
Property Value
flipYMode
Declaration
public HDAdditionalCameraData.FlipYMode flipYMode { get; }
Property Value
frameSettings
Declaration
public FrameSettings frameSettings { get; }
Property Value
historyRTHandleProperties
Declaration
public RTHandleProperties historyRTHandleProperties { get; }
Property Value
Type |
Description |
RTHandleProperties |
|
invertFaceCulling
Declaration
public bool invertFaceCulling { get; }
Property Value
invProjParam
Declaration
public Vector4 invProjParam { get; }
Property Value
isFirstFrame
Declaration
public bool isFirstFrame { get; }
Property Value
isMainGameView
Declaration
public bool isMainGameView { get; }
Property Value
msaaSamples
Declaration
public MSAASamples msaaSamples { get; }
Property Value
Type |
Description |
MSAASamples |
|
nonObliqueProjMatrix
Declaration
public Matrix4x4 nonObliqueProjMatrix { get; }
Property Value
Type |
Description |
Matrix4x4 |
|
physicalParameters
Declaration
public HDPhysicalCamera physicalParameters { get; }
Property Value
probeLayerMask
Declaration
public LayerMask probeLayerMask { get; }
Property Value
Type |
Description |
LayerMask |
|
SMAAQuality
Declaration
public HDAdditionalCameraData.SMAAQualityLevel SMAAQuality { get; }
Property Value
stopNaNs
Declaration
public bool stopNaNs { get; }
Property Value
viewCount
Declaration
public int viewCount { get; }
Property Value
xr
Declaration
public XRPass xr { get; }
Property Value
Methods
AllocateAmbientOcclusionHistoryBuffer(Single)
Declaration
public void AllocateAmbientOcclusionHistoryBuffer(float scaleFactor)
Parameters
Type |
Name |
Description |
Single |
scaleFactor |
|
AllocHistoryFrameRT(Int32, Func<String, Int32, RTHandleSystem, RTHandle>, Int32)
Declaration
public RTHandle AllocHistoryFrameRT(int id, Func<string, int, RTHandleSystem, RTHandle> allocator, int bufferCount)
Parameters
Returns
Type |
Description |
RTHandle |
|
BeginRender(CommandBuffer)
Declaration
public void BeginRender(CommandBuffer cmd)
Parameters
Type |
Name |
Description |
CommandBuffer |
cmd |
|
CleanUnused()
Declaration
public static void CleanUnused()
ClearAll()
Declaration
public static void ClearAll()
ComputePixelCoordToWorldSpaceViewDirectionMatrix(HDCamera.ViewConstants, Vector4, Single)
Compute the matrix from screen space (pixel) to world space direction (RHS).
You can use this matrix on the GPU to compute the direction to look in a cubemap for a specific
screen pixel.
Declaration
public Matrix4x4 ComputePixelCoordToWorldSpaceViewDirectionMatrix(HDCamera.ViewConstants viewConstants, Vector4 resolution, float aspect = -1F)
Parameters
Type |
Name |
Description |
HDCamera.ViewConstants |
viewConstants |
|
Vector4 |
resolution |
The target texture resolution.
|
Single |
aspect |
The aspect ratio to use.
if negative, then the aspect ratio of resolution will be used.
It is different from the aspect ratio of resolution for anamorphic projections.
|
Returns
Type |
Description |
Matrix4x4 |
|
Dispose()
Declaration
GetCurrentFrameRT(Int32)
Declaration
public RTHandle GetCurrentFrameRT(int id)
Parameters
Type |
Name |
Description |
Int32 |
id |
|
Returns
Type |
Description |
RTHandle |
|
GetOrCreate(Camera, Int32)
Declaration
public static HDCamera GetOrCreate(Camera camera, int xrMultipassId = 0)
Parameters
Type |
Name |
Description |
Camera |
camera |
|
Int32 |
xrMultipassId |
|
Returns
GetPixelCoordToViewDirWS(Vector4, Single, ref Matrix4x4[])
Declaration
public void GetPixelCoordToViewDirWS(Vector4 resolution, float aspect, ref Matrix4x4[] transforms)
Parameters
Type |
Name |
Description |
Vector4 |
resolution |
|
Single |
aspect |
The aspect ratio to use.
if negative, then the aspect ratio of resolution will be used.
It is different from the aspect ratio of resolution for anamorphic projections.
|
Matrix4x4[] |
transforms |
|
GetPreviousFrameRT(Int32)
Declaration
public RTHandle GetPreviousFrameRT(int id)
Parameters
Type |
Name |
Description |
Int32 |
id |
|
Returns
Type |
Description |
RTHandle |
|
GetViewID()
Declaration
Returns
IsTAAEnabled()
Declaration
public bool IsTAAEnabled()
Returns
IsVolumetricReprojectionEnabled()
Declaration
public bool IsVolumetricReprojectionEnabled()
Returns
ReleaseHistoryFrameRT(Int32)
Declaration
public void ReleaseHistoryFrameRT(int id)
Parameters
Type |
Name |
Description |
Int32 |
id |
|
Reset()
Declaration
SetupGlobalParams(CommandBuffer, Single, Single, Int32)
Declaration
public void SetupGlobalParams(CommandBuffer cmd, float time, float lastTime, int frameCount)
Parameters
Update(FrameSettings, HDRenderPipeline, MSAASamples, XRPass)
Declaration
public void Update(FrameSettings currentFrameSettings, HDRenderPipeline hdrp, MSAASamples msaaSamples, XRPass xrPass)
Parameters
UpdateAllViewConstants(Boolean)
Declaration
public void UpdateAllViewConstants(bool jitterProjectionMatrix)
Parameters
Type |
Name |
Description |
Boolean |
jitterProjectionMatrix |
|