bSupportsRGBColorBuffer

bSupportsRGBColorBuffer

#Overview

name: bSupportsRGBColorBuffer

The value of this variable can be defined or overridden in .ini config files. 2 .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 bSupportsRGBColorBuffer is to indicate whether a specific shader platform supports RGB color buffers. This is related to the rendering system in Unreal Engine 5.

This setting variable is primarily used within the RHI (Rendering Hardware Interface) subsystem of Unreal Engine. It’s part of the data-driven shader platform information, which allows the engine to adapt its rendering capabilities based on the current hardware and graphics API.

The value of this variable is set during the parsing of data-driven shader information. This occurs in the ParseDataDrivenShaderInfo function within the FGenericDataDrivenShaderPlatformInfo class.

bSupportsRGBColorBuffer interacts with other shader platform capabilities, such as bSupportsDistanceFields, bSupportsDiaphragmDOF, and bSupportsCapsuleShadows. These variables collectively define the features supported by a particular shader platform.

Developers must be aware that this variable’s value can affect the rendering pipeline and the available color buffer formats. If a platform doesn’t support RGB color buffers, alternative color formats may need to be used, which could impact visual quality or performance.

Best practices when using this variable include:

  1. Always check its value before attempting to use RGB color buffers in your rendering code.
  2. Provide fallback options for platforms that don’t support RGB color buffers.
  3. Use the provided static function GetSupportsRGBColorBuffer to query this capability, ensuring thread-safe access to the information.
  4. Consider this variable when optimizing rendering performance or quality across different platforms.
  5. Be aware of how this capability interacts with other rendering features and adjust your rendering pipeline accordingly.

#Setting Variables

#References In INI files

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

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:161, 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:208

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bSupportsDistanceFields);
	GET_SECTION_BOOL_HELPER(bSupportsDiaphragmDOF);
	GET_SECTION_BOOL_HELPER(bSupportsRGBColorBuffer);
	GET_SECTION_BOOL_HELPER(bSupportsCapsuleShadows);
	GET_SECTION_BOOL_HELPER(bSupportsPercentageCloserShadows);
	GET_SECTION_BOOL_HELPER(bSupportsIndexBufferUAVs);
	GET_SECTION_BOOL_HELPER(bSupportsInstancedStereo);
	GET_SECTION_SUPPORT_HELPER(SupportsMultiViewport);
	GET_SECTION_BOOL_HELPER(bSupportsMSAA);

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bSupportsDistanceFields : 1; // used for DFShadows and DFAO - since they had the same checks
	uint32 bSupportsDiaphragmDOF : 1;
	uint32 bSupportsRGBColorBuffer : 1;
	uint32 bSupportsCapsuleShadows : 1;
	uint32 bSupportsPercentageCloserShadows : 1;
	uint32 bSupportsIndexBufferUAVs : 1;
	uint32 bSupportsInstancedStereo : 1;
	uint32 SupportsMultiViewport : int32(ERHIFeatureSupport::NumBits);
	uint32 bSupportsMSAA : 1;

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsRGBColorBuffer

Source code excerpt:

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

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