bSupportsDebugViewShaders
bSupportsDebugViewShaders
#Overview
name: bSupportsDebugViewShaders
The value of this variable can be defined or overridden in .ini config files. 7
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of bSupportsDebugViewShaders is to indicate whether a specific shader platform supports debug view shaders. Debug view shaders are special shaders used for visualizing and debugging various aspects of the rendering process.
This setting variable is primarily used by the RHI (Rendering Hardware Interface) module of Unreal Engine. It is part of the data-driven shader platform information system, which allows for flexible configuration of shader platform capabilities.
The value of this variable is set in the ParseDataDrivenShaderInfo function, which reads the configuration from a config section. It’s also forcibly set to true for preview platforms in the UpdatePreviewPlatforms function, ensuring that the editor always supports debug view shaders.
This variable interacts with other shader platform capability flags, such as bIsPC, bIsConsole, and bSupportsMobileMultiView. It’s part of a larger structure (FGenericDataDrivenShaderPlatformInfo) that describes various capabilities of a shader platform.
Developers must be aware that this flag affects the availability of debug view shaders on different platforms. When set to true, it enables the use of debug view shaders, which can be crucial for development and debugging but may have performance implications.
Best practices when using this variable include:
- Ensure it’s correctly set for each platform you’re targeting.
- Use it in conjunction with other platform capability flags to make informed decisions about shader compilation and rendering paths.
- Be aware that forcing it to true in preview modes (as done in UpdatePreviewPlatforms) may not reflect the actual capabilities of the target platform.
- When developing cross-platform applications, use this flag to conditionally compile or enable debug view shader features.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:31, section: [ShaderPlatform METAL_SM5]
- INI Section:
ShaderPlatform METAL_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:71, section: [ShaderPlatform METAL_SM6]
- INI Section:
ShaderPlatform METAL_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:24, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:155, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:40, section: [ShaderPlatform PCD3D_SM5]
- INI Section:
ShaderPlatform PCD3D_SM5
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:91, section: [ShaderPlatform PCD3D_SM6]
- INI Section:
ShaderPlatform PCD3D_SM6
- Raw value:
true
- Is Array:
False
Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:159, section: [ShaderPlatform PCD3D_ES3_1]
- INI Section:
ShaderPlatform PCD3D_ES3_1
- Raw value:
true
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:203
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bIsConsole);
GET_SECTION_BOOL_HELPER(bIsAndroidOpenGLES);
GET_SECTION_BOOL_HELPER(bSupportsDebugViewShaders);
GET_SECTION_BOOL_HELPER(bSupportsMobileMultiView);
GET_SECTION_BOOL_HELPER(bSupportsArrayTextureCompression);
GET_SECTION_BOOL_HELPER(bSupportsDistanceFields);
GET_SECTION_BOOL_HELPER(bSupportsDiaphragmDOF);
GET_SECTION_BOOL_HELPER(bSupportsRGBColorBuffer);
GET_SECTION_BOOL_HELPER(bSupportsCapsuleShadows);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:440
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::UpdatePreviewPlatforms
Source code excerpt:
// Editor is always PC, never console and always supports debug view shaders
PREVIEW_FORCE_SETTING(bIsPC, true);
PREVIEW_FORCE_SETTING(bSupportsDebugViewShaders, true);
PREVIEW_FORCE_SETTING(bIsConsole, false);
// Support for stereo features requires extra consideration. The editor may not use the same technique as the preview platform,
// particularly MobileMultiView may be substituted by a fallback path. In order to avoid inundating real mobile platforms
// with the properties needed for the desktop MMV fallback path, override them here with the editor ones to make MMV preview possible
if (PreviewInfo.bSupportsMobileMultiView && !RuntimeInfo.bSupportsMobileMultiView)
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:29
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 bIsAndroidOpenGLES : 1;
uint32 bSupportsDebugViewShaders : 1;
uint32 bSupportsMobileMultiView : 1;
uint32 bSupportsArrayTextureCompression : 1;
uint32 bSupportsDistanceFields : 1; // used for DFShadows and DFAO - since they had the same checks
uint32 bSupportsDiaphragmDOF : 1;
uint32 bSupportsRGBColorBuffer : 1;
uint32 bSupportsCapsuleShadows : 1;
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:233
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsDebugViewShaders
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsDebugViewShaders;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsMobileMultiView(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsMobileMultiView;