FSceneView

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

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Public/SceneView.h

Include

#include "SceneView.h"

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

 

bAllowCrossGPUTransfer

Allow cross GPU transfer for this view

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

FVector

 

BaseHmdViewLocation

View Pose corresponding to BaseHmdOrientation / BaseHmdLocation

Public variable

FRotator

 

BaseHmdViewRotation

Public variable

bool

 

bCameraCut

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

Public variable

TOptional< bool...

 

bCameraMotionBlur

Whether to enable motion blur caused by camera movements

Public variable

bool

 

bForceCameraVisibilityReset

True if we need to force the camera to discard previous frames occlusion.

Public variable

bool

 

bForcePathTracerReset

True if we should force the path tracer to reset its internal accumulation state

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

 

bIsMobileMultiViewEnabled

True if mobile multi-view is enabled.

Public variable

bool

 

bIsMultiViewEnabled

True if multi-view is enabled.

Public variable

bool

 

bIsOfflineRender

Whether this view is being used to render a high quality offline render

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

 

bIsVirtualTexture

Whether this view is being used to render a runtime virtual texture.

Public variable

bool

 

bOverrideGPUMask

Use custom GPUmask

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

 

bSceneCaptureUsesRayTracing

Whether this view uses ray tracing, for views that are used to render a scene capture.

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

TOptional< FMat...

 

ClipToPrevClipOverride

Matrix overrides PrevViewToClip in the view uniform buffer.

Public variable

FLinearColor

 

ColorScale

Color scale multiplier used during post processing

Public variable

FName

 

CurrentBufferVisualizationMode

Current buffer visualization mode

Public variable

FName

 

CurrentVisualizeCalibrationColorMaterialName

Current visualize calibration color material name

Public variable

FName

 

CurrentVisualizeCalibrationCustomMaterialName

Current visualize calibration custom material name

Public variable

FName

 

CurrentVisualizeCalibrationGrayscaleMaterialName

Current visualize calibration grayscale material name

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

Protected variable

FSceneViewState...

 

EyeAdaptationViewState

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

FRHIGPUMask

 

GPUMask

The GPU nodes on which to render this view.

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

FVector4

 

LensPrincipalPointOffsetScale

In some cases, the principal point of the lens is not at the center of the screen, especially for overlapped tile rendering.

Public variable

float

 

LODDistanceFactor

Multiplier for cull distance on objects

Public variable

float

 

MaterialTextureMipBias

Mip bias to apply in material's samplers.

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

TOptional< uint...

 

OverrideFrameIndexValue

The frame index to override, useful for keeping determinism when rendering sequences.

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

TOptional< FTra...

 

PreviousViewTransform

Public variable

EPrimaryScreenP...

 

PrimaryScreenPercentageMethod

Primary screen percentage method to use.

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

float

 

UnderwaterDepth

How far below the water surface this view is. -1 means the view is out of water.

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

FShaderResource...

 

WaterDataBuffer

Public variable

FShaderResource...

 

WaterIndirectionBuffer

Water rendering related data

Public variable

float

 

WorldToMetersScale

Constructors

Name Description

Public function

FSceneView

(
    const FSceneViewInitOptions& InitO...
)

Initialization constructor.

Functions

Name Description

Public function Const

bool

 

AllowGPUParticleUpdate()

Public function

void

 

ConfigureBufferVisualizationSettings()

Configure post process settings for the buffer visualization system

Public function

void

 

ConfigureVisualizeCalibrationSettings()

Configure post process settings for calibration material

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

const FConve...

 

GetDynamicMeshElementsShadowCullFrustum()

Public function Const

const FExpos...

 

GetEyeAdaptationBuffer()

Returns the eye adaptation buffer (mobile) or null if it doesn't exist.

Public function Const

IPooledRende...

 

GetEyeAdaptationTexture()

Returns the eye adaptation texture (SM5+ only) or null if it doesn't exist.

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

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

 

HasValidEyeAdaptationBuffer()

Public function Const

bool

 

HasValidEyeAdaptationTexture()

Tells if the eye adaptation texture / buffer exists without attempting to allocate it.

Public function Const

bool

 

IsInstancedStereoPass()

True if the view should render as an instanced stereo pass

Public function Const

bool

 

IsPerspectiveProjection()

Public function Const

bool

 

IsUnderwater()

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss