bSupportsAnisotropicMaterials

bSupportsAnisotropicMaterials

#Overview

name: bSupportsAnisotropicMaterials

The value of this variable can be defined or overridden in .ini config files. 6 .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 bSupportsAnisotropicMaterials is to indicate whether a specific shader platform supports anisotropic materials in the rendering system. This setting variable is part of Unreal Engine’s rendering capabilities and is used to determine if certain advanced material features can be utilized on a given platform.

Based on the callsites, this variable is primarily used within the RHI (Rendering Hardware Interface) and RenderCore modules of Unreal Engine. These subsystems are responsible for managing the low-level rendering capabilities and shader compilation processes.

The value of this variable is set through the data-driven shader platform information system. It’s parsed from a configuration section in the DataDrivenShaderPlatformInfo.cpp file, which suggests that it can be configured externally, possibly through engine or project settings.

This variable interacts with other shader platform capabilities and is used alongside other boolean flags that define the features and limitations of a specific rendering platform. It’s part of a larger set of properties that collectively describe the capabilities of a shader platform.

Developers must be aware that this variable affects shader compilation and potentially material behavior. When set to true, it indicates that the platform can handle more complex material models that incorporate anisotropic properties, which can affect the visual fidelity and performance of rendered materials.

Best practices when using this variable include:

  1. Ensuring that materials using anisotropic properties are only created or enabled when targeting platforms that support them.
  2. Considering performance implications when enabling anisotropic materials, as they may be more computationally expensive.
  3. Providing fallback options for platforms that don’t support anisotropic materials to maintain consistent visual quality across different devices.
  4. Using this flag in conjunction with other platform capability flags to make informed decisions about shader and material complexity during development.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:32, section: [ShaderPlatform METAL_SM5]

Location: <Workspace>/Engine/Config/Mac/DataDrivenPlatformInfo.ini:72, section: [ShaderPlatform METAL_SM6]

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

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

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:58, section: [ShaderPlatform PCD3D_SM5]

Location: <Workspace>/Engine/Config/Windows/DataDrivenPlatformInfo.ini:115, section: [ShaderPlatform PCD3D_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:249

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bNeedsOfflineCompiler);
	GET_SECTION_BOOL_HELPER(bSupportsComputeFramework);
	GET_SECTION_BOOL_HELPER(bSupportsAnisotropicMaterials);
	GET_SECTION_BOOL_HELPER(bSupportsDualSourceBlending);
	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);

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:

	uint32 bNeedsOfflineCompiler : 1;
	uint32 bSupportsComputeFramework : 1;
	uint32 bSupportsAnisotropicMaterials : 1;
	uint32 bSupportsDualSourceBlending : 1;
	uint32 bRequiresGeneratePrevTransformBuffer : 1;
	uint32 bRequiresRenderTargetDuringRaster : 1;
	uint32 bRequiresDisableForwardLocalLights : 1;
	uint32 bCompileSignalProcessingPipeline : 1;
	uint32 bSupportsMeshShadersTier0 : 1;

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

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsAnisotropicMaterials

Source code excerpt:

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

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

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/Shader.cpp:2324

Scope (from outer to inner):

file
function     void ShaderMapAppendKeyString

Source code excerpt:


	{
		const bool bSupportsAnisotropicMaterials = FDataDrivenShaderPlatformInfo::GetSupportsAnisotropicMaterials(Platform);
		KeyString += FString::Printf(TEXT("_Aniso-%d"), bSupportsAnisotropicMaterials ? 1 : 0);
	}

	{
		// add shader compression format
		KeyString += TEXT("_Compr");
		FName CompressionFormat = GetShaderCompressionFormat();