Search Results for

    Show / Hide Table of Contents

    Struct RenderView

    Rendering view description that defines how to render the objects (camera placement, rendering properties, etc.).

    Inherited Members
    System.ValueType.Equals(System.Object)
    System.ValueType.GetHashCode()
    System.ValueType.ToString()
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    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

    The direction of the view.

    Declaration
    public Vector3 Direction
    Field Value
    Vector3

    Far

    The far plane.

    Declaration
    public float Far
    Field Value
    System.Single

    Flags

    The view flags.

    Declaration
    public ViewFlags Flags
    Field Value
    ViewFlags

    Frustum

    The view frustum.

    Declaration
    public BoundingFrustum Frustum
    Field Value
    BoundingFrustum

    IP

    The inverted projection matrix.

    Declaration
    public Matrix IP
    Field Value
    Matrix

    IsOfflinePass

    Flag used by static, offline rendering passes (eg. reflections rendering, lightmap rendering etc.)

    Declaration
    public bool IsOfflinePass
    Field Value
    System.Boolean

    IV

    The inverted view matrix.

    Declaration
    public Matrix IV
    Field Value
    Matrix

    IVP

    The inverted projection view matrix.

    Declaration
    public Matrix IVP
    Field Value
    Matrix

    MaxShadowsQuality

    Maximum allowed shadows quality for this view

    Declaration
    public Quality MaxShadowsQuality
    Field Value
    Quality

    Mode

    The view mode.

    Declaration
    public ViewMode Mode
    Field Value
    ViewMode

    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

    The position of the view.

    Declaration
    public Vector3 Position
    Field Value
    Vector3

    PrevProjection

    The previous frame projection matrix.

    Declaration
    public Matrix PrevProjection
    Field Value
    Matrix

    PrevView

    The previous frame view matrix.

    Declaration
    public Matrix PrevView
    Field Value
    Matrix

    PrevViewProjection

    The previous frame view * projection matrix.

    Declaration
    public Matrix PrevViewProjection
    Field Value
    Matrix

    Projection

    The projection matrix.

    Declaration
    public Matrix Projection
    Field Value
    Matrix

    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

    The view matrix.

    Declaration
    public Matrix View
    Field Value
    Matrix

    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()

    Extension Methods

    Extensions.ReflectiveCompare<T>(T, T)
    Extensions.DeepClone<T>(T)
    Extensions.RawClone<T>(T)
    In This Article
    Back to top Copyright © 2012-2021 Wojciech Figat