class

FMaterialFunction

A material function: a .mmatfunc asset holding a sub-graph whose typed pins are its FunctionInput / FunctionOutput nodes. It is never compiled on its own — MaterialGraph::Resolve inlines it into every caller at compile time, so the caller's emitted source (and therefore its hash, its cooked blob names and its sidecar) tracks the function's body: editing a function re-identifies every material that calls it, which is exactly what makes "callers recompile through the asset-reload path" true.

Module
AssetSystem
Header
#include "AssetSystem/Assets/MaterialFunction.h"
Namespace
Mowo

Schema (MDF, schema_version stamped): MaterialFunction "Fresnel" { schema_version: 1 description: "..." category: "Utility" Graph { ...MaterialGraph::Serialize... }

Properties

TypeNameDescription
static constexpr uint32_tkSchemaVersionDefault 1.
static const char* constkExtensionThe canonical extension (EFileType::MaterialFunction); a reader also takes the legacy spelling, FFileTypes::ReadableExtensions.
std::stringname
std::stringdescription
std::stringcategory
MaterialGraphgraph

Public functions

ReturnsNameDescription
std::vector<MaterialGraph::FFunctionInputDecl>Inputs
uint64_tOutputNodeId
voidSerialize
boolDeserialize
std::stringToString
boolFromString
boolLoadFromFile
boolSaveToFile
FMaterialFunctionMakeDefaultA starter body: one float4 input wired straight to the output, so a freshly minted function already compiles when a caller drops it in.
boolEquals

Function details

Inputs

C++
std::vector<MaterialGraph::FFunctionInputDecl> Inputs() const

OutputNodeId

C++
uint64_t OutputNodeId() const

Serialize

C++
void Serialize(MdfDocument& doc) const

Deserialize

C++
bool Deserialize(const MdfDocument& doc, const std::string& label)

ToString

C++
std::string ToString() const

FromString

C++
bool FromString(const std::string& text, const std::string& label)

LoadFromFile

C++
bool LoadFromFile(const std::string& path)

SaveToFile

C++
bool SaveToFile(const std::string& path) const

MakeDefault

C++
static FMaterialFunction MakeDefault(const std::string& functionName)

A starter body: one float4 input wired straight to the output, so a freshly minted function already compiles when a caller drops it in.

Equals

C++
bool Equals(const FMaterialFunction& other) const
Generated from AssetSystem/Assets/MaterialFunction.h via assetsystem.json · Nov 4, 2026Version 1.0.0