Navigation
API > API/Runtime > API/Runtime/RenderCore
The environment used to compile a shader.
| Name | FShaderCompilerEnvironment |
| Type | struct |
| Header File | /Engine/Source/Runtime/RenderCore/Public/ShaderCore.h |
| Include Path | #include "ShaderCore.h" |
Syntax
struct FShaderCompilerEnvironment
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FShaderCompilerEnvironment
(
FMemoryHasherBlake3& Hasher |
Constructor used when enviroment is constructed temporarily purely for the purpose of hashing for inclusion in DDC keys. | ShaderCore.h | |
| Default constructor. | ShaderCore.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CompilerFlags | FShaderCompilerFlags | ShaderCore.h | ||
| FullPrecisionInPS | bool | Used for mobile platforms to allow per shader/material precision modes. | ShaderCore.h | |
| IncludeVirtualPathToContentsMap | TMap< FString, FString > | Map of the virtual file path -> content. | ShaderCore.h | |
| IncludeVirtualPathToSharedContentsMap | TMap< FString, FThreadSafeSharedAnsiStringPtr > | ShaderCore.h | ||
| RenderTargetOutputFormatsMap | TMap< uint32, uint8 > | ShaderCore.h | ||
| ResourceTableMap | FShaderResourceTableMap | ShaderCore.h | ||
| RHIShaderBindingLayout | FRHIShaderBindingLayout | Serialized version of the shader binding layout which can be used during platform specific shader code generation and serialization. | ShaderCore.h | |
| ShaderBindingLayout | const FShaderBindingLayout * | Optional shader binding layout which can be used build the Uniform buffer map. | ShaderCore.h | |
| TargetPlatform | const ITargetPlatform * | ShaderCore.h | ||
| UniformBufferMap | TMap< FString, FUniformBufferEntry > | ShaderCore.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CompileArgs | TMap< FString, TVariant< bool, float, int32, uint32, FString > > | ShaderCore.h | ||
| Definitions | TPimplPtr< FShaderCompilerDefinitions, EPimplPtrMode::DeepCopy > | ShaderCore.h | ||
| Hasher | FMemoryHasherBlake3 * | ShaderCore.h | ||
| UnusedStringDefinitions | TMap< FString, FString > | Unused data kept around for deprecated FShaderCompilerEnvironment::GetDefinitions call | ShaderCore.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool ContainsDefinition
(
FName Name |
ShaderCore.h | ||
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. | ShaderCore.h | |
ValueType GetCompileArgument
(
const TCHAR* Name, |
If a compile argument with the given name exists and is of the specified type, returns its value. | ShaderCore.h | |
FString GetDefinitionsAsCommentedCode() |
ShaderCore.h | ||
Please use Get SetCompileArgument mechanism for additional properties required by compilation int32 GetIntegerValue
(
FName Name |
ShaderCore.h | ||
Please use Get SetCompileArgument mechanism for additional properties required by compilation int32 GetIntegerValue
(
FShaderCompilerDefineNameCache& NameCache, |
ShaderCore.h | ||
bool HasCompileArgument
(
const TCHAR* Name |
If a compile argument with the given name exists, returns true. | ShaderCore.h | |
void Merge
(
const FShaderCompilerEnvironment& Other |
ShaderCore.h | ||
void SerializeCompilationDependencies
(
FArchive& Ar |
Serializes the portions of the environment that are used as input to the backend compilation process (i.e. after all preprocessing) | ShaderCore.h | |
void SerializeEverythingButFiles
(
FArchive& Ar |
This "core" serialization is also used for the hashing the compiler job (where files are handled differently). | ShaderCore.h | |
void SetCompileArgument
(
const TCHAR* Name, |
Sets a generic parameter which can be read in the various shader format backends to modify compilation behaviour. | ShaderCore.h | |
void SetCompileArgument
(
const TCHAR* Name, |
Like above, but this overload takes in the define value variant explicitly. | ShaderCore.h | |
void SetDefine
(
FShaderCompilerDefineNameCache& Name, |
ShaderCore.h | ||
void SetDefine
(
FShaderCompilerDefineNameCache& Name, |
ShaderCore.h | ||
void SetDefine
(
FShaderCompilerDefineNameCache& Name, |
ShaderCore.h | ||
void SetDefine
(
FShaderCompilerDefineNameCache& Name, |
ShaderCore.h | ||
| ShaderCore.h | |||
| ShaderCore.h | |||
| ShaderCore.h | |||
| ShaderCore.h | |||
| ShaderCore.h | |||
void SetDefine
(
const TCHAR* Name, |
Works for TCHAR e.g. SetDefine(TEXT("NAME"), TEXT("Test")); e.g. SetDefine(TEXT("NUM_SAMPLES"), 1); e.g. SetDefine(TEXT("DOIT"), true); | ShaderCore.h | |
void SetDefine
(
const TCHAR* Name, |
ShaderCore.h | ||
void SetDefine
(
const TCHAR* Name, |
ShaderCore.h | ||
void SetDefine
(
const TCHAR* Name, |
ShaderCore.h | ||
void SetDefine
(
const TCHAR* Name, |
ShaderCore.h | ||
void SetDefine
(
const TCHAR* Name, |
ShaderCore.h | ||
void SetDefine
(
FShaderCompilerDefineNameCache& Name, |
ShaderCore.h | ||
| ShaderCore.h | |||
void SetDefine
(
FShaderCompilerDefineNameCache& Name, |
ShaderCore.h | ||
void SetDefineAndCompileArgument
(
const TCHAR* Name, |
Helper to set both a define and a compile argument to the same value. | ShaderCore.h | |
void SetDefineIfUnset
(
const TCHAR* Name, |
ShaderCore.h | ||
void SetRenderTargetOutputFormat
(
uint32 RenderTargetIndex, |
ShaderCore.h |