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

Functions

bool MobileLocalLightsBufferEnabled (const FStaticShaderPlatform Platform)
 
bool MobileMergeLocalLightsInPrepassEnabled (const FStaticShaderPlatform Platform)
 
bool MobileMergeLocalLightsInBasepassEnabled (const FStaticShaderPlatform Platform)
 
FAutoConsoleVariableRef CVarMobileForwardLocalLightsSinglePermutation (TEXT("r.Mobile.Forward.LocalLightsSinglePermutation"), GMobileForwardLocalLightsSinglePermutation, TEXT("Whether to use the same permutation regardless of local lights state. This may improve RT time at expense of some GPU time"), ECVF_Scalability|ECVF_RenderThreadSafe)
 
bool MobileLocalLightsUseSinglePermutation (EShaderPlatform ShaderPlatform)
 
EMobileLocalLightSetting GetMobileForwardLocalLightSetting (EShaderPlatform ShaderPlatform)
 
uint8 GetMobileShadingModelStencilValue (FMaterialShadingModelField ShadingModel)
 
void SetMobileBasePassDepthState (FMeshPassProcessorRenderState &DrawRenderState, const FPrimitiveSceneProxy *PrimitiveSceneProxy, const FMaterial &Material, FMaterialShadingModelField ShadingModels, bool bUsesDeferredShading, TOptional< uint32 > DitheringFlag)
 
template<ELightMapPolicyType Policy, EMobileLocalLightSetting LocalLightSetting>
bool GetUniformMobileBasePassShaders (const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, EMobileTranslucentColorTransmittanceMode ColoredTransmittanceFallback, TShaderRef< TMobileBasePassVSPolicyParamType< FUniformLightMapPolicy > > &VertexShader, TShaderRef< TMobileBasePassPSPolicyParamType< FUniformLightMapPolicy > > &PixelShader)
 
template<EMobileLocalLightSetting LocalLightSetting>
bool GetMobileBasePassShaders (ELightMapPolicyType LightMapPolicyType, const FMaterial &Material, const FVertexFactoryType *VertexFactoryType, EMobileTranslucentColorTransmittanceMode ColoredTransmittanceFallback, TShaderRef< TMobileBasePassVSPolicyParamType< FUniformLightMapPolicy > > &VertexShader, TShaderRef< TMobileBasePassPSPolicyParamType< FUniformLightMapPolicy > > &PixelShader)
 
FMeshPassProcessorCreateMobileBasePassProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
FMeshPassProcessorCreateMobileBasePassCSMProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
FMeshPassProcessorCreateMobileTranslucencyStandardPassProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
FMeshPassProcessorCreateMobileTranslucencyAfterDOFProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
FMeshPassProcessorCreateMobileTranslucencyAllPassProcessor (ERHIFeatureLevel::Type FeatureLevel, const FScene *Scene, const FSceneView *InViewIfDynamicMeshCommand, FMeshPassDrawListContext *InDrawListContext)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (MobileBasePass, CreateMobileBasePassProcessor, EShadingPath::Mobile, EMeshPass::BasePass, EMeshPassFlags::CachedMeshCommands|EMeshPassFlags::MainView)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (MobileBasePassCSM, CreateMobileBasePassCSMProcessor, EShadingPath::Mobile, EMeshPass::MobileBasePassCSM, EMeshPassFlags::CachedMeshCommands|EMeshPassFlags::MainView)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (MobileTranslucencyAllPass, CreateMobileTranslucencyAllPassProcessor, EShadingPath::Mobile, EMeshPass::TranslucencyAll, EMeshPassFlags::MainView)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (MobileTranslucencyStandardPass, CreateMobileTranslucencyStandardPassProcessor, EShadingPath::Mobile, EMeshPass::TranslucencyStandard, EMeshPassFlags::MainView)
 
 REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR (MobileTranslucencyAfterDOFPass, CreateMobileTranslucencyAfterDOFProcessor, EShadingPath::Mobile, EMeshPass::TranslucencyAfterDOF, EMeshPassFlags::MainView)
 

Variables

int32 GMobileForwardLocalLightsSinglePermutation = 0
 

Function Documentation

◆ CreateMobileBasePassCSMProcessor()

FMeshPassProcessor * CreateMobileBasePassCSMProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ CreateMobileBasePassProcessor()

FMeshPassProcessor * CreateMobileBasePassProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ CreateMobileTranslucencyAfterDOFProcessor()

FMeshPassProcessor * CreateMobileTranslucencyAfterDOFProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ CreateMobileTranslucencyAllPassProcessor()

FMeshPassProcessor * CreateMobileTranslucencyAllPassProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ CreateMobileTranslucencyStandardPassProcessor()

FMeshPassProcessor * CreateMobileTranslucencyStandardPassProcessor ( ERHIFeatureLevel::Type  FeatureLevel,
const FScene Scene,
const FSceneView InViewIfDynamicMeshCommand,
FMeshPassDrawListContext InDrawListContext 
)

◆ CVarMobileForwardLocalLightsSinglePermutation()

FAutoConsoleVariableRef CVarMobileForwardLocalLightsSinglePermutation ( TEXT("r.Mobile.Forward.LocalLightsSinglePermutation")  ,
GMobileForwardLocalLightsSinglePermutation  ,
TEXT("Whether to use the same permutation regardless of local lights state. This may improve RT time at expense of some GPU time" ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GetMobileBasePassShaders()

template<EMobileLocalLightSetting LocalLightSetting>
bool GetMobileBasePassShaders ( ELightMapPolicyType  LightMapPolicyType,
const FMaterial Material,
const FVertexFactoryType VertexFactoryType,
EMobileTranslucentColorTransmittanceMode  ColoredTransmittanceFallback,
TShaderRef< TMobileBasePassVSPolicyParamType< FUniformLightMapPolicy > > &  VertexShader,
TShaderRef< TMobileBasePassPSPolicyParamType< FUniformLightMapPolicy > > &  PixelShader 
)

◆ GetMobileForwardLocalLightSetting()

EMobileLocalLightSetting GetMobileForwardLocalLightSetting ( EShaderPlatform  ShaderPlatform)

◆ GetMobileShadingModelStencilValue()

uint8 GetMobileShadingModelStencilValue ( FMaterialShadingModelField  ShadingModel)

◆ GetUniformMobileBasePassShaders()

template<ELightMapPolicyType Policy, EMobileLocalLightSetting LocalLightSetting>
bool GetUniformMobileBasePassShaders ( const FMaterial Material,
const FVertexFactoryType VertexFactoryType,
EMobileTranslucentColorTransmittanceMode  ColoredTransmittanceFallback,
TShaderRef< TMobileBasePassVSPolicyParamType< FUniformLightMapPolicy > > &  VertexShader,
TShaderRef< TMobileBasePassPSPolicyParamType< FUniformLightMapPolicy > > &  PixelShader 
)

◆ MobileLocalLightsBufferEnabled()

bool MobileLocalLightsBufferEnabled ( const FStaticShaderPlatform  Platform)

◆ MobileLocalLightsUseSinglePermutation()

bool MobileLocalLightsUseSinglePermutation ( EShaderPlatform  ShaderPlatform)

◆ MobileMergeLocalLightsInBasepassEnabled()

bool MobileMergeLocalLightsInBasepassEnabled ( const FStaticShaderPlatform  Platform)

◆ MobileMergeLocalLightsInPrepassEnabled()

bool MobileMergeLocalLightsInPrepassEnabled ( const FStaticShaderPlatform  Platform)

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [1/5]

REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR ( MobileBasePass  ,
CreateMobileBasePassProcessor  ,
EShadingPath::Mobile  ,
EMeshPass::BasePass  ,
EMeshPassFlags::CachedMeshCommands|EMeshPassFlags::MainView   
)

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [2/5]

REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR ( MobileBasePassCSM  ,
CreateMobileBasePassCSMProcessor  ,
EShadingPath::Mobile  ,
EMeshPass::MobileBasePassCSM  ,
EMeshPassFlags::CachedMeshCommands|EMeshPassFlags::MainView   
)

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [3/5]

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [4/5]

◆ REGISTER_MESHPASSPROCESSOR_AND_PSOCOLLECTOR() [5/5]

◆ SetMobileBasePassDepthState()

void SetMobileBasePassDepthState ( FMeshPassProcessorRenderState DrawRenderState,
const FPrimitiveSceneProxy PrimitiveSceneProxy,
const FMaterial Material,
FMaterialShadingModelField  ShadingModels,
bool  bUsesDeferredShading,
TOptional< uint32 DitheringFlag 
)

Variable Documentation

◆ GMobileForwardLocalLightsSinglePermutation

int32 GMobileForwardLocalLightsSinglePermutation = 0