Navigation
API > API/Runtime > API/Runtime/Engine
It wraps all the data necessary to implement an extern definition through static constant data. You must make sure that referenced instances of this struct are alive throughout material translation. It is recommended to locally declare a static const instance of this struct and use it by emitting a FExternFromInlineDecl. Example:
static const FExternInlineDeclaration MySpecialExtern { .Type = MIR::FType::MakeFloatVector(3), .CodeHLSL = TEXT("GetMySpecialValue($0)"), .MaterialDomainMask = MIR::MakeDomainMask(MD_Opaque), }; return Em.Extern
| Name | FExternInlineDeclaration |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialIRExtern.h |
| Include Path | #include "Materials/MaterialIRExtern.h" |
Syntax
struct FExternInlineDeclaration
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AllowedStages | EStageMask | Specifies what shader frequencies this inline extern is supported in. | Materials/MaterialIRExtern.h | |
| CodeHLSL | const TCHAR * | The HLSL code snippet this extern evaluates to. | Materials/MaterialIRExtern.h | |
| CodeHLSLDDX | const TCHAR * | This works identically to `CodeHLSL_, but is used instead of it when emitting the screen-space partial differential along the X/Y axis. | Materials/MaterialIRExtern.h | |
| CodeHLSLDDY | const TCHAR * | Materials/MaterialIRExtern.h | ||
| DifferentialType | MIR::FType | The type this extern value's screen-space partial differential evaluate to, if defined. | Materials/MaterialIRExtern.h | |
| Flags | MIR::EExternFlags | The set of behavioral flags this extern adheres to. | Materials/MaterialIRExtern.h | |
| GraphProperties | MIR::EGraphProperties | Array of this instruction MIR value graph properties. | Materials/MaterialIRExtern.h | |
| MaterialDomainMask | uint32 | Specifies what material domains this extern is supported in. | Materials/MaterialIRExtern.h | |
| MinimumFeatureLevel | uint32 | Specifies the minimum EMaterialFeatureLevel required by this inline extern instruction. | Materials/MaterialIRExtern.h | |
| Type | MIR::FType | The type this extern value evaluates to. | Materials/MaterialIRExtern.h |