Navigation
API > API/Developer > API/Developer/TargetPlatform
IShaderFormat, shader pre-compilation abstraction
| Name | IShaderFormat |
| Type | class |
| Header File | /Engine/Source/Developer/TargetPlatform/Public/Interfaces/IShaderFormat.h |
| Include Path | #include "Interfaces/IShaderFormat.h" |
Syntax
class IShaderFormat
Derived Classes
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~IShaderFormat() |
Virtual destructor. | Interfaces/IShaderFormat.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AppendToKeyString
(
FString& KeyString |
Appends shader key text to the provided key string for use in DDC unique key construction. | Interfaces/IShaderFormat.h | |
virtual bool CanCompileBinaryShaders() |
Can the shader format compile shaders to the native binary format for the platform. | Interfaces/IShaderFormat.h | |
virtual bool CanStripShaderCode
(
bool const bNativeFormat |
Can this shader format strip shader code for packaging in a shader library? | Interfaces/IShaderFormat.h | |
virtual void CompilePreprocessedShader
(
const FShaderCompilerInput& Input, |
Compile the specified preprocessed shaders; only called if the call to RequiresSecondaryCompile given the first preprocess output returns true. | Interfaces/IShaderFormat.h | |
virtual void CompilePreprocessedShader
(
const FShaderCompilerInput& Input, |
Compile the specified preprocessed shader. | Interfaces/IShaderFormat.h | |
virtual bool CreateShaderArchive
(
FString const& LibraryName, |
Create a format specific archive for precompiled shader code. | Interfaces/IShaderFormat.h | |
virtual int32 GetPackedShaderKey () |
Virtual function that can be implemented by backends which require secondary compilation to specify a unique "key" identifier for the packing scheme (for validation in the runtime at load). | Interfaces/IShaderFormat.h | |
const TCHAR * GetPlatformIncludeDirectory() |
Returns name of directory with platform specific shaders. | Interfaces/IShaderFormat.h | |
virtual FStringView GetSecondaryCompileName() |
For shader formats which support secondary compilation, this can optionally return a name that is appended to diagnostic messages to distinguish errors in the secondary compile from the primary. | Interfaces/IShaderFormat.h | |
| Gets the list of supported formats. | Interfaces/IShaderFormat.h | ||
uint32 GetVersion
(
FName Format |
Gets the current version of the specified shader format. | Interfaces/IShaderFormat.h | |
virtual void ModifyShaderCompilerInput
(
FShaderCompilerInput& Input |
Called before a shader is compiled to allow the platform shader format to modify the shader compiler input, e.g. by adding console variable values relevant to shader compilation on that platform. | Interfaces/IShaderFormat.h | |
virtual void NotifyShaderCompiled
(
const FCompressedBuffer& SymbolData, |
Called when a shader resource is cooked, so the shader format can perform platform-specific operations on the debug data. | Interfaces/IShaderFormat.h | |
virtual void NotifyShaderCompiled
(
const TConstArrayView< uint8 >& SymbolData, |
Interfaces/IShaderFormat.h | ||
virtual void NotifyShaderCompilersShutdown
(
FName Format |
Called at the end of a cook to free resources and finalize artifacts created during the cook. | Interfaces/IShaderFormat.h | |
virtual void OutputDebugData
(
const FShaderCompilerInput& Input, |
Implement to output debug info for a single compile job. | Interfaces/IShaderFormat.h | |
virtual void OutputDebugData
(
const FShaderCompilerInput& Input, |
Implement to output debug info for the case where a secondary preprocessed shader was created. | Interfaces/IShaderFormat.h | |
virtual void OutputDebugDataMinimal
(
const FShaderCompilerInput& Input, |
Implement to output a minimal set of debug info based solely on the compile input. | Interfaces/IShaderFormat.h | |
virtual bool PreprocessShader
(
const FShaderCompilerInput& Input, |
Execute all shader preprocessing steps, storing the output in the PreprocessOutput struct | Interfaces/IShaderFormat.h | |
virtual bool RequiresSecondaryCompile
(
const FShaderCompilerInput& Input, |
Predicate which should return true if a second preprocess & compilation is required given the initial preprocess output. | Interfaces/IShaderFormat.h | |
| Strips the shader bytecode provided of any unnecessary optional data elements when archiving shaders into the shared library. | Interfaces/IShaderFormat.h | ||
virtual bool SupportsShaderArchives() |
Whether this shader format supports a format-specific archive for precompiled shader code. | Interfaces/IShaderFormat.h |