Navigation
API > API/Runtime > API/Runtime/Engine
A utility struct used to emit HLSL chunks. An instance of this struct is prepared by the IR-to-HLSL translator and passed to the individual externs that need lowering to their ToHLSL()_ methods. When lowering HLSL, make sure you check what needs to be emitted through the Differential_ field, either the original value or some partial differential (if supported).
| Name | FExternPrinterHLSL |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialIRExtern.h |
| Include Path | #include "Materials/MaterialIRExtern.h" |
Syntax
struct FExternPrinterHLSL
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Arguments | FExternArgs | Array of MIR::FValue arguments that this instruction uses. Use Arg() or the "$X" tag to refer to them. | Materials/MaterialIRExtern.h | |
| bIsPreviousFrame | bool | Whether we are emitting for the vertex stage and calculating the previous-frame value. | Materials/MaterialIRExtern.h | |
| Buffer | FString & | The string buffer we are printing HLSL to. | Materials/MaterialIRExtern.h | |
| Differential | EExternDifferential | Whether the translator requested the original value or any screen-space partial differential. | Materials/MaterialIRExtern.h | |
| LowerValueFunction | void(* | Internal. | Materials/MaterialIRExtern.h | |
| LowerValueUserData | void * | Materials/MaterialIRExtern.h | ||
| Stage | MIR::EStage | What shader stage we are currently emitting for. | Materials/MaterialIRExtern.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FExternPrinterHLSL & Appendf
(
UE::Core::TCheckedFormatString< TCHAR, Types... > Fmt, |
Materials/MaterialIRExtern.h | ||
const MIR::FValue * Arg
(
int32 Index |
Returns the value argument with the specified `Index_. Index must be valid. | Materials/MaterialIRExtern.h | |
bool IsDifferential() |
Materials/MaterialIRExtern.h | ||
bool IsNotDifferential() |
Whether or not we are printing the regular value or its differential. | Materials/MaterialIRExtern.h |