Navigation
API > API/Runtime > API/Runtime/RenderCore
| Name | FShaderCode |
| Type | class |
| Header File | /Engine/Source/Runtime/RenderCore/Public/ShaderCore.h |
| Include Path | #include "ShaderCore.h" |
Syntax
class FShaderCode
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FShaderCode() |
ShaderCore.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| CompressionFormat | FName | Compression algo | ShaderCore.h | |
| OodleCompressor | FOodleDataCompression::ECompressor | Oodle-specific compression algorithm - used if CompressionFormat is set to NAME_Oodle. | ShaderCore.h | |
| OodleLevel | FOodleDataCompression::ECompressionLevel | Oodle-specific compression level - used if CompressionFormat is set to NAME_Oodle. | ShaderCore.h | |
| OptionalDataSize | int32 | -1 if ShaderData was finalized | ShaderCore.h | |
| ShaderCodeResource | FShaderCodeResource | ShaderCore.h | ||
| ShaderCodeSize | int32 | We cannot get the code size after the compression, so store it here | ShaderCore.h | |
| ShaderCodeWithOptionalData | TArray< uint8 > | Access through class methods | ShaderCore.h | |
| SymbolData | TArray< uint8 > | ShaderCore.h | ||
| UncompressedSize | int32 | ShaderCode may be compressed in SCWs on demand. | ShaderCore.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddOptionalData
(
EShaderOptionalDataKey Key, |
Note: we don't hash the optional attachments in GenerateOutputHash() as they would prevent sharing (e.g. many material share the save VS) can be called after the non optional data was stored in ShaderData | ShaderCore.h | |
void AddOptionalData
(
const T& In |
For convenience | ShaderCore.h | |
void AddOptionalData
(
EShaderOptionalDataKey Key, |
Note: we don't hash the optional attachments in GenerateOutputHash() as they would prevent sharing (e.g. many material share the save VS) convenience, silently drops the data if string is too long | ShaderCore.h | |
void Compress
(
FName ShaderCompressionFormat, |
ShaderCore.h | ||
void FinalizeShaderCode
(
FCompressedBuffer OverrideSymbolsBuffer |
Converts code and symbols into shared buffer representations, optionally overriding the symbols buffer with the given input | ShaderCore.h | |
FName GetCompressionFormat() |
ShaderCore.h | ||
const FShaderCodeResource & GetFinalizedResource
(
EShaderFrequency Frequency, |
Populates FShaderCodeResource's header buffer and returns the fully populated resource struct. | ShaderCore.h | |
FOodleDataCompression::ECompressor GetOodleCompressor() |
ShaderCore.h | ||
FOodleDataCompression::ECompressionLevel GetOodleLevel() |
ShaderCore.h | ||
TConstArrayView< uint8 > GetReadView() |
For read access, can have additional data attached to the end. Can also be compressed | ShaderCore.h | |
int32 GetShaderCodeSize() |
ShaderCore.h | ||
TConstArrayView< uint8 > GetSymbolReadView() |
ShaderCore.h | ||
TArray< uint8 > & GetSymbolWriteAccess() |
ShaderCore.h | ||
int32 GetUncompressedSize() |
ShaderCore.h | ||
TArray< uint8 > & GetWriteAccess() |
Write access for regular microcode: Optional Data must be added AFTER regular microcode and BEFORE Finalize. | ShaderCore.h | |
bool IsCompressed() |
ShaderCore.h | ||
void SetFromResource
(
FShaderCodeResource&& Resource |
ShaderCore.h |