UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
SubstrateMaterial.cpp File Reference
#include "SubstrateMaterial.h"
#include "MaterialCompiler.h"
#include "Materials/MaterialInterface.h"
#include "SubstrateDefinitions.h"
#include "RenderUtils.h"

Macros

#define IsGenericBlendMode_Conversion0(Name, LegacyCondition)
 
#define IsGenericBlendMode_Conversion1(Name, LegacyCondition, SubstrateCondition)
 

Functions

FString GetSubstrateBSDFName (uint8 BSDFType)
 
FSubstrateRegisteredSharedLocalBasis SubstrateCompilationInfoCreateNullSharedLocalBasis ()
 
FSubstrateRegisteredSharedLocalBasis SubstrateCompilationInfoCreateSharedLocalBasis (FMaterialCompiler *Compiler, int32 NormalCodeChunk, int32 TangentCodeChunk)
 
bool IsSubstrateEnabled ()
 
 IsGenericBlendMode_Conversion0 (Opaque, BlendMode==BLEND_Opaque) IsGenericBlendMode_Conversion0(Masked
 

Macro Definition Documentation

◆ IsGenericBlendMode_Conversion0

#define IsGenericBlendMode_Conversion0 (   Name,
  LegacyCondition 
)
Value:
bool Is##Name##BlendMode(EBlendMode BlendMode) { return LegacyCondition; } \
bool Is##Name##BlendMode(const FMaterial& In) { return Is##Name##BlendMode(In.GetBlendMode()); } \
bool Is##Name##BlendMode(const UMaterialInterface& In) { return Is##Name##BlendMode(In.GetBlendMode()); } \
bool Is##Name##BlendMode(const FMaterialShaderParameters& In) { return Is##Name##BlendMode(In.BlendMode); }
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
EBlendMode
Definition EngineTypes.h:245
Definition MaterialShared.h:2058
virtual enum EBlendMode GetBlendMode() const =0
Definition MaterialInterface.h:296
virtual ENGINE_API EBlendMode GetBlendMode() const
Definition MaterialInterface.cpp:1480
EBlendMode BlendMode
Definition MaterialShared.h:1080
Definition MaterialShared.h:1181

◆ IsGenericBlendMode_Conversion1

#define IsGenericBlendMode_Conversion1 (   Name,
  LegacyCondition,
  SubstrateCondition 
)
Value:
bool Is##Name##BlendMode(EBlendMode BlendMode) { return IsSubstrateEnabled() ? (SubstrateCondition) : (LegacyCondition); } \
bool Is##Name##BlendMode(const FMaterial& In) { return Is##Name##BlendMode(In.GetBlendMode()); } \
bool Is##Name##BlendMode(const UMaterialInterface& In) { return Is##Name##BlendMode(In.GetBlendMode()); } \
bool Is##Name##BlendMode(const FMaterialShaderParameters& In) { return Is##Name##BlendMode(In.BlendMode); }
bool IsSubstrateEnabled()
Definition SubstrateMaterial.cpp:44

Function Documentation

◆ GetSubstrateBSDFName()

FString GetSubstrateBSDFName ( uint8  BSDFType)

◆ IsGenericBlendMode_Conversion0()

IsGenericBlendMode_Conversion0 ( Opaque  ,
BlendMode  = BLEND_Opaque 
)

◆ IsSubstrateEnabled()

bool IsSubstrateEnabled ( )
inline

◆ SubstrateCompilationInfoCreateNullSharedLocalBasis()

FSubstrateRegisteredSharedLocalBasis SubstrateCompilationInfoCreateNullSharedLocalBasis ( )

◆ SubstrateCompilationInfoCreateSharedLocalBasis()

FSubstrateRegisteredSharedLocalBasis SubstrateCompilationInfoCreateSharedLocalBasis ( FMaterialCompiler Compiler,
int32  NormalCodeChunk,
int32  TangentCodeChunk 
)