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

Go to the source code of this file.

Classes

class  FForwardLightData
 
struct  FForwardBasePassTextures
 
class  FForwardLightingParameters
 
class  TBasePassShaderElementData< LightMapPolicyType >
 
class  TBasePassVertexShaderPolicyParamType< LightMapPolicyType >
 
class  TBasePassVertexShaderBaseType< LightMapPolicyType >
 
class  TBasePassVS< LightMapPolicyType >
 
class  TBasePassComputeShaderPolicyParamType< LightMapPolicyType >
 
class  TBasePassComputeShaderBaseType< LightMapPolicyType >
 
class  TBasePassCS< LightMapPolicyType, bEnableSkyLight, bVoxel, ShaderFrequency >
 
class  TBasePassPixelShaderPolicyParamType< LightMapPolicyType >
 
class  TBasePassPixelShaderBaseType< LightMapPolicyType >
 
class  TBasePassPS< LightMapPolicyType, bEnableSkyLight, GBufferLayout >
 
class  F128BitRTBasePassPS
 
class  FBasePassMeshProcessor
 
struct  FNaniteBasePassData
 

Namespaces

namespace  OIT
 

Functions

bool OIT::IsSortedPixelsEnabledForProject (EShaderPlatform InPlatform)
 
 DECLARE_GPU_DRAWCALL_STAT_EXTERN (Basepass)
 
 DECLARE_GPU_STAT_NAMED_EXTERN (NaniteBasePass, TEXT("Nanite BasePass"))
 
void SetupSharedBasePassParameters (FRDGBuilder &GraphBuilder, const FViewInfo &View, const int32 ViewIndex, bool bLumenGIEnabled, FSharedBasePassUniformParameters &BasePassParameters, bool bForRealtimeSkyCapture=false)
 
TRDGUniformBufferRef< FOpaqueBasePassUniformParametersCreateOpaqueBasePassUniformBuffer (FRDGBuilder &GraphBuilder, const FViewInfo &View, const int32 ViewIndex=0, const FForwardBasePassTextures &ForwardBasePassTextures={}, const FDBufferTextures &DBufferTextures={}, bool bLumenGIEnabled=false, bool bForRealtimeSkyCapture=false)
 
TRDGUniformBufferRef< FTranslucentBasePassUniformParametersCreateTranslucentBasePassUniformBuffer (FRDGBuilder &GraphBuilder, const FScene *Scene, const FViewInfo &View, const int32 ViewIndex=0, const FTranslucencyLightingVolumeTextures &TranslucencyLightingVolumeTextures={}, FRDGTextureRef SceneColorCopyTexture=nullptr, const ESceneTextureSetupMode SceneTextureSetupMode=ESceneTextureSetupMode::None, bool bLumenGIEnabled=false, ETranslucencyPass::Type TranslucencyPass=ETranslucencyPass::TPT_MAX)
 
bool IsGBufferLayoutSupportedForMaterial (EGBufferLayout Layout, const FMeshMaterialShaderPermutationParameters &Params)
 
void ModifyBasePassCSPSCompilationEnvironment (const FMeshMaterialShaderPermutationParameters &Params, EGBufferLayout GBufferLayout, bool bEnableSkyLight, FShaderCompilerEnvironment &OutEnvironment)
 
template<typename LightMapPolicyType >
void AddBasePassComputeShader (bool bEnableSkyLight, bool bVoxel, bool bIsDebug, EShaderFrequency ShaderFrequency, FMaterialShaderTypes &OutShaderTypes)
 
template<typename LightMapPolicyType >
bool GetBasePassShader (const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, LightMapPolicyType LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bVoxel, bool bIsDebug, EShaderFrequency ShaderFrequency, TShaderRef< TBasePassComputeShaderPolicyParamType< LightMapPolicyType > > *ComputeShader)
 
template<>
bool GetBasePassShader< FUniformLightMapPolicy > (const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, FUniformLightMapPolicy LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bVoxel, bool bIsDebug, EShaderFrequency ShaderFrequency, TShaderRef< TBasePassComputeShaderPolicyParamType< FUniformLightMapPolicy > > *ComputeShader)
 
template<typename LightMapPolicyType , EGBufferLayout GBufferLayout>
void AddBasePassPixelShader (bool bEnableSkyLight, bool bIsDebug, FMaterialShaderTypes &OutShaderTypes, bool bIsForOITPass=false)
 
template<typename LightMapPolicyType >
bool GetBasePassShaders (const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, LightMapPolicyType LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bUse128bitRT, bool bIsDebug, EGBufferLayout GBufferLayout, TShaderRef< TBasePassVertexShaderPolicyParamType< LightMapPolicyType > > *VertexShader, TShaderRef< TBasePassPixelShaderPolicyParamType< LightMapPolicyType > > *PixelShader, bool bIsForOITPass=false)
 
template<>
bool GetBasePassShaders< FUniformLightMapPolicy > (const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, FUniformLightMapPolicy LightMapPolicy, ERHIFeatureLevel::Type FeatureLevel, bool bEnableSkyLight, bool bUse128bitRT, bool bIsDebug, EGBufferLayout GBufferLayout, TShaderRef< TBasePassVertexShaderPolicyParamType< FUniformLightMapPolicy > > *VertexShader, TShaderRef< TBasePassPixelShaderPolicyParamType< FUniformLightMapPolicy > > *PixelShader, bool bIsForOITPass)
 
 ENUM_CLASS_FLAGS (FBasePassMeshProcessor::EFlags)
 
void SetupBasePassState (FExclusiveDepthStencil::Type BasePassDepthStencilAccess, const bool bShaderComplexity, FMeshPassProcessorRenderState &DrawRenderState)
 
FMeshDrawCommandSortKey CalculateTranslucentMeshStaticSortKey (const FPrimitiveSceneProxy *RESTRICT PrimitiveSceneProxy, uint16 MeshIdInPrimitive)
 

Variables

int32 GIndirectLightingCache
 

Function Documentation

◆ AddBasePassComputeShader()

template<typename LightMapPolicyType >
void AddBasePassComputeShader ( bool  bEnableSkyLight,
bool  bVoxel,
bool  bIsDebug,
EShaderFrequency  ShaderFrequency,
FMaterialShaderTypes OutShaderTypes 
)

Get shader templates allowing to redirect between compatible shaders.

◆ AddBasePassPixelShader()

template<typename LightMapPolicyType , EGBufferLayout GBufferLayout>
void AddBasePassPixelShader ( bool  bEnableSkyLight,
bool  bIsDebug,
FMaterialShaderTypes OutShaderTypes,
bool  bIsForOITPass = false 
)

Get shader templates allowing to redirect between compatible shaders.

◆ CalculateTranslucentMeshStaticSortKey()

FMeshDrawCommandSortKey CalculateTranslucentMeshStaticSortKey ( const FPrimitiveSceneProxy *RESTRICT  PrimitiveSceneProxy,
uint16  MeshIdInPrimitive 
)
extern

◆ CreateOpaqueBasePassUniformBuffer()

TRDGUniformBufferRef< FOpaqueBasePassUniformParameters > CreateOpaqueBasePassUniformBuffer ( FRDGBuilder GraphBuilder,
const FViewInfo View,
const int32  ViewIndex = 0,
const FForwardBasePassTextures ForwardBasePassTextures = {},
const FDBufferTextures DBufferTextures = {},
bool  bLumenGIEnabled = false,
bool  bForRealtimeSkyCapture = false 
)
extern

◆ CreateTranslucentBasePassUniformBuffer()

TRDGUniformBufferRef< FTranslucentBasePassUniformParameters > CreateTranslucentBasePassUniformBuffer ( FRDGBuilder GraphBuilder,
const FScene Scene,
const FViewInfo View,
const int32  ViewIndex = 0,
const FTranslucencyLightingVolumeTextures TranslucencyLightingVolumeTextures = {},
FRDGTextureRef  SceneColorCopyTexture = nullptr,
const ESceneTextureSetupMode  SceneTextureSetupMode = ESceneTextureSetupMode::None,
bool  bLumenGIEnabled = false,
ETranslucencyPass::Type  TranslucencyPass = ETranslucencyPass::TPT_MAX 
)
extern

◆ DECLARE_GPU_DRAWCALL_STAT_EXTERN()

DECLARE_GPU_DRAWCALL_STAT_EXTERN ( Basepass  )

◆ DECLARE_GPU_STAT_NAMED_EXTERN()

DECLARE_GPU_STAT_NAMED_EXTERN ( NaniteBasePass  ,
TEXT("Nanite BasePass"  
)

◆ ENUM_CLASS_FLAGS()

ENUM_CLASS_FLAGS ( FBasePassMeshProcessor::EFlags  )

◆ GetBasePassShader()

template<typename LightMapPolicyType >
bool GetBasePassShader ( const FMaterial Material,
const FVertexFactoryType VertexFactoryType,
LightMapPolicyType  LightMapPolicy,
ERHIFeatureLevel::Type  FeatureLevel,
bool  bEnableSkyLight,
bool  bVoxel,
bool  bIsDebug,
EShaderFrequency  ShaderFrequency,
TShaderRef< TBasePassComputeShaderPolicyParamType< LightMapPolicyType > > *  ComputeShader 
)

◆ GetBasePassShader< FUniformLightMapPolicy >()

template<>
bool GetBasePassShader< FUniformLightMapPolicy > ( const FMaterial Material,
const FVertexFactoryType VertexFactoryType,
FUniformLightMapPolicy  LightMapPolicy,
ERHIFeatureLevel::Type  FeatureLevel,
bool  bEnableSkyLight,
bool  bVoxel,
bool  bIsDebug,
EShaderFrequency  ShaderFrequency,
TShaderRef< TBasePassComputeShaderPolicyParamType< FUniformLightMapPolicy > > *  ComputeShader 
)

◆ GetBasePassShaders()

template<typename LightMapPolicyType >
bool GetBasePassShaders ( const FMaterial Material,
const FVertexFactoryType VertexFactoryType,
LightMapPolicyType  LightMapPolicy,
ERHIFeatureLevel::Type  FeatureLevel,
bool  bEnableSkyLight,
bool  bUse128bitRT,
bool  bIsDebug,
EGBufferLayout  GBufferLayout,
TShaderRef< TBasePassVertexShaderPolicyParamType< LightMapPolicyType > > *  VertexShader,
TShaderRef< TBasePassPixelShaderPolicyParamType< LightMapPolicyType > > *  PixelShader,
bool  bIsForOITPass = false 
)

◆ GetBasePassShaders< FUniformLightMapPolicy >()

template<>
bool GetBasePassShaders< FUniformLightMapPolicy > ( const FMaterial Material,
const FVertexFactoryType VertexFactoryType,
FUniformLightMapPolicy  LightMapPolicy,
ERHIFeatureLevel::Type  FeatureLevel,
bool  bEnableSkyLight,
bool  bUse128bitRT,
bool  bIsDebug,
EGBufferLayout  GBufferLayout,
TShaderRef< TBasePassVertexShaderPolicyParamType< FUniformLightMapPolicy > > *  VertexShader,
TShaderRef< TBasePassPixelShaderPolicyParamType< FUniformLightMapPolicy > > *  PixelShader,
bool  bIsForOITPass 
)

◆ IsGBufferLayoutSupportedForMaterial()

bool IsGBufferLayoutSupportedForMaterial ( EGBufferLayout  Layout,
const FMeshMaterialShaderPermutationParameters Params 
)
extern

◆ ModifyBasePassCSPSCompilationEnvironment()

void ModifyBasePassCSPSCompilationEnvironment ( const FMeshMaterialShaderPermutationParameters Params,
EGBufferLayout  GBufferLayout,
bool  bEnableSkyLight,
FShaderCompilerEnvironment OutEnvironment 
)
extern

◆ SetupBasePassState()

void SetupBasePassState ( FExclusiveDepthStencil::Type  BasePassDepthStencilAccess,
const bool  bShaderComplexity,
FMeshPassProcessorRenderState DrawRenderState 
)
extern

◆ SetupSharedBasePassParameters()

void SetupSharedBasePassParameters ( FRDGBuilder GraphBuilder,
const FViewInfo View,
const int32  ViewIndex,
bool  bLumenGIEnabled,
FSharedBasePassUniformParameters BasePassParameters,
bool  bForRealtimeSkyCapture = false 
)
extern

Variable Documentation

◆ GIndirectLightingCache

int32 GIndirectLightingCache
extern

Whether to allow the indirect lighting cache to be applied to dynamic objects.