Struct RenderView
Rendering view description that defines how to render the objects (camera placement, rendering properties, etc.).
Inherited Members
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public struct RenderView
Fields
CullingFrustum
The view frustum used for culling (can be different than Frustum in some cases e.g. cascaded shadow map rendering).
Declaration
public BoundingFrustum CullingFrustum
Field Value
BoundingFrustum
|
Direction
Far
The far plane.
Declaration
public float Far
Field Value
System.Single
|
Flags
Frustum
IP
IsOfflinePass
Flag used by static, offline rendering passes (eg. reflections rendering, lightmap rendering etc.)
Declaration
public bool IsOfflinePass
Field Value
System.Boolean
|
IV
IVP
MaxShadowsQuality
Maximum allowed shadows quality for this view
Declaration
public Quality MaxShadowsQuality
Field Value
Quality
|
Mode
ModelLODBias
The model LOD bias. Default is 0. Applied to all the objects in the render view.
Declaration
public int ModelLODBias
Field Value
System.Int32
|
ModelLODDistanceFactor
The model LOD distance scale factor. Default is 1. Applied to all the objects in the render view. Higher values increase LODs quality.
Declaration
public float ModelLODDistanceFactor
Field Value
System.Single
|
ModelLODDistanceFactorSqrt
Square of ModelLODDistanceFactor. Cached by rendering backend.
Declaration
public float ModelLODDistanceFactorSqrt
Field Value
System.Single
|
Near
The near plane.
Declaration
public float Near
Field Value
System.Single
|
NonJitteredProjection
The projection matrix with no camera offset (no jittering). For many temporal image effects, the camera that is currently rendering needs to be slightly offset from the default projection (that is, the camera is ‘jittered’). If you use motion vectors and camera jittering together, use this property to keep the motion vectors stable between frames.
Declaration
public Matrix NonJitteredProjection
Field Value
Matrix
|
Pass
The draw passes mask for the current view rendering.
Declaration
public DrawPass Pass
Field Value
DrawPass
|
Position
PrevProjection
PrevView
PrevViewProjection
The previous frame view * projection matrix.
Declaration
public Matrix PrevViewProjection
Field Value
Matrix
|
Projection
RenderLayersMask
The rendering mask for layers. Used to exclude objects from rendering.
Declaration
public LayersMask RenderLayersMask
Field Value
LayersMask
|
ScreenSize
The screen size packed (x - width, y - height, zw - inv width, w - inv height). Cached before rendering.
Declaration
public Vector4 ScreenSize
Field Value
Vector4
|
ShadowModelLODBias
The model LOD bias. Default is 0. Applied to all the objects in the shadow maps render views. Can be used to improve shadows rendering performance or increase quality.
Declaration
public int ShadowModelLODBias
Field Value
System.Int32
|
ShadowModelLODDistanceFactor
The model LOD distance scale factor. Default is 1. Applied to all the objects in the shadow maps render views. Higher values increase LODs quality. Can be used to improve shadows rendering performance or increase quality.
Declaration
public float ShadowModelLODDistanceFactor
Field Value
System.Single
|
StaticFlagsMask
The static flags mask used to hide objects that don't have a given static flags. Eg. use StaticFlags::Lightmap to render only objects that can use lightmap.
Declaration
public StaticFlags StaticFlagsMask
Field Value
StaticFlags
|
TaaFrameIndex
The Temporal Anti-Aliasing jitter frame index.
Declaration
public int TaaFrameIndex
Field Value
System.Int32
|
TemporalAAJitter
The temporal AA jitter packed (xy - this frame jitter, zw - previous frame jitter). Cached before rendering. Zero if TAA is disabled. The value added to projection matrix (in clip space).
Declaration
public Vector4 TemporalAAJitter
Field Value
Vector4
|
View
ViewInfo
The view information vector with packed components to reconstruct linear depth and view position from the hardware depth buffer. Cached before rendering.
Declaration
public Vector4 ViewInfo
Field Value
Vector4
|
Methods
CopyFrom(Camera)
Copies render view data from the camera.
Declaration
public void CopyFrom(Camera camera)
Parameters
Camera
camera
The camera. |
CopyFrom(Camera, ref Viewport)
Copies render view data from the camera.
Declaration
public void CopyFrom(Camera camera, ref Viewport customViewport)
Parameters
Camera
camera
The camera. |
Viewport
customViewport
The custom viewport to use for view/projeection matrices override. |
Init()
Initializes this view with default options.
Declaration
public void Init()
SetProjector(Single, Single, Vector3, Vector3, Vector3, Single)
Set up view for projector rendering.
Declaration
public void SetProjector(float nearPlane, float farPlane, Vector3 position, Vector3 direction, Vector3 up, float angle)
Parameters
System.Single
nearPlane
Near plane |
System.Single
farPlane
Far plane |
Vector3
position
Camera's position |
Vector3
direction
Camera's direction vector |
Vector3
up
Camera's up vector |
System.Single
angle
Camera's FOV angle (in degrees) |
SetUp(ref Matrix, ref Matrix)
Initializes render view data.
Declaration
public void SetUp(ref Matrix view, ref Matrix projection)
Parameters
Matrix
view
The view. |
Matrix
projection
The projection. |
UpdateCachedData()
Updates the cached data for the view (inverse matrices, etc.).
Declaration
public void UpdateCachedData()