Navigation
API > API/Runtime > API/Runtime/Engine
Base entity of all IR graph nodes.
An IR module is a graph of values, connected by their "uses" relations. The graph of IR values is built by the MaterialIRModuleBuilder_ as the result of crawling through and analyizing the MaterialExpression graph contained in the translated Material. During this processing, IR values are emitted, and linked together. After the graph is constructed, it is itself analyzed: the builder will call FMaterialIRValueAnalyzer::Analyze()_ in each active* (i.e. truly used) value in the graph, making sure a value is analyzed only after its dependencies have been analyzed. A few notes:
- FValues are automatically zero-initialized.
- FValues are intended to be simple and inert data records. They cannot have non-trivia ctor, dtor or copy operators.
- The ModuleBuilder relies on this property to efficiently hashing values so that it will reuse the same value instance instead of creating multiple instances of the same computation (for a more efficient output shader).
- All values have a MIR type.
- Pure FValue instances are values that do not have other dependencies (called "uses").
- If a value has some other value as dependency, it means that it is the result of a calculation on those values. Values that have dependencies are Instructions (they derive from FInstruction).
| Name | FValue |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialIR.h |
| Include Path | #include "Materials/MaterialIR.h" |
Syntax
struct FValue
Derived Classes
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Flags | EValueFlags | Set of fundamental flags true for this value. | Materials/MaterialIR.h | |
| GraphProperties | EGraphProperties | The set of properties that are true for this value. | Materials/MaterialIR.h | |
| Kind | EValueKind | Used to discern the concrete C++ type of this value (e.g. Subscript) | Materials/MaterialIR.h | |
| Type | FType | The runtime type this value has. | Materials/MaterialIR.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool AreAllExactlyOne() |
Returns whether this value is arithmetic and all components are exactly one. | Materials/MaterialIR.h | |
bool AreAllExactlyZero() |
Returns whether this value is arithmetic and all components are exactly zero. | Materials/MaterialIR.h | |
bool AreAllFalse() |
Returns whether this value is boolean and all components are false. | Materials/MaterialIR.h | |
bool AreAllNearlyOne() |
Returns whether this value is arithmetic and all components are approximately one. | Materials/MaterialIR.h | |
bool AreAllNearlyZero() |
Returns whether this value is arithmetic and all components are approximately zero. | Materials/MaterialIR.h | |
bool AreAllTrue() |
Returns whether this value is boolean and all components are true. | Materials/MaterialIR.h | |
const T * As () |
Tries to cast this value to specified type T and returns the casted pointer, if possible (nullptr otherwise). | Materials/MaterialIR.h | |
T * As () |
Tries to cast this value to specified type T and returns the casted pointer, if possible (nullptr otherwise). | Materials/MaterialIR.h | |
void ClearFlags
(
EValueFlags InFlags |
Disables the specified flags without affecting others. | Materials/MaterialIR.h | |
bool Equals
(
const FValue* Other |
Returns whether this value exactly equals Other. | Materials/MaterialIR.h | |
bool EqualsConstant
(
float Value |
Returns whether this value equals the given constant scalar. | Materials/MaterialIR.h | |
bool EqualsConstant
(
FVector4f Value |
Returns whether this value equals the given constant vector. | Materials/MaterialIR.h | |
uint32 GetSizeInBytes() |
Returns the size in bytes of this value instance. | Materials/MaterialIR.h | |
UObject * GetTextureObject() |
Returns the UTexture or URuntimeVirtualTexture object if this value is of type FTextureObject or FRuntimeVirtualTextureObject. Returns null otherwise. | Materials/MaterialIR.h | |
int32 GetUniformParameterIndex() |
Returns the uniform parameter index if this value is of type FTextureObject, FRuntimeVirtualTextureObject, or FUniformParameter. Returns INDEX_NONE otherwise. | Materials/MaterialIR.h | |
| Gets the immutable array of all this value uses. | Materials/MaterialIR.h | ||
TConstArrayView< FValue * > GetUsesForStage
(
MIR::EStage Stage |
Gets the immutable array of this value uses filtered for a specific stage stage. | Materials/MaterialIR.h | |
bool HasFlags
(
EValueFlags InFlags |
Returns whether specified flags are true for this value. | Materials/MaterialIR.h | |
bool HasSubgraphProperties
(
EGraphProperties Properties |
Returns whether specified properties are true for this value. | Materials/MaterialIR.h | |
bool IsA
(
EValueKind InKind |
Returns whether this value is of specified kind. | Materials/MaterialIR.h | |
bool IsAnalyzed
(
EStage State |
Returns whether this value has been analyzed for specified stage. | Materials/MaterialIR.h | |
bool IsFalse() |
Returns whether this value is a constant boolean with value false. | Materials/MaterialIR.h | |
bool IsPoison() |
Returns whether this value is poison. | Materials/MaterialIR.h | |
bool IsTrue() |
Returns whether this value is a constant boolean with value true. | Materials/MaterialIR.h | |
void SetFlags
(
EValueFlags InFlags |
Enables the specified flags without affecting others. | Materials/MaterialIR.h | |
void UseSubgraphProperties
(
EGraphProperties Properties |
Enables specified properties for this value. | Materials/MaterialIR.h |