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< uint32, uint8 > | RenderTargetOutputFormatsMap | ||
| FShaderResourceTableMap | ResourceTableMap | ||
| const ITargetPlatform * | TargetPlatform | ||
| TMap< FString, FUniformBufferEntry > | UniformBufferMap |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default constructor. | |||
FShaderCompilerEnvironment
(
const FShaderCompilerDefinitions& InDefinitions |
Initialization constructor. | ||
| Explicitly default assignment operator and copy constructor operator with warnings disabled to avoid warnings in implicitly-generated functions due to deprecation of RemoteServerData. |
Destructors
| Type | Name | Description | |
|---|---|---|---|
| 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 | |
|---|---|---|---|
| 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. | |
| 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 | SetCompileArgument
(
const TCHAR* Name, |
Sets a generic parameter which can be read in the various shader format backends to modify compilation behaviour. | |
| void | SetDefine
(
const TCHAR* Name, |
||
| void | SetDefine
(
const TCHAR* Name, |
||
| void | |||
| void | SetDefine
(
const TCHAR* Name, |
||
| void | SetDefine
(
const TCHAR* Name, |
||
| 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); | |
| 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& |
Deprecated Variables
| Type | Name | Description | |
|---|---|---|---|
| TMap< FString, FString > | RemoteServerData | RemoteServerData field is deprecated (no longer used in compilation backends). |