Navigation
API > API/Runtime > API/Runtime/Engine
Describes a complete type within the material IR. This can be a primitive, an aggregate (struct), an opaque object (e.g., a texture), or a special type like Poison or Void. Note: This struct is lightweight and intended to be passed by value.
| Name | FType |
| Type | struct |
| Header File | /Engine/Source/Runtime/Engine/Public/Materials/MaterialIRTypes.h |
| Include Path | #include "Materials/MaterialIRTypes.h" |
Syntax
struct FType
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Aggregate | const UMaterialAggregate * | Pointer to the material aggregate. | Materials/MaterialIRTypes.h | |
| Primitive | FPrimitive | The primitive type information. | Materials/MaterialIRTypes.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FType | union MIR::FType | Materials/MaterialIRTypes.h | ||
| Kind | ETypeKind | Identifies the high-level kind of this type. | Materials/MaterialIRTypes.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const UMaterialAggregate * AsAggregate() |
If this is an aggregate type, returns a pointer to the UMaterialAggregate definition. Otherwise, returns nullptr. | Materials/MaterialIRTypes.h | |
TOptional< FPrimitive > AsMatrix() |
If this is a matrix type, returns its primitive info. Otherwise, returns None. | Materials/MaterialIRTypes.h | |
TOptional< FPrimitive > AsPrimitive() |
If this is a primitive type, returns its primitive info. Otherwise, returns None. | Materials/MaterialIRTypes.h | |
TOptional< FPrimitive > AsScalar() |
If this is a scalar type, returns its primitive info. Otherwise, returns None. | Materials/MaterialIRTypes.h | |
TOptional< FPrimitive > AsVector() |
If this is a vector type, returns its primitive info. Otherwise, returns None. | Materials/MaterialIRTypes.h | |
ETypeKind GetKind() |
Returns the high-level kind of this type. | Materials/MaterialIRTypes.h | |
FPrimitive GetPrimitive() |
Returns the primitive type information. It asserts that this type is primitive. | Materials/MaterialIRTypes.h | |
FString GetSpelling() |
Returns the this type name spelling (e.g. float4x4). | Materials/MaterialIRTypes.h | |
bool Is
(
ETypeKind InKind |
Checks if this type is of the specified kind. | Materials/MaterialIRTypes.h | |
bool IsAnyFloat() |
Returns true if the given type is a primitive with any float-based scalar kind (e.g. float, LWC). | Materials/MaterialIRTypes.h | |
bool IsArithmetic() |
Returns true if the given type is a primitive that supports arithmetic operations. | Materials/MaterialIRTypes.h | |
bool IsBoolean() |
Returns true if the given type is a primitive with a boolean scalar kind. | Materials/MaterialIRTypes.h | |
bool IsBoolScalar() |
Returns true if the given type is a boolean scalar primitive. | Materials/MaterialIRTypes.h | |
bool IsDouble() |
Returns true if the given type is a primitive with an LWC scalar kind. | Materials/MaterialIRTypes.h | |
bool IsFloat() |
Returns true if the given type is a primitive with a float scalar kind. | Materials/MaterialIRTypes.h | |
bool IsInteger() |
Returns true if the given type is a primitive with an integer scalar kind. | Materials/MaterialIRTypes.h | |
bool IsMatrix() |
Returns true if the given type is a matrix primitive. | Materials/MaterialIRTypes.h | |
bool IsParameterCollection() |
Returns whether this type is a Material Parameter Collection object. | Materials/MaterialIRTypes.h | |
bool IsPoison() |
Returns whether this is the poison type, indicating an error. | Materials/MaterialIRTypes.h | |
bool IsPrimitive() |
Returns true if the given type is a primitive that supports arithmetic operations. | Materials/MaterialIRTypes.h | |
bool IsRuntimeVirtualTexture() |
Returns whether this type is a RuntimeVirtualTexture object. | Materials/MaterialIRTypes.h | |
bool IsScalar() |
Returns true if the given type is a scalar primitive. | Materials/MaterialIRTypes.h | |
bool IsSubstrateData() |
Returns whether this type is a SubstrateData object. | Materials/MaterialIRTypes.h | |
bool IsTexture() |
Returns whether this type is a Texture object. | Materials/MaterialIRTypes.h | |
bool IsVector() |
Returns true if the given type is a vector primitive. | Materials/MaterialIRTypes.h | |
bool IsVoid() |
Returns whether this is the void type. | Materials/MaterialIRTypes.h | |
bool IsVTPageTableResult() |
Returns whether this type is a VTPageTableResult object. | Materials/MaterialIRTypes.h | |
UE::Shader::EValueType ToValueType() |
Converts this type to a corresponding UE::Shader::EValueType. | Materials/MaterialIRTypes.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static FType FromMaterialParameterType
(
EMaterialParameterType Type |
Returns the FType corresponding to a given EMaterialParameterType. | Materials/MaterialIRTypes.h | |
static FType FromMaterialValueType
(
EMaterialValueType Type |
Returns the FType corresponding to a given EMaterialValueType. | Materials/MaterialIRTypes.h | |
static FType FromShaderType
(
const UE::Shader::FType& InShaderType |
Returns the FType corresponding to a given UE::Shader::FType. | Materials/MaterialIRTypes.h | |
static FType MakeAggregate
(
const UMaterialAggregate* Aggregate |
Returns the aggregate type associated with the given material aggregate definition. | Materials/MaterialIRTypes.h | |
static FType MakeBoolScalar() |
Returns a scalar type representing a boolean value. | Materials/MaterialIRTypes.h | |
static FType MakeBoolVector
(
int NumColumns |
Returns a row-major vector type of boolean values with the specified number of columns. | Materials/MaterialIRTypes.h | |
static FType MakeDouble
(
int NumRows, |
Creates a double precision float primitive type with given dimensions. | Materials/MaterialIRTypes.h | |
static FType MakeDoubleScalar() |
Returns a scalar type representing a double precision floating point value. | Materials/MaterialIRTypes.h | |
static FType MakeDoubleVector
(
int NumColumns |
Returns a row-major vector type of double precision floating point values with the specified number of columns. | Materials/MaterialIRTypes.h | |
static FType MakeFloat
(
int NumRows, |
Creates a single precision float primitive type with given dimensions. | Materials/MaterialIRTypes.h | |
static FType MakeFloatScalar() |
Returns a scalar type representing a single precision floating point value. | Materials/MaterialIRTypes.h | |
static FType MakeFloatVector
(
int NumColumns |
Returns a row-major vector type of single precision floating point values with the specified number of columns. | Materials/MaterialIRTypes.h | |
static FType MakeInt
(
int NumRows, |
Creates an integer primitive type with given dimensions. | Materials/MaterialIRTypes.h | |
static FType MakeIntScalar() |
Returns a scalar type representing a integer value. | Materials/MaterialIRTypes.h | |
static FType MakeIntVector
(
int NumColumns |
Returns a row-major vector type of integer values with the specified number of columns. | Materials/MaterialIRTypes.h | |
static FType MakeParameterCollection() |
Returns the Material Parameter Collection object type. | Materials/MaterialIRTypes.h | |
static FType MakePoison() |
Returns the poison type, which represents an error or invalid type. | Materials/MaterialIRTypes.h | |
static FType MakePrimitive
(
EScalarKind InScalarKind, |
Returns a primitive type with the given kind and dimensions. | Materials/MaterialIRTypes.h | |
static FType MakeRuntimeVirtualTexture() |
Returns the RuntimeVirtualTexture object type. | Materials/MaterialIRTypes.h | |
static FType MakeScalar
(
EScalarKind InScalarKind |
Returns a scalar type of the given scalar kind. | Materials/MaterialIRTypes.h | |
static FType MakeShadingModel() |
Returns the Material Shading Model object type. | Materials/MaterialIRTypes.h | |
static FType MakeSubstrateData() |
Returns the SubstrateData object type. | Materials/MaterialIRTypes.h | |
static FType MakeTexture() |
Returns the Texture object type. | Materials/MaterialIRTypes.h | |
static FType MakeVector
(
EScalarKind InScalarKind, |
Returns a row-major vector type of the given scalar kind and number of columns. | Materials/MaterialIRTypes.h | |
static FType MakeVoid() |
Returns the void type, which represents the absence of a value. | Materials/MaterialIRTypes.h | |
static FType MakeVTPageTableResult() |
Returns the VTPageTableResult object type. | Materials/MaterialIRTypes.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Conversion to bool, returns false if the type is Poison, true otherwise. | Materials/MaterialIRTypes.h | |
bool operator!=
(
FType Other |
Materials/MaterialIRTypes.h | ||
bool operator==
(
FType Other |
Materials/MaterialIRTypes.h |