bSupportsConservativeRasterization
bSupportsConservativeRasterization
#Overview
name: bSupportsConservativeRasterization
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 bSupportsConservativeRasterization is to indicate whether a specific shader platform supports conservative rasterization, a rendering technique that ensures all pixels touched by a primitive are rasterized, even if they’re only partially covered.
This setting variable is primarily used within the RHI (Rendering Hardware Interface) module of Unreal Engine 5. It’s part of the data-driven shader platform information system, which allows the engine to adapt its rendering capabilities based on the current hardware and graphics API.
The value of this variable is set in the FGenericDataDrivenShaderPlatformInfo class, specifically in the ParseDataDrivenShaderInfo function. It’s likely populated from a configuration file or hardware capabilities query during engine initialization.
This variable interacts with other shader platform capabilities, such as bSupportsRTIndexFromVS, bSupportsIntrinsicWaveOnce, and bSupportsWaveOperations, which are all part of the same shader platform information structure.
Developers must be aware that this variable is platform-specific. Its value can differ depending on the target hardware and graphics API. It’s crucial to check this capability before attempting to use conservative rasterization techniques in shaders or rendering code.
Best practices when using this variable include:
- Always check its value using the GetSupportsConservativeRasterization function before implementing conservative rasterization techniques.
- Consider providing fallback rendering paths for platforms that don’t support conservative rasterization.
- Use this variable in conjunction with other shader platform capabilities to make informed decisions about rendering techniques and optimizations.
- Remember that this is a read-only value determined by the platform; it shouldn’t be modified directly by game code.
#Setting Variables
#References In INI files
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:83, section: [ShaderPlatform VULKAN_SM5]
- INI Section:
ShaderPlatform VULKAN_SM5
- Raw value:
false
- Is Array:
False
Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:202, section: [ShaderPlatform VULKAN_SM6]
- INI Section:
ShaderPlatform VULKAN_SM6
- Raw value:
false
- 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:239
Scope (from outer to inner):
file
function void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo
Source code excerpt:
GET_SECTION_BOOL_HELPER(bSupportsRTIndexFromVS);
GET_SECTION_BOOL_HELPER(bSupportsIntrinsicWaveOnce);
GET_SECTION_BOOL_HELPER(bSupportsConservativeRasterization);
GET_SECTION_SUPPORT_HELPER(bSupportsWaveOperations);
GET_SECTION_BOOL_HELPER(bSupportsWavePermute);
GET_SECTION_INT_HELPER(MinimumWaveSize);
GET_SECTION_INT_HELPER(MaximumWaveSize);
GET_SECTION_BOOL_HELPER(bRequiresExplicit128bitRT);
GET_SECTION_BOOL_HELPER(bSupportsGen5TemporalAA);
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:67
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
Source code excerpt:
uint32 MaximumWaveSize : 8;
uint32 bSupportsIntrinsicWaveOnce : 1;
uint32 bSupportsConservativeRasterization : 1;
uint32 bRequiresExplicit128bitRT : 1;
uint32 bSupportsGen5TemporalAA : 1;
uint32 bTargetsTiledGPU : 1;
uint32 bNeedsOfflineCompiler : 1;
uint32 bSupportsComputeFramework : 1;
uint32 bSupportsAnisotropicMaterials : 1;
#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:515
Scope (from outer to inner):
file
class class FGenericDataDrivenShaderPlatformInfo
function static const bool GetSupportsConservativeRasterization
Source code excerpt:
{
check(IsValid(Platform));
return Infos[Platform].bSupportsConservativeRasterization;
}
static FORCEINLINE_DEBUGGABLE const bool GetSupportsGen5TemporalAA(const FStaticShaderPlatform Platform)
{
check(IsValid(Platform));
return Infos[Platform].bSupportsGen5TemporalAA;