Navigation
API > API/Runtime > API/Runtime/RenderCore
Inheritance Hierarchy
- FShaderCompilerEnvironment
- FSharedShaderCompilerEnvironment
References
| Module | RenderCore |
| Header | /Engine/Source/Runtime/RenderCore/Public/ShaderCore.h |
| Include | #include "ShaderCore.h" |
Syntax
struct FShaderCompilerEnvironment
Remarks
The environment used to compile a shader.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FShaderCompilerFlags | CompilerFlags | ||
| bool | FullPrecisionInPS | Used for mobile platforms to allow per shader/material precision modes. | |
| TMap< FString, FString > | IncludeVirtualPathToContentsMap | Map of the virtual file path -> content. | |
| TMap< FString, FThreadSafeSharedStringPtr > | IncludeVirtualPathToExternalContentsMap | ||
| TMap< FString, FThreadSafeSharedAnsiStringPtr > | IncludeVirtualPathToSharedContentsMap | ||
| TMap< uint32, uint8 > | RenderTargetOutputFormatsMap | ||
| FShaderResourceTableMap | ResourceTableMap | ||
| FRHIShaderBindingLayout | RHIShaderBindingLayout | Serialized version of the shader binding layout which can be used during platform specific shader code generation and serialization. | |
| const FShaderBindingLayout * | ShaderBindingLayout | Optional shader binding layout which can be used build the Uniform buffer map. | |
| const ITargetPlatform * | TargetPlatform | ||
| TMap< FString, FUniformBufferEntry > | UniformBufferMap |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor. | |||
FShaderCompilerEnvironment
(
FMemoryHasherBlake3& Hasher |
Constructor used when enviroment is constructed temporarily purely for the purpose of hashing for inclusion in DDC keys. | ||
| PRAGMA_DISABLE_DEPRECATION_WARNINGS | FShaderCompilerEnvironment
(
const FShaderCompilerDefinitions& InDefinitions |
Initialization constructor. Initialization constructor. | |
| Explicitly default assignment operator and copy constructor operator with warnings disabled to avoid warnings in implicitly-generated functions due to deprecation of IncludeVirtualPathToExternalContentsMap. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| PRAGMA_ENABLE_DEPRECATION_WARNINGS virtual PRAGMA_DISABLE_DEPRECATION_WARNINGS | Used as a baseclass, make sure we're not incorrectly destroyed through a baseclass pointer This will be expensive to destroy anyway, additional vcall overhead should be small Temporarily disable deprecation warnings for this default destructor triggering due to the deprecated RemoteServerData field. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | ContainsDefinition
(
FName Name |
||
| ValueType | GetCompileArgument
(
const TCHAR* Name, |
If a compile argument with the given name exists and is of the specified type, returns its value. | |
| bool | GetCompileArgument
(
const TCHAR* Name, |
If a compile argument with the given name exists and is of the specified type, its value will be assigned to OutValue and the function will return true. | |
| FString | |||
| Please use Get SetCompileArgument mechanism for additional properties required by compilation int32 | GetIntegerValue
(
FShaderCompilerDefineNameCache& NameCache, |
||
| Please use Get SetCompileArgument mechanism for additional properties required by compilation int32 | GetIntegerValue
(
FName Name |
||
| bool | HasCompileArgument
(
const TCHAR* Name |
If a compile argument with the given name exists, returns true. | |
| void | Merge
(
const FShaderCompilerEnvironment& Other |
||
| void | Serializes the portions of the environment that are used as input to the backend compilation process (i.e. after all preprocessing) | ||
| void | SerializeEverythingButFiles
(
FArchive& Ar |
This "core" serialization is also used for the hashing the compiler job (where files are handled differently). | |
| void | Like above, but this overload takes in the define value variant explicitly. | ||
| void | SetCompileArgument
(
const TCHAR* Name, |
Sets a generic parameter which can be read in the various shader format backends to modify compilation behaviour. | |
| void | |||
| void | SetDefine
(
FShaderCompilerDefineNameCache& Name, |
||
| void | SetDefine
(
FShaderCompilerDefineNameCache& Name, |
||
| void | SetDefine
(
FShaderCompilerDefineNameCache& Name, |
||
| void | SetDefine
(
FShaderCompilerDefineNameCache& Name, |
||
| void | |||
| void | |||
| void | |||
| void | |||
| void | SetDefine
(
FShaderCompilerDefineNameCache& Name, |
||
| void | |||
| void | |||
| void | |||
| void | |||
| void | |||
| PRAGMA_ENABLE_DEPRECATION_WARNINGS void | Works for TCHAR e.g. SetDefine(TEXT("NAME"), TEXT("Test")); e.g. SetDefine(TEXT("NUM_SAMPLES"), 1); e.g. SetDefine(TEXT("DOIT"), true); | ||
| void | SetDefine
(
FShaderCompilerDefineNameCache& Name, |
||
| void | |||
| void | SetDefineAndCompileArgument
(
const TCHAR* Name, |
Helper to set both a define and a compile argument to the same value. | |
| void | SetDefineIfUnset
(
const TCHAR* Name, |
||
| void | SetRenderTargetOutputFormat
(
uint32 RenderTargetIndex, |
Operators
| Type | Name | Description | |
|---|---|---|---|
| FShaderCompilerEnvironment & | operator=
(
const FShaderCompilerEnvironment& |