UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SceneView.h File Reference

Go to the source code of this file.

Classes

struct  FSceneViewProjectionData
 
struct  FFirstPersonParameters
 
struct  FSceneViewInitOptions
 
struct  FViewMatrices
 
struct  FViewMatrices::FMinimalInitializer
 
class  FSceneViewFixLayout
 
class  FSceneView
 
struct  FSceneView::FWaterInfoTextureRenderingParams
 
struct  FDisplayInternalsData
 
class  ISceneViewFamilyExtention
 
class  ISceneViewFamilyExtentionData
 
class  ISceneViewFamilyScreenPercentage
 
class  FSceneViewFamily
 
struct  FSceneViewFamily::ConstructionValues
 
class  FSceneViewFamilyContext
 
struct  FSetupViewUniformParametersInputs
 

Namespaces

namespace  UE
 
namespace  UE::RenderViewportFeedback
 
namespace  UE::Renderer
 
namespace  UE::Renderer::Private
 
namespace  InstancedViewParametersUtils
 
namespace  ViewParametersUtils
 
namespace  EDrawDynamicFlags
 

Macros

#define MAX_PHYSICS_FIELD_TARGETS   32
 
#define SKY_IRRADIANCE_ENVIRONMENT_MAP_VEC4_COUNT   8
 
#define VIEW_UNIFORM_BUFFER_MEMBER_TABLE
 
#define VIEW_UNIFORM_BUFFER_MEMBER(type, identifier)    SHADER_PARAMETER(type, identifier)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW(type, identifier)    SHADER_PARAMETER(type, identifier)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_EX(type, identifier, precision)    SHADER_PARAMETER_EX(type, identifier, precision)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX(type, identifier, precision)    SHADER_PARAMETER_EX(type, identifier, precision)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY(type, identifier, dimension)    SHADER_PARAMETER_ARRAY(type, identifier, [dimension])
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW(type, identifier, dimension)    SHADER_PARAMETER_ARRAY(type, identifier, [dimension])
 
#define INSTANCED_VIEW_COUNT   2
 
#define VIEW_UNIFORM_BUFFER_MEMBER(type, identifier)    SHADER_PARAMETER(type, identifier)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW(type, identifier)    SHADER_PARAMETER_ARRAY(TShaderParameterTypeInfo<type>::TInstancedType, identifier, [INSTANCED_VIEW_COUNT])
 
#define VIEW_UNIFORM_BUFFER_MEMBER_EX(type, identifier, precision)    SHADER_PARAMETER_EX(type, identifier, precision)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX(type, identifier, precision)    SHADER_PARAMETER_ARRAY_EX(TShaderParameterTypeInfo<type>::TInstancedType, identifier, [INSTANCED_VIEW_COUNT], precision)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY(type, identifier, dimension)    SHADER_PARAMETER_ARRAY(type, identifier, [dimension])
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW(type, identifier, dimension)    SHADER_PARAMETER_ARRAY(type, identifier, [dimension * INSTANCED_VIEW_COUNT])
 
#define VIEW_UNIFORM_BUFFER_MEMBER(type, identifier)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW(type, identifier)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_EX(type, identifier, precision)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX(type, identifier, precision)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY(type, identifier, dimension)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW(type, identifier, dimension)
 
#define VIEW_UNIFORM_BUFFER_MEMBER(type, identifier)    FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW(type, identifier)    FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));
 
#define VIEW_UNIFORM_BUFFER_MEMBER_EX(type, identifier, precision)    FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));
 
#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX(type, identifier, precision)    FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY(type, identifier, dimension)
 
#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW(type, identifier, dimension)
 

Enumerations

enum class  EPrimaryScreenPercentageMethod { SpatialUpscale , TemporalUpscale , RawOutput }
 
enum class  ESecondaryScreenPercentageMethod { NearestSpatialUpscale , LowerPixelDensitySimulation }
 
enum  ETranslucencyVolumeCascade { TVC_Inner , TVC_Outer , TVC_MAX }
 
enum  EDrawDynamicFlags::Type : int32 { EDrawDynamicFlags::None = 0 , EDrawDynamicFlags::ForceLowestLOD = 0x1 , EDrawDynamicFlags::FarShadowCascade = 0x2 }
 
enum class  EViewWaterIntersection : uint8 { OutsideWater , PossiblyIntersectingWater , InsideWater }
 

Functions

ENGINE_API void SetupCommonViewUniformBufferParameters (FViewUniformShaderParameters &ViewUniformShaderParameters, const FIntPoint &InBufferSize, int32 NumMSAASamples, const FIntRect &InEffectiveViewRect, const FViewMatrices &InViewMatrices, const FViewMatrices &InPrevViewMatrices, const FSetupViewUniformParametersInputs &Inputs)
 
ENGINE_API void SetupViewRectUniformBufferParameters (FViewUniformShaderParameters &ViewUniformShaderParameters, const FIntPoint &InBufferSize, const FIntRect &InEffectiveViewRect, const FViewMatrices &InViewMatrices, const FViewMatrices &InPrevViewMatrice, const FSetupViewUniformParametersInputs &Inputs)
 

Variables

constexpr int MAX_MOBILE_SHADOWCASCADES = 4
 

Macro Definition Documentation

◆ INSTANCED_VIEW_COUNT

#define INSTANCED_VIEW_COUNT   2

Copy of the view uniform shader parameters associated with a view for instanced stereo.

◆ MAX_PHYSICS_FIELD_TARGETS

#define MAX_PHYSICS_FIELD_TARGETS   32

◆ SKY_IRRADIANCE_ENVIRONMENT_MAP_VEC4_COUNT

#define SKY_IRRADIANCE_ENVIRONMENT_MAP_VEC4_COUNT   8

◆ VIEW_UNIFORM_BUFFER_MEMBER [1/4]

#define VIEW_UNIFORM_BUFFER_MEMBER (   type,
  identifier 
)     SHADER_PARAMETER(type, identifier)

The uniform shader parameters associated with a view.

Copy of a base view uniform shader parameters structure into another. But only parameters, not resources, and not instanced views.

◆ VIEW_UNIFORM_BUFFER_MEMBER [2/4]

#define VIEW_UNIFORM_BUFFER_MEMBER (   type,
  identifier 
)     SHADER_PARAMETER(type, identifier)

The uniform shader parameters associated with a view.

Copy of a base view uniform shader parameters structure into another. But only parameters, not resources, and not instanced views.

◆ VIEW_UNIFORM_BUFFER_MEMBER [3/4]

#define VIEW_UNIFORM_BUFFER_MEMBER (   type,
  identifier 
)
Value:
if ( CopyViewId == 0 ) \
{ \
FMemory::Memcpy(&InstancedViewParameters.identifier, &ViewParameters.identifier, sizeof(type)); \
}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127

The uniform shader parameters associated with a view.

Copy of a base view uniform shader parameters structure into another. But only parameters, not resources, and not instanced views.

◆ VIEW_UNIFORM_BUFFER_MEMBER [4/4]

#define VIEW_UNIFORM_BUFFER_MEMBER (   type,
  identifier 
)     FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));

The uniform shader parameters associated with a view.

Copy of a base view uniform shader parameters structure into another. But only parameters, not resources, and not instanced views.

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY [1/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY (   type,
  identifier,
  dimension 
)     SHADER_PARAMETER_ARRAY(type, identifier, [dimension])

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY [2/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY (   type,
  identifier,
  dimension 
)     SHADER_PARAMETER_ARRAY(type, identifier, [dimension])

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY [3/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY (   type,
  identifier,
  dimension 
)
Value:
if ( CopyViewId == 0 ) \
{ \
for (uint32 ElementIndex = 0; ElementIndex < dimension; ElementIndex++) \
{ \
FMemory::Memcpy(&InstancedViewParameters.identifier[CopyViewId * dimension + ElementIndex], &ViewParameters.identifier[ElementIndex], sizeof(type)); \
} \
}
uint32_t uint32
Definition binka_ue_file_header.h:6

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY [4/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY (   type,
  identifier,
  dimension 
)
Value:
for (uint32 ElementIndex = 0; ElementIndex < dimension; ElementIndex++) \
{ \
FMemory::Memcpy(&DstView.identifier[ElementIndex], &SrcView.identifier[ElementIndex], sizeof(type)); \
} \

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW [1/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW (   type,
  identifier,
  dimension 
)     SHADER_PARAMETER_ARRAY(type, identifier, [dimension])

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW [2/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW (   type,
  identifier,
  dimension 
)     SHADER_PARAMETER_ARRAY(type, identifier, [dimension * INSTANCED_VIEW_COUNT])

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW [3/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW (   type,
  identifier,
  dimension 
)
Value:
for (uint32 ElementIndex = 0; ElementIndex < dimension; ElementIndex++) \
{ \
FMemory::Memcpy(&InstancedViewParameters.identifier[CopyViewId * dimension + ElementIndex], &ViewParameters.identifier[ElementIndex], sizeof(type)); \
check(FMemory::MemIsZero(((uint8*) &InstancedViewParameters.identifier[CopyViewId * dimension + ElementIndex]) + sizeof(type), sizeof(TShaderParameterTypeInfo<type>::TInstancedType) - sizeof(type))); \
}
uint8_t uint8
Definition binka_ue_file_header.h:8
static bool MemIsZero(const void *Ptr, SIZE_T Count)
Definition UnrealMemory.h:137
TypeParameter TInstancedType
Definition ShaderParameterMacros.h:922

◆ VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW [4/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_ARRAY_PER_VIEW (   type,
  identifier,
  dimension 
)
Value:
for (uint32 ElementIndex = 0; ElementIndex < dimension; ElementIndex++) \
{ \
FMemory::Memcpy(&DstView.identifier[ElementIndex], &SrcView.identifier[ElementIndex], sizeof(type)); \
} \

◆ VIEW_UNIFORM_BUFFER_MEMBER_EX [1/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_EX (   type,
  identifier,
  precision 
)     SHADER_PARAMETER_EX(type, identifier, precision)

◆ VIEW_UNIFORM_BUFFER_MEMBER_EX [2/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_EX (   type,
  identifier,
  precision 
)     SHADER_PARAMETER_EX(type, identifier, precision)

◆ VIEW_UNIFORM_BUFFER_MEMBER_EX [3/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_EX (   type,
  identifier,
  precision 
)
Value:
if ( CopyViewId == 0 ) \
{ \
FMemory::Memcpy(&InstancedViewParameters.identifier, &ViewParameters.identifier, sizeof(type)); \
}

◆ VIEW_UNIFORM_BUFFER_MEMBER_EX [4/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_EX (   type,
  identifier,
  precision 
)     FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW [1/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW (   type,
  identifier 
)     SHADER_PARAMETER(type, identifier)

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW [2/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW (   type,
  identifier 
)     SHADER_PARAMETER_ARRAY(TShaderParameterTypeInfo<type>::TInstancedType, identifier, [INSTANCED_VIEW_COUNT])

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW [3/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW (   type,
  identifier 
)
Value:
FMemory::Memcpy(&InstancedViewParameters.identifier[CopyViewId], &ViewParameters.identifier, sizeof(type)); \
static UE_FORCEINLINE_HINT void * Memcpy(void *Dest, const void *Src, SIZE_T Count)
Definition UnrealMemory.h:160

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW [4/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW (   type,
  identifier 
)     FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX [1/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX (   type,
  identifier,
  precision 
)     SHADER_PARAMETER_EX(type, identifier, precision)

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX [2/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX (   type,
  identifier,
  precision 
)     SHADER_PARAMETER_ARRAY_EX(TShaderParameterTypeInfo<type>::TInstancedType, identifier, [INSTANCED_VIEW_COUNT], precision)

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX [3/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX (   type,
  identifier,
  precision 
)
Value:

◆ VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX [4/4]

#define VIEW_UNIFORM_BUFFER_MEMBER_PER_VIEW_EX (   type,
  identifier,
  precision 
)     FMemory::Memcpy(&DstView.identifier, &SrcView.identifier, sizeof(type));

◆ VIEW_UNIFORM_BUFFER_MEMBER_TABLE

#define VIEW_UNIFORM_BUFFER_MEMBER_TABLE

Enumeration Type Documentation

◆ EPrimaryScreenPercentageMethod

Method used for primary screen percentage method.

Enumerator
SpatialUpscale 
TemporalUpscale 
RawOutput 

◆ ESecondaryScreenPercentageMethod

Method used for second screen percentage method, that is a second spatial upscale pass at the very end, independent of screen percentage show flag.

Enumerator
NearestSpatialUpscale 
LowerPixelDensitySimulation 

◆ ETranslucencyVolumeCascade

The uniform shader parameters for a mobile directional light and its shadow. One uniform buffer will be created for the first directional light in each lighting channel. Enumeration for currently used translucent lighting volume cascades

Enumerator
TVC_Inner 
TVC_Outer 
TVC_MAX 

◆ EViewWaterIntersection

Enumerator
OutsideWater 
PossiblyIntersectingWater 
InsideWater 

Function Documentation

◆ SetupCommonViewUniformBufferParameters()

ENGINE_API void SetupCommonViewUniformBufferParameters ( FViewUniformShaderParameters ViewUniformShaderParameters,
const FIntPoint InBufferSize,
int32  NumMSAASamples,
const FIntRect InEffectiveViewRect,
const FViewMatrices InViewMatrices,
const FViewMatrices InPrevViewMatrices,
const FSetupViewUniformParametersInputs Inputs 
)

◆ SetupViewRectUniformBufferParameters()

ENGINE_API void SetupViewRectUniformBufferParameters ( FViewUniformShaderParameters ViewUniformShaderParameters,
const FIntPoint InBufferSize,
const FIntRect InEffectiveViewRect,
const FViewMatrices InViewMatrices,
const FViewMatrices InPrevViewMatrice,
const FSetupViewUniformParametersInputs Inputs 
)

Ortho projection does not use FOV calculations, so rather than sourcing the projection matrix values in CommonViewUniformBuffer.ush, the appropriate values are uploaded in the per view uniform buffer (projection matrix values for perspective, 1.0f for ortho). Doing this here avoids unnecessarily checking for perspective vs ortho in shaders at runtime.

Variable Documentation

◆ MAX_MOBILE_SHADOWCASCADES

constexpr int MAX_MOBILE_SHADOWCASCADES = 4
inlineconstexpr