Navigation
API > API/Runtime > API/Runtime/Core
Output class passed to Append functions for shader data. It receives Append calls for the input data for shader compilation. These input data should trigger a recompile if they change, and they are therefore added into the key used for storage of shader data in DDC and incremental cooks.
Known types are appended through FShaderKeyGenerator Append member functions. For other types, the standard API (which is used by e.g. the append function for TArray) for types that can be appended to FShaderKeyGenerator is the function in global namespace: void Append(FShaderKeyGenerator& KeyGen, const TypeName& Value);
The proper Append function can be called for any type using operator<<.
| Name | FShaderKeyGenerator |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Serialization/ShaderKeyGenerator.h |
| Include Path | #include "Serialization/ShaderKeyGenerator.h" |
Syntax
class FShaderKeyGenerator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FShaderKeyGenerator
(
TUniqueFunction< void(const void*Data, uint64 Size)>&& InResultFunc |
Inline implementations. | Serialization/ShaderKeyGenerator.h | |
FShaderKeyGenerator
(
FString& InResultString |
Constructor that writes the appended data to a long human-readable debug string. | Serialization/ShaderKeyGenerator.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FShaderKeyGenerator() |
This destructor needs to be defined so that it can be called manually from union destructors. | Serialization/ShaderKeyGenerator.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OutputType | EOutputType | Serialization/ShaderKeyGenerator.h | ||
| ResultFunc | TUniqueFunction< void(const void *Data, uint64 Size)> | Serialization/ShaderKeyGenerator.h | ||
| ResultString | FString * | Serialization/ShaderKeyGenerator.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Append Value to the output string (equivalent to LexToString) or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | ||
| Append Value to the output string (EGuidFormats::Digits) or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | ||
void Append
(
const FBlake3Hash& Value |
Append Value to the output string (equivalent to LexToString) or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | |
void Append
(
uint32 Value |
Appendf the integer to the output string or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | |
void Append
(
int32 Value |
Appendf the integer to the output string or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | |
void Append
(
uint64 Value |
Appendf the integer to the output string or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | |
void Append
(
int64 Value |
Appendf the integer to the output string or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | |
| Convert the FName to text (case-sensitive) and append it to the output string or hash function. | Serialization/ShaderKeyGenerator.h | ||
void Append
(
const TCHAR* Value |
Append arbitrary text to the output string or hash function. | Serialization/ShaderKeyGenerator.h | |
void Append
(
FStringView Value |
Append arbitrary text to the output string or hash function. | Serialization/ShaderKeyGenerator.h | |
void AppendBoolInt
(
bool Value |
Appendf 0 or 1 to the output string or pass a 0 or 1 uint8 the hash function. | Serialization/ShaderKeyGenerator.h | |
void AppendDebugText
(
FStringView Value |
Append arbitrary text to the output human-readable string. Noop if !IsText. | Serialization/ShaderKeyGenerator.h | |
void AppendHex
(
uint32 Value |
Appendf the integer to the output string, using X format, or pass it as binary data to the hash function. | Serialization/ShaderKeyGenerator.h | |
void AppendSeparator() |
Append the separator character '_' to the output human-readable string. Noop if !IsText. | Serialization/ShaderKeyGenerator.h | |
void BinaryAppend
(
const void* Data, |
Must not be called unless IsBinary is true. Append data directly to the hash function. | Serialization/ShaderKeyGenerator.h | |
bool IsBinary () |
True iff the KeyGen is writing to a hash function. | Serialization/ShaderKeyGenerator.h | |
bool IsText() |
True iff the KeyGen is writing to a human-readable debug string. | Serialization/ShaderKeyGenerator.h | |
| Must not be called unless IsText is true. | Serialization/ShaderKeyGenerator.h |