bRequiresDisableForwardLocalLights

bRequiresDisableForwardLocalLights

#Overview

name: bRequiresDisableForwardLocalLights

The value of this variable can be defined or overridden in .ini config files. 3 .ini config files referencing this setting variable.

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bRequiresDisableForwardLocalLights is to indicate whether a specific shader platform requires disabling forward local lights in the rendering process. This setting is part of the rendering system configuration in Unreal Engine 5.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine. It’s specifically part of the data-driven shader platform information system, which allows for platform-specific rendering configurations.

The value of this variable is set through the data-driven shader platform info parsing process, as seen in the FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo function in DataDrivenShaderPlatformInfo.cpp. It’s likely populated from a configuration file or platform-specific data source.

This variable interacts with other shader platform configuration variables, as evidenced by its placement alongside other similar boolean flags in the FGenericDataDrivenShaderPlatformInfo class.

Developers must be aware that this setting is platform-specific and may affect the rendering pipeline, particularly how forward local lights are handled. Changing this value could have significant impacts on rendering performance and visual output for the affected platforms.

Best practices when using this variable include:

  1. Ensuring it’s only modified when there’s a clear understanding of the target platform’s requirements.
  2. Testing thoroughly on the specific platform when changes are made to this setting.
  3. Considering the implications on rendering performance and visual quality when enabling or disabling forward local lights.
  4. Coordinating with the rendering team when making changes, as it may affect multiple areas of the rendering pipeline.

Developers should also note that this is a low-level rendering setting, and changes should be made cautiously and with full understanding of the rendering pipeline for the target platform.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:104, section: [ShaderPlatform VULKAN_SM5_ANDROID]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:106, section: [ShaderPlatform VULKAN_SM5]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:225, section: [ShaderPlatform VULKAN_SM6]

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:253

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bRequiresGeneratePrevTransformBuffer);
	GET_SECTION_BOOL_HELPER(bRequiresRenderTargetDuringRaster);
	GET_SECTION_BOOL_HELPER(bRequiresDisableForwardLocalLights);
	GET_SECTION_BOOL_HELPER(bCompileSignalProcessingPipeline);
	GET_SECTION_BOOL_HELPER(bSupportsMeshShadersTier0);
	GET_SECTION_BOOL_HELPER(bSupportsMeshShadersTier1);
	GET_SECTION_BOOL_HELPER(bSupportsMeshShadersWithClipDistance);
	GET_SECTION_INT_HELPER(MaxMeshShaderThreadGroupSize);
	GET_SECTION_BOOL_HELPER(bRequiresUnwrappedMeshShaderArgs);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:77

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bRequiresGeneratePrevTransformBuffer : 1;
	uint32 bRequiresRenderTargetDuringRaster : 1;
	uint32 bRequiresDisableForwardLocalLights : 1;
	uint32 bCompileSignalProcessingPipeline : 1;
	uint32 bSupportsMeshShadersTier0 : 1;
	uint32 bSupportsMeshShadersTier1 : 1;
	uint32 bSupportsMeshShadersWithClipDistance : 1;
	uint32 MaxMeshShaderThreadGroupSize : 10;
	uint32 bRequiresUnwrappedMeshShaderArgs : 1;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:545

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetRequiresDisableForwardLocalLights

Source code excerpt:

	{
		check(IsValid(Platform));
		return Infos[Platform].bRequiresDisableForwardLocalLights;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetCompileSignalProcessingPipeline(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bCompileSignalProcessingPipeline;