FSceneView

A projection from scene space into a 2D screen region.

Windows
MacOS
Linux

Syntax

class FSceneView

Remarks

A projection from scene space into a 2D screen region.

Variables

Name Description

Public variable

EAntiAliasingMe...

 

AntiAliasingMethod

The antialiasing method.

Public variable

FTextureRHIRef

 

AtmosphereInscatterTexture

Public variable

FTextureRHIRef

 

AtmosphereIrradianceTexture

Public variable

FTextureRHIRef

 

AtmosphereTransmittanceTexture

Parameters for atmospheric fog.

Public variable

FLinearColor

 

BackgroundColor

Public variable

bool

 

bAllowTemporalJitter

Public variable

bool

 

bAllowTranslucentPrimitivesInHitProxy

True if we should draw translucent objects when rendering hit proxies

Public variable

FVector

 

BaseHmdLocation

Public variable

FQuat

 

BaseHmdOrientation

Public variable

bool

 

bCameraCut

Whether we did a camera cut for this view this frame.

Public variable

bool

 

bHasNearClippingPlane

Public variable

bool

 

bHasSelectedComponents

True if any components are selected in isolation (independent of actor selection)

Public variable

bool

 

bIsGameView

True if this scene was created from a game world.

Public variable

bool

 

bIsInstancedStereoEnabled

True if instanced stereo is enabled.

Public variable

bool

 

bIsLocked

Whether this view was created from a locked viewpoint.

Public variable

bool

 

bIsMobileMultiViewDirectEnabled

True if mobile multi-view direct is enabled.

Public variable

bool

 

bIsMobileMultiViewEnabled

True if mobile multi-view is enabled.

Public variable

bool

 

bIsMultiViewEnabled

True if multi-view is enabled.

Public variable

bool

 

bIsPlanarReflection

Whether this view is being used to render a planar reflection.

Public variable

bool

 

bIsReflectionCapture

Whether this view is being used to render a reflection capture.

Public variable

bool

 

bIsSceneCapture

Whether this view is being used to render a scene capture.

Public variable

bool

 

bIsViewInfo

For sanity checking casts that are assumed to be safe.

Public variable

bool

 

bRenderFirstInstanceOnly

Whether this view should render the first instance only of any meshes using instancing.

Public variable

bool

 

bRenderSceneTwoSided

Whether to force two sided rendering for this view.

Public variable

bool

 

bReverseCulling

True if ViewMatrix.Determinant() is negative.

Public variable

bool

 

bShouldBindInstancedViewUB

True if we need to bind the instanced view uniform buffer parameters.

Public variable

bool

 

bStaticSceneOnly

Whether to only render static lights and objects.

Public variable

bool

 

bUseFieldOfViewForLOD

Whether to use FOV when computing mesh LOD.

Public variable

bool

 

bUsePixelInspector

Whether to use the pixel inspector

Public variable

FIntRect

 

CameraConstrainedViewRect

Aspect ratio constrained view rect.

Public variable

FLinearColor

 

ColorScale

Color scale multiplier used during post processing

Public variable

FName

 

CurrentBufferVisualizationMode

Current buffer visualization mode

Public variable

FIntPoint

 

CursorPos

-1,-1 if not setup

Public variable

float

 

DesiredFOV

Public variable

FVector4

 

DiffuseOverrideParameter

These can be used to override material parameters across the scene without recompiling shaders.

Public variable

EDrawDynamicFla...

 

DrawDynamicFlags

Public variable

FViewElementDra...

 

Drawer

An interaction which draws the view's interaction elements.

Public variable

uint64

 

EditorViewBitflag

The set of (the first 64) groups' visibility info for this view

Public variable

const FSceneVie...

 

Family

Public variable

const ERHIFeatu...

 

FeatureLevel

Feature level for this scene

Public variable

FFinalPostProce...

 

FinalPostProcessSettings

The final settings for the current viewer position (blended together from many volumes).

Public variable

FForwardLightin...

 

ForwardLightingResources

Points to the view state's resources if a view state exists.

Public variable

float

 

FOV

Actual field of view and that desired by the camera originally

Public variable

TArray< bool >[...

 

FrameSubIsOccluded

Public variable

FPlane

 

GlobalClippingPlane

Global clipping plane being applied to the scene, or all 0's if disabled.

Public variable

TSet< FPrimitiv...

 

HiddenPrimitives

The primitives which are hidden for this view.

Public variable

FVector4

 

InvDeviceZToWorldZTransform

Vector used by shaders to convert depth buffer samples into z coordinates in world space

Public variable

float

 

LODDistanceFactor

FOV based multiplier for cull distance on objects

Public variable

float

 

LODDistanceFactorSquared

Square of the FOV based multiplier for cull distance on objects

Public variable

int32

 

MaxShadowCascades

Maximum number of shadow cascades to render with.

Public variable

TUniformBufferR...

 

MobileDirectionalLightUniformBuffers

Mobile Directional Lighting uniform buffers, one for each lighting channel The first is used for primitives with no lighting channels set.

Public variable

float

 

NearClippingDistance

Public variable

FPlane

 

NearClippingPlane

Public variable

FVector4

 

NormalOverrideParameter

Public variable

FVector

 

OriginOffsetThisFrame

World origin offset value. Non-zero only for a single frame when origin is rebased

Public variable

FLinearColor

 

OverlayColor

Public variable

FVector

 

OverrideLODViewOrigin

For ortho views, this can control how to determine LOD parenting (ortho has no "distance-to-camera")

Public variable

int32

 

PlayerIndex

Player index this view is associated with or INDEX_NONE.

Public variable

EPrimaryScreenP...

 

PrimaryScreenPercentageMethod

Primary screen percentage method to use.

Protected variable

TArray< void &#...

 

PrimitivesCustomData

Custom data per primitives

Public variable

FMatrix

 

ProjectionMatrixUnadjustedForRHI

Public variable

FVector2D

 

RoughnessOverrideParameter

Public variable

FSceneViewInitO...

 

SceneViewInitOptions

Public variable

FLinearColor

 

SelectionOutlineColor

Selection color for the editor (used by post processing)

Public variable

FViewMatrices

 

ShadowViewMatrices

Normally the same as ViewMatrices unless "r.Shadow.FreezeCamera" is activated

Public variable

TOptional< TSet...

 

ShowOnlyPrimitives

The primitives which are visible for this view.

Public variable

FVector4

 

SpecularOverrideParameter

Public variable

TBitArray

 

SpriteCategoryVisibility

BitArray representing the visibility state of the various sprite categories in the editor for this view

Public variable

FSceneViewState...

 

State

Can be 0 (thumbnail rendering)

Public variable

float

 

StereoIPD

Half of the view's stereo IPD (- for lhs, + for rhs)

Public variable

EStereoscopicPa...

 

StereoPass

For stereoscopic rendering, whether or not this is a full pass, or a left / right eye pass

Public variable

FLinearColor

 

SubduedSelectionOutlineColor

Selection color for use in the editor with inactive primitives

Public variable

FVector

 

TranslucentSortAxis

Sort axis for when TranslucentSortPolicy is SortAlongAxis

Public variable

TEnumAsByte< ET...

 

TranslucentSortPolicy

Translucent sort mode

Public variable

FIntRect

 

UnconstrainedViewRect

Raw view size (in pixels), used for screen space calculations

Public variable

const FIntRect

 

UnscaledViewRect

Final position of the view in the final render target (in pixels), potentially constrained by an aspect ratio requirement (black bars)

Public variable

const AActor &#...

 

ViewActor

The actor which is being viewed from.

Public variable

FConvexVolume

 

ViewFrustum

Public variable

FVector

 

ViewLocation

Variables used to determine the view matrix

Public variable

FViewMatrices

 

ViewMatrices

Public variable

FRotator

 

ViewRotation

Public variable

TUniformBufferR...

 

ViewUniformBuffer

The uniform buffer for the view's parameters.

Public variable

float

 

WorldToMetersScale

Constructors

Name Description

Public function

FSceneView

(
    const FSceneViewInitOptions& InitO...
)

Initialization constructor.

Functions

Name Description

Public function

void

 

ConfigureBufferVisualizationSettings()

Configure post process settings for the buffer visualization system

Public function Const

FVector

 

Deproject

(
    const FPlane& ScreenPoint
)

Transforms a point from the view's screen-space into world coordinates multiplies X, Y, Z by W before transforming.

Public function Const

void

 

DeprojectFVector2D

(
    const FVector2D& ScreenPos,
    FVector& out_WorldOrigin,
    FVector& out_WorldDirection
)

Transforms 2D screen coordinates into a 3D world-space origin and direction

Public function Static

void

 

DeprojectScreenToWorld

(
    const FVector2D& ScreenPos,
    const FIntRect& ViewRect,
    const FMatrix& InvViewProjMatrix,
    FVector& out_WorldOrigin,
    FVector& out_WorldDirection
)

Overload to take a single combined view projection matrix.

Public function Static

void

 

DeprojectScreenToWorld

(
    const FVector2D& ScreenPos,
    const FIntRect& ViewRect,
    const FMatrix& InvViewMatrix,
    const FMatrix& InvProjMatrix,
    FVector& out_WorldOrigin,
    FVector& out_WorldDirection
)

Transforms 2D screen coordinates into a 3D world-space origin and direction

Public function

void

 

EndFinalPostprocessSettings

(
    const FSceneViewInitOptions& ViewI...
)

Applied global restrictions from show flags

Public function Const

void *

 

GetCustomData

(
    int32 InPrimitiveSceneInfoIndex
)

Will return custom data associated with the specified primitive index.

Public function Const

const FConve...

 

GetDynamicMeshElementsShadowCullFrustum()

Public function Const

ERHIFeatureL...

 

GetFeatureLevel()

Get the feature level for this view (cached from the scene so this is not different per view)

Public function Const

float

 

GetLODDistanceFactor()

Get LOD distance factor: Sqrt(GetLODDistanceFactor()*SphereRadius*SphereRadius / ScreenPercentage) = distance to this LOD transition

Public function Const

uint32

 

GetOcclusionFrameCounter()

Returns a the occlusion frame counter or MAX_uint32 if there is no view state

Public function Const

const FVecto...

 

GetPreShadowTranslation()

Public function Const

EShaderPlatf...

 

GetShaderPlatform()

Get the feature level for this view

Public function Const

FVector

 

GetTemporalLODOrigin

(
    int32 Index,
    bool bUseLaggedLODTransition
)

Returns the location used as the origin for LOD computations

Public function Const

float

 

GetTemporalLODTransition()

Returns the blend factor between the last two LOD samples

Public function Const

FVector

 

GetViewDirection()

Public function Const

uint32

 

GetViewKey()

Returns a unique key for the view state if one exists, otherwise returns zero

Public function Const

FVector

 

GetViewRight()

Public function Const

FVector

 

GetViewUp()

Public function Const

bool

 

IsInstancedStereoPass()

True if the view should render as an instanced stereo pass

Public function Const

bool

 

IsPerspectiveProjection()

Public function

void

 

OverridePostProcessSettings

(
    const FPostProcessSettings& Src,
    float Weight
)

Custom layers can be combined with the existing settings

Public function Const

FVector4

 

PixelToScreen

(
    float X,
    float Y,
    float Z
)

Transforms a point from pixel coordinates relative to the view's X,Y (left, top) into the view's screen-space.

Public function Const

FVector4

 

PixelToWorld

(
    float X,
    float Y,
    float Z
)

Transforms a point from pixel coordinates relative to the view's X,Y (left, top) into the view's world-space.

Public function Const

FPlane

 

Project

(
    const FVector& WorldPoint
)

Transforms a point from the view's world-space into the view's screen-space.

Public function Static

bool

 

ProjectWorldToScreen

(
    const FVector& WorldPosition,
    const FIntRect& ViewRect,
    const FMatrix& ViewProjectionMatri...,
    FVector2D& out_ScreenPos
)

Transforms 3D world-space origin into 2D screen coordinates

Public function Const

bool

 

ScreenToPixel

(
    const FVector4& ScreenPoint,
    FVector2D& OutPixelLocation
)

Transforms a point from the view's screen-space into pixel coordinates relative to the view's X,Y.

Public function Const

FVector

 

ScreenToWorld

(
    const FVector4& ScreenPoint
)

Transforms a point from the view's screen-space to world-space.

Public function

void

 

SetDynamicMeshElementsShadowCullFrustum

(
    const FConvexVolume* InDynamic...
)

Public function

void

 

SetPreShadowTranslation

(
    const FVector& InPreShadowTranslat...
)

Public function

void

 

SetupAntiAliasingMethod()

Public function Const

void

 

SetupCommonViewUniformBufferParameters

(
    FViewUniformShaderParameters& View...,
    const FIntPoint& InBufferSize,
    int32 NumMSAASamples,
    const FIntRect& InEffectiveViewRec...,
    const FViewMatrices& InViewMatrice...,
    const FViewMatrices& InPrevViewMat...
)

Populates the uniform buffer prameters common to all scene view use cases View parameters should be set up in this method if they are required for the view to render properly.

Public function Const

void

 

SetupViewRectUniformBufferParameters

(
    FViewUniformShaderParameters& View...,
    const FIntPoint& InBufferSize,
    const FIntRect& InEffectiveViewRec...,
    const FViewMatrices& InViewMatrice...,
    const FViewMatrices& InPrevViewMat...
)

Sets up the view rect parameters in the view's uniform shader parameters

Public function

void

 

StartFinalPostprocessSettings

(
    FVector InViewLocation
)

Setup defaults and depending on view position (postprocess volumes)

Public function

void

 

UpdatePlanarReflectionViewMatrix

(
    const FSceneView& SourceView,
    const FMirrorMatrix& MirrorMatrix
)

If we late update a view, we need to also late update any planar reflection views derived from it

Public function

void

 

UpdateProjectionMatrix

(
    const FMatrix& NewProjectionMatrix
)

Public function

void

 

UpdateViewMatrix()

Allow things like HMD displays to update the view matrix at the last minute, to minimize perceived latency

Public function Const

bool

 

VerifyMembersChecks()

Verifies all the assertions made on members.

Public function Const

bool

 

WorldToPixel

(
    const FVector& WorldPoint,
    FVector2D& OutPixelLocation
)

Transforms a point from the view's world-space into pixel coordinates relative to the view's X,Y (left, top).

Public function Const

FVector4

 

WorldToScreen

(
    const FVector& WorldPoint
)

Transforms a point from world-space to the view's screen-space.

Constants

References

Module

Engine

Header

Runtime/Engine/Public/SceneView.h

Welcome to the new Unreal Engine 4 Documentation site!

We're working on lots of new features including a feedback system so you can tell us how we are doing. It's not quite ready for use in the wild yet, so head over to the Documentation Feedback forum to tell us about this page or call out any issues you are encountering in the meantime.

We'll be sure to let you know when the new system is up and running.

Post Feedback