What is Material Sample Node?

I found this node when I was trying to figure out how to get parameters from other materials within the material editor.
It seems possible to directly reference materials, but I can’t find any information on how to use it.
Does anyone know anything about this node?

Node

This is a prototype that isn’t supported for now. You can right-click the node → “Goto Definition” to see more details.

#if ENABLE_MATERIAL_SAMPLE_PROTOTYPE
	ENGINE_API virtual int32 Compile(class FMaterialCompiler* Compiler, int32 OutputIndex) override;
	ENGINE_API virtual int32 CompilePreview(FMaterialCompiler* Compiler, int32 OutputIndex) override;
	ENGINE_API virtual EMaterialValueType GetOutputValueType(int32 OutputIndex) override;
	virtual bool IsResultSubstrateMaterial(int32 OutputIndex) override;
	virtual FSubstrateOperator * SubstrateGenerateMaterialTopologyTree(class FMaterialCompiler* Compiler, class UMaterialExpression* Parent, int32 OutputIndex) override; 

	int32 DynamicCompile(FMaterialCompiler* Compiler, int32 OutputIndex, bool bCompilePreview);
#endif

In brief, this node will work with Substrate and output a slab.
However, it is disabled by the macro ENABLE_MATERIAL_SAMPLE_PROTOTYPE.

I downloaded the latest source code, looked for the macro in /Engine/Source/Runtime/Engine/Internal/Materials/MaterialExpressionMaterialSample.h and set it to 1.

Here’s what I can get so far:

1 Like