UMaterialInterface

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Materials/MaterialInterface.h

Include

#include "Materials/MaterialInterface.h"

Syntax

class UMaterialInterface :
    public UObject,
    public IBlendableInterface,
    public IInterface_AssetUserData

Variables

Name Description

Protected variable

uint8

 

AllowCachingStaticParameterValuesCounter

Public variable

TObjectPtr< cla...

 

AssetImportData

Importing data and options used for this material

Protected variable

TArray< TObject...

 

AssetUserData

Array of user data stored with the asset

Public variable

uint8: 1

 

bIncludedInBaseGame

Whether this material interface is included in the base game (and not in a DLC)

Protected variable

bool

 

bLoadedCachedExpressionData

Set if CachedExpressionData was loaded from disk, should typically be true when running with cooked data, and false in the editor

Protected variable

bool

 

bTextureStreamingDataSorted

Because of redirector, the texture names need to be resorted at each load in case they changed.

Protected variable

TUniquePtr< FMa...

 

CachedExpressionData

Cached data generated from the material's expressions, may be nullptr UMaterials should always have cached data UMaterialInstances will have cached data if they have overriden material layers (possibly for other reasons in the future)

Protected variable

TUniquePtr< FMa...

 

CachedHLSLTree

Protected variable

TOptional< FSta...

 

CachedStaticParameterValues

Protected variable

TObjectPtr< UMa...

 

EditorOnlyData

Public variable

TMap< FString, ...

 

LayerParameterExpansion

Protected variable

FLightmassMater...

 

LightmassSettings

The Lightmass settings for this object.

Public variable

TMap< FString, ...

 

ParameterOverviewExpansion

Public variable

FRenderCommandF...

 

ParentRefFence

A fence to track when the primitive is no longer used as a parent

Public variable

FSoftObjectPath

 

PreviewMesh

The mesh used by the material editor to preview the material.

Public variable

TArray< TObject...

 

SpecularProfiles

Specular Profile. For internal usage, not editable/visible

Public variable

TObjectPtr< cla...

 

SubsurfaceProfile

SubsurfaceProfile, for Screen Space Subsurface Scattering..

Protected variable

TArray< FMateri...

 

TextureStreamingData

Data used by the texture streaming to know how each texture is sampled by the material.

Public variable

TArray< FMateri...

 

TextureStreamingDataMissingEntries

List of all used but missing texture indices in TextureStreamingData.

Protected variable

int32

 

TextureStreamingDataVersion

Public variable

TObjectPtr< cla...

 

ThumbnailInfo

Information for thumbnail rendering

Constructors

Name Description

Public function

UMaterialInterface()

Public function

UMaterialInterface

(
    const FObjectInitializer& ObjectIn...
)

Public function

UMaterialInterface

(
    FVTableHelper& Helper
)

Destructors

Name Description

Public function Virtual

~UMaterialInterface()

Functions

Name Description

Public function Static

void

 

AddReferencedObjects

(
    UObject* InThis,
    FReferenceCollector& Collector
)

Public function

void

 

AnalyzeMaterialCompilationInCallback

(
    TFunctionRef< void(FMaterialCompile...,
    FMaterialAnalysisResult& OutResult
)

Return insight on what (e.g. texture coordinates, vertex data, etc) is used in the shader graph compiled by a callback

Public function

void

 

AnalyzeMaterialCustomOutput

(
    UMaterialExpressionCustomOutput...,
    int32 InOutputIndex,
    FMaterialAnalysisResult& OutResult
)

Return insight on what (e.g. texture coordinates, vertex data, etc) is used in the shader graph of a material custom output

Public function

void

 

AnalyzeMaterialProperty

(
    EMaterialProperty InProperty,
    int32& OutNumTextureCoordinates,
    bool& bOutRequiresVertexData
)

Return number of used texture coordinates and whether or not the Vertex data is used in the shader graph

Public function

void

 

AnalyzeMaterialPropertyEx

(
    EMaterialProperty InProperty,
    FMaterialAnalysisResult& OutResult
)

Return insight on what (e.g. texture coordinates, vertex data, etc) is used in the shader graph of a material property

Public function Static

void

 

AssertDefaultMaterialsExist()

Asserts if any default material does not exist.

Public function Static

void

 

AssertDefaultMaterialsPostLoaded()

Asserts if any default material has not been post-loaded.

Public function Virtual

void

 

CacheGivenTypesForCooking

(
    EShaderPlatform Platform,
    ERHIFeatureLevel::Type FeatureLevel,
    EMaterialQualityLevel::Type Quality...,
    const TArray< const FVertexFactoryT...,
    const TArray< const FShaderPipeline...,
    const TArray< const FShaderType...
)

Public function Virtual

void

 

CacheShaders

(
    EMaterialShaderPrecompileMode Compi...
)

Submits remaining shaders for recompilation.

Public function Virtual Const

bool

 

CastsRayTracedShadows()

Public function Virtual

bool

 

CheckMaterialUsage

(
    const EMaterialUsage Usage
)

Checks if the material can be used with the given usage flag.

Public function Virtual Const

bool

 

CheckMaterialUsage_Concurrent

(
    const EMaterialUsage Usage
)

Same as above but is valid to call from any thread.

Public function

int32

 

CompileProperty

(
    FMaterialCompiler* Compiler,
    EMaterialProperty Property,
    uint32 ForceCastFlags
)

Compiles a material property.

Public function Virtual

int32

 

CompilePropertyEx

(
    FMaterialCompiler* Compiler,
    const FGuid& AttributeID
)

Allows material properties to be compiled with the option of being overridden by the material attributes input.

Public function Virtual Const

uint32

 

ComputeAllStateCRC()

Protected function

UMaterialInt...

 

CreateEditorOnlyData()

Public function Static

void

 

DeclareConstructClasses

(
    TArray< FTopLevelAssetPath >& OutC...,
    const UClass* SpecificSubclass
)

Public function Virtual Const

void

 

DumpDebugInfo

(
    FOutputDevice& OutputDevice
)

Public function

void

 

EnsureIsComplete()

Checks to see if this material has all its shaders cached and if not, will perform a synchronous compilation of those.

Protected function Static

void

 

FilterOutPlatformShadingModels

(
    EShaderPlatform Platform,
    FMaterialShadingModelField& Shadin...
)

Filter out ShadingModels field to a shader platform settings

Public function Const

bool

 

FindTextureStreamingDataIndexRange

(
    FName TextureName,
    int32& LowerIndex,
    int32& HigherIndex
)

Find entries within TextureStreamingData that match the given name.

Public function Virtual

void

 

ForceRecompileForRendering()

Clears the shader cache and recompiles the shader for rendering.

Public function Const

void

 

GetAllDoubleVectorParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Const

void

 

GetAllFontParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Virtual Const

void

 

GetAllParameterInfoOfType

(
    EMaterialParameterType Type,
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Virtual Const

void

 

GetAllParametersOfType

(
    EMaterialParameterType Type,
    TMap< FMaterialParameterInfo, FMate...
)

Public function Const

void

 

GetAllRuntimeVirtualTextureParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Const

void

 

GetAllScalarParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Const

void

 

GetAllSparseVolumeTextureParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Const

void

 

GetAllStaticComponentMaskParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Const

void

 

GetAllStaticSwitchParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Const

void

 

GetAllTextureParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function Const

void

 

GetAllVectorParameterInfo

(
    TArray< FMaterialParameterInfo >& ...,
    TArray< FGuid >& OutParameterIds
)

Public function

UMaterial &#...

 

GetBaseMaterial()

Walks up parent chain and finds the base Material that this is an instance of.

Public function Virtual Const

EBlendMode

 

GetBlendMode()

Public function Virtual Const

const FMater...

 

GetCachedExpressionData

(
    TMicRecursionGuard RecursionGuard
)

Public function Virtual Const

const FMater...

 

GetCachedHLSLTree

(
    TMicRecursionGuard RecursionGuard
)

Public function Virtual Const

bool

 

GetCastDynamicShadowAsMasked()

Public function Virtual Const

bool

 

GetCastShadowAsMasked()

Public function Virtual

void

 

GetDependencies

(
    TSet< UMaterialInterface* >& ...
)

Get this material dependencies.

Public function Virtual Const

void

 

GetDependentFunctions

(
    TArray< class UMaterialFunctionInte...
)

Public function Virtual Const

float

 

GetDiffuseBoost()

Public function Virtual Const

FDisplacemen...

 

GetDisplacementScaling()

Public function Const

bool

 

GetDoubleVectorParameterChannelNames

(
    const FHashedMaterialParameterInfo ...,
    FParameterChannelNames& OutValue
)

Public function Const

bool

 

GetDoubleVectorParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    FVector4d& OutValue
)

Public function Const

bool

 

GetDoubleVectorParameterValue

(
    const FHashedMaterialParameterInfo ...,
    FVector4d& OutValue,
    bool bOveriddenOnly
)

Public function Virtual Const

const UMater...

 

GetEditorOnlyData()

Public function Virtual

UMaterialInt...

 

GetEditorOnlyData()

Protected function Virtual Const

const UClass...

 

GetEditorOnlyDataClass()

Public function Virtual Const

float

 

GetEmissiveBoost()

Public function Virtual Const

float

 

GetExportResolutionScale()

Public function Static

uint32

 

GetFeatureLevelsToCompileForAllMaterials()

Get bitfield indicating which feature levels should be compiled by default

Protected function Const

uint32

 

GetFeatureLevelsToCompileForRendering()

Returns a bitfield indicating which feature levels should be compiled for rendering.

Public function Const

bool

 

GetFontParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    UFont*& OutFontValue,
    int32& OutFontPage
)

Public function Const

bool

 

GetFontParameterValue

(
    const FHashedMaterialParameterInfo ...,
    UFont*& OutFontValue,
    int32& OutFontPage,
    bool bOveriddenOnly
)

Public function Const

bool

 

GetGroupName

(
    const FHashedMaterialParameterInfo ...,
    FName& GroupName
)

Public function Virtual Const

bool

 

GetGroupSortPriority

(
    const FString& InGroupName,
    int32& OutSortPriority
)

Get the sort priority index of the given parameter group

Public function Const

int32

 

GetHeight()

Public function Const

const FGuid ...

 

GetLightingGuid()

Public function Virtual Const

void

 

GetLightingGuidChain

(
    bool bIncludeTextures,
    TArray< FGuid >& OutGuids
)

Returns all the Guids related to this material.

Public function Virtual Const

const UMater...

 

GetMaterial()

Get the material which we are instancing.

Public function Virtual

UMaterial &#...

 

GetMaterial()

Get the material which we are instancing.

Public function Virtual Const

const UMater...

 

GetMaterial_Concurrent

(
    TMicRecursionGuard RecursionGuard
)

Same as above, but can be called concurrently

Public function Virtual Const

void

 

GetMaterialInheritanceChain

(
    FMaterialInheritanceChain& OutChai...
)

Public function Virtual Const

bool

 

GetMaterialLayers

(
    FMaterialLayersFunctions& OutLayer...,
    TMicRecursionGuard RecursionGuard
)

Get the material layers stack

Public function Virtual Const

const FMater...

 

GetMaterialResource

(
    ERHIFeatureLevel::Type InFeatureLev...,
    EMaterialQualityLevel::Type Quality...
)

Get the static permutation resource if the instance has one

Public function Virtual

FMaterialRes...

 

GetMaterialResource

(
    ERHIFeatureLevel::Type InFeatureLev...,
    EMaterialQualityLevel::Type Quality...
)

Get the static permutation resource if the instance has one

Public function Virtual Const

float

 

GetMaxWorldPositionOffsetDisplacement()

Public function Const

UMaterialInt...

 

GetNaniteOverideMaterial()

Get the associated nanite override material.

Public function Virtual Const

UMaterialInt...

 

GetNaniteOverride

(
    TMicRecursionGuard RecursionGuard
)

Get the associated nanite override material

Public function Virtual Const

float

 

GetOpacityMaskClipValue()

Access to overridable properties of the base material.

Public function Const

bool

 

GetOverrideCastShadowAsMasked()

Public function Const

bool

 

GetOverrideDiffuseBoost()

Public function Const

bool

 

GetOverrideEmissiveBoost()

Public function Const

bool

 

GetOverrideExportResolutionScale()

Public function Const

bool

 

GetParameterDefaultValue

(
    EMaterialParameterType Type,
    const FMemoryImageMaterialParameter...,
    FMaterialParameterMetadata& OutVal...
)

Public function Const

bool

 

GetParameterDesc

(
    const FHashedMaterialParameterInfo ...,
    FString& OutDesc
)

Public function Const

FMaterialPar...

 

GetParameterInfo

(
    EMaterialParameterAssociation Assoc...,
    FName ParameterName,
    UMaterialFunctionInterface* La...
)

Public function Const

bool

 

GetParameterSortPriority

(
    const FHashedMaterialParameterInfo ...,
    int32& OutSortPriority
)

Get the sort priority index of the given parameter

Public function Virtual Const

bool

 

GetParameterValue

(
    EMaterialParameterType Type,
    const FMemoryImageMaterialParameter...,
    FMaterialParameterMetadata& OutVal...,
    EMaterialGetParameterValueFlags Fla...
)

Public function Virtual Const

UPhysicalMat...

 

GetPhysicalMaterial()

Return a pointer to the physical material used by this material instance.

Public function Virtual Const

UPhysicalMat...

 

GetPhysicalMaterialFromMap

(
    int32 Index
)

Return a pointer to the physical material from mask map at given index.

Public function Virtual Const

UPhysicalMat...

 

GetPhysicalMaterialMask()

Return a pointer to the physical material mask used by this material instance.

Public function

void

 

GetQualityLevelUsage

(
    TArray< bool, TInlineAllocator< EMa...,
    EShaderPlatform ShaderPlatform,
    bool bCooking
)

Determines whether each quality level has different nodes by inspecting the material's expressions.

Public function

void

 

GetQualityLevelUsageForCooking

(
    TArray< bool, TInlineAllocator< EMa...,
    EShaderPlatform ShaderPlatform
)

Public function Const

TArrayView< ...

 

GetReferencedTextures()

Get textures referenced by expressions, including nested functions.

Public function Virtual Const

void

 

GetReferencedTexturesAndOverrides

(
    TSet< const UTexture* >& InOu...
)

Add to the set any texture referenced by expressions, including nested functions, as well as any overrides from parameters.

Public function Virtual Const

bool

 

GetRefractionSettings

(
    float& OutBiasValue
)

Public function Const

FMaterialRel...

 

GetRelevance

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Public function Const

FMaterialRel...

 

GetRelevance_Concurrent

(
    ERHIFeatureLevel::Type InFeatureLev...
)

Public function Virtual Const

FMaterialRen...

 

GetRenderProxy()

Return a pointer to the FMaterialRenderProxy used for rendering.

Public function Const

bool

 

GetRuntimeVirtualTextureParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    URuntimeVirtualTexture*& OutVa...
)

Public function Const

bool

 

GetRuntimeVirtualTextureParameterValue

(
    const FHashedMaterialParameterInfo ...,
    URuntimeVirtualTexture*& OutVa...,
    bool bOveriddenOnly
)

Public function Static

UEnum *

 

GetSamplerTypeEnum()

Access the cached uenum type information for material sampler type

Public function Const

bool

 

GetScalarParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    float& OutValue
)

Public function Const

bool

 

GetScalarParameterSliderMinMax

(
    const FHashedMaterialParameterInfo ...,
    float& OutSliderMin,
    float& OutSliderMax
)

Public function Const

bool

 

GetScalarParameterValue

(
    const FHashedMaterialParameterInfo ...,
    float& OutValue,
    bool bOveriddenOnly
)

Public function Virtual

void

 

GetShaderTypes

(
    EShaderPlatform Platform,
    const ITargetPlatform* TargetP...,
    TArray< FDebugShaderTypeInfo >& Ou...
)

Gathers a list of shader types sorted by vertex factory types that should be cached for this material.

Public function Virtual Const

FMaterialSha...

 

GetShadingModels()

Public function Const

bool

 

GetSparseVolumeTextureParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    USparseVolumeTexture*& OutValu...
)

Public function Const

bool

 

GetSparseVolumeTextureParameterValue

(
    const FHashedMaterialParameterInfo ...,
    USparseVolumeTexture*& OutValu...,
    bool bOveriddenOnly
)

Public function Virtual Const

USpecularPro...

 

GetSpecularProfile_Internal

(
    uint32 Index
)

Public function Const

bool

 

GetStaticComponentMaskParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    bool& OutR,
    bool& OutG,
    bool& OutB,
    bool& OutA,
    FGuid& OutExpressionGuid
)

Public function Const

bool

 

GetStaticComponentMaskParameterValue

(
    const FHashedMaterialParameterInfo ...,
    bool& R,
    bool& G,
    bool& B,
    bool& A,
    FGuid& OutExpressionGuid,
    bool bOveriddenOnly
)

Get the value of the given static component mask parameter

Public function

void

 

GetStaticParameterValues

(
    FStaticParameterSet& OutStaticPara...
)

Builds a composited set of static parameters, including inherited and overridden values

Public function Const

bool

 

GetStaticSwitchParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    bool& OutValue,
    FGuid& OutExpressionGuid
)

Public function Const

bool

 

GetStaticSwitchParameterValue

(
    const FHashedMaterialParameterInfo ...,
    bool& OutValue,
    FGuid& OutExpressionGuid,
    bool bOveriddenOnly
)

Get the value of the given static switch parameter

Public function Const

const FStrat...

 

GetStrataCompilationConfig()

Public function Virtual Const

USubsurfaceP...

 

GetSubsurfaceProfile_Internal()

Public function Virtual Const

float

 

GetTextureDensity

(
    FName TextureName,
    const FMeshUVChannelInfo& UVChanne...
)

Returns the density of a texture in (LocalSpace Unit / Texture).

Public function Const

bool

 

GetTextureParameterChannelNames

(
    const FHashedMaterialParameterInfo ...,
    FParameterChannelNames& OutValue
)

Public function Const

bool

 

GetTextureParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    UTexture*& OutValue
)

Public function Virtual Const

bool

 

GetTextureParameterValue

(
    const FHashedMaterialParameterInfo ...,
    UTexture*& OutValue,
    bool bOveriddenOnly
)

Public function Virtual

bool

 

GetTexturesInPropertyChain

(
    EMaterialProperty InProperty,
    TArray< UTexture* >& OutTextu...,
    TArray< FName >* OutTexturePar...,
    FStaticParameterSet* InStaticP...,
    ERHIFeatureLevel::Type InFeatureLev...,
    EMaterialQualityLevel::Type InQuali...
)

Get all of the textures in the expression chain for the given property (ie fill in the given array with all textures in the chain).

Public function Const

const TArray...

 

GetTextureStreamingData()

Accessor to the data.

Public function

TArray< FMat...

 

GetTextureStreamingData()

Public function Virtual Const

void

 

GetUsedTextures

(
    TArray< UTexture* >& OutTextu...,
    EMaterialQualityLevel::Type Quality...,
    bool bAllQualityLevels,
    ERHIFeatureLevel::Type FeatureLevel,
    bool bAllFeatureLevels
)

Return the textures used to render this material.

Public function Virtual Const

void

 

GetUsedTexturesAndIndices

(
    TArray< UTexture* >& OutTextu...,
    TArray< TArray< int32 > >& OutIndi...,
    EMaterialQualityLevel::Type Quality...,
    ERHIFeatureLevel::Type FeatureLevel
)

Return the textures used to render this material and the material indices bound to each.

Public function Const

bool

 

GetVectorParameterChannelNames

(
    const FHashedMaterialParameterInfo ...,
    FParameterChannelNames& OutValue
)

Public function Const

bool

 

GetVectorParameterDefaultValue

(
    const FHashedMaterialParameterInfo ...,
    FLinearColor& OutValue
)

Public function Const

bool

 

GetVectorParameterValue

(
    const FHashedMaterialParameterInfo ...,
    FLinearColor& OutValue,
    bool bOveriddenOnly
)

Public function Const

int32

 

GetWidth()

Public function Const

bool

 

HasTextureStreamingData()

Returns whether there is any streaming data in the component.

Public function Static

void

 

InitDefaultMaterials()

Initializes all default materials.

Public function Virtual Const

bool

 

IsComplete()

Checks to see if this material has all its shaders cached.

Public function Virtual Const

bool

 

IsDeferredDecal()

Public function Virtual

bool

 

IsDependent

(
    UMaterialInterface* TestDepend...
)

Test this material for dependency on a given material.

Public function Virtual

bool

 

IsDependent_Concurrent

(
    UMaterialInterface* TestDepend...,
    TMicRecursionGuard RecursionGuard
)

Same as above, but can be called concurrently

Public function Virtual Const

bool

 

IsDitheredLODTransition()

Public function Const

bool

 

IsDoubleVectorParameterUsedAsChannelMask

(
    const FHashedMaterialParameterInfo ...,
    bool& OutValue
)

Public function Const

bool

 

IsEditorOnlyDataValid()

Public function Virtual Const

bool

 

IsMasked()

Public function Virtual Const

bool

 

IsPropertyActive

(
    EMaterialProperty InProperty
)

Checks to see if an input property should be active, based on the state of the material

Public function Const

bool

 

IsScalarParameterUsedAsAtlasPosition

(
    const FHashedMaterialParameterInfo ...,
    bool& OutValue,
    TSoftObjectPtr< class UCurveLinearC...,
    TSoftObjectPtr< class UCurveLinearC...
)

Public function Virtual Const

bool

 

IsShadingModelFromMaterialExpression()

Public function

bool

 

IsTextureReferencedByProperty

(
    EMaterialProperty InProperty,
    const UTexture* InTexture
)

Checks to see if the given property references the texture

Public function Virtual Const

bool

 

IsThinSurface()

Public function Virtual Const

bool

 

IsTranslucencyWritingCustomDepth()

Public function Virtual Const

bool

 

IsTranslucencyWritingFrontLayerTransparency()

Public function Virtual Const

bool

 

IsTranslucencyWritingVelocity()

Public function Virtual Const

bool

 

IsTwoSided()

Public function Const

bool

 

IsUsingControlFlow()

Public function Const

bool

 

IsUsingNewHLSLGenerator()

Public function Const

bool

 

IsVectorParameterUsedAsChannelMask

(
    const FHashedMaterialParameterInfo ...,
    bool& OutValue
)

Public function Virtual Const

bool

 

IterateDependentFunctions

(
    TFunctionRef< bool(UMaterialFunctio...
)

Public function Static

void

 

IterateOverActiveFeatureLevels

(
    FunctionType InHandler
)

Iterate over all feature levels currently marked as active

Public function Virtual Const

void

 

LogMaterialsAndTextures

(
    FOutputDevice& Ar,
    int32 Indent
)

Output to the log which materials and textures are used by this material.

Public function Virtual Const

uint32

 

NumSpecularProfile_Internal()

Public function Virtual

void

 

OverrideNumericParameterDefault

(
    EMaterialParameterType Type,
    const FHashedMaterialParameterInfo ...,
    const UE::Shader::FValue& Value,
    bool bOverride,
    ERHIFeatureLevel::Type FeatureLevel
)

Overrides the default value of the given parameter (transient).

Public function Virtual

void

 

OverrideTexture

(
    const UTexture* InTextureToOve...,
    UTexture* OverrideTexture,
    ERHIFeatureLevel::Type InFeatureLev...
)

Override a specific texture (transient)

Public function

FGraphEventA...

 

PrecachePSOs

(
    const TConstArrayView< const FVerte...,
    const FPSOPrecacheParams& PreCache...,
    EPSOPrecachePriority PSOPrecachePri...,
    TArray< FMaterialPSOPrecacheRequest...
)

Public function

FGraphEventA...

 

PrecachePSOs

(
    const TConstArrayView< const FVerte...,
    const FPSOPrecacheParams& PreCache...
)

Precache PSOs which can be used for this material for the given vertex factory type and material paramaters

Public function

FGraphEventA...

 

PrecachePSOs

(
    const FVertexFactoryType* Vert...,
    const FPSOPrecacheParams& PreCache...
)

Precache PSOs which can be used for this material for the given vertex factory type and material paramaters

Public function Virtual

FGraphEventA...

 

PrecachePSOs

(
    const FPSOPrecacheVertexFactoryData...,
    const FPSOPrecacheParams& PreCache...,
    EPSOPrecachePriority Priority,
    TArray< FMaterialPSOPrecacheRequest...
)

Public function

FGraphEventA...

 

PrecachePSOs

(
    const TConstArrayView< const FVerte...,
    const FPSOPrecacheParams& PreCache...,
    TArray< FMaterialPSOPrecacheRequest...
)

Public function Static

void

 

RecacheAllMaterialUniformExpressions

(
    bool bRecreateUniformBuffer
)

Re-caches uniform expressions for all material interfaces Set bRecreateUniformBuffer to true if uniform buffer layout will change (e.g. FMaterial is being recompiled).

Public function Virtual Const

void

 

RecacheUniformExpressions

(
    bool bRecreateUniformBuffer
)

Re-caches uniform expressions for this material interface Set bRecreateUniformBuffer to true if uniform buffer layout will change (e.g. FMaterial is being recompiled).

Public function Virtual

void

 

SaveShaderStableKeysInner

(
    const ITargetPlatform* TP,
    const FStableShaderKeyAndValue& Sa...
)

Public function

void

 

SetCastShadowAsMasked

(
    bool InCastShadowAsMasked
)

Public function

void

 

SetDiffuseBoost

(
    float InDiffuseBoost
)

Public function

void

 

SetEmissiveBoost

(
    float InEmissiveBoost
)

Public function

void

 

SetExportResolutionScale

(
    float InExportResolutionScale
)

Public function

void

 

SetFeatureLevelToCompile

(
    ERHIFeatureLevel::Type FeatureLevel,
    bool bShouldCompile
)

Set which feature levels this material instance should compile.

Public function Virtual

void

 

SetForceMipLevelsToBeResident

(
    bool OverrideForceMiplevelsToBeResi...,
    bool bForceMiplevelsToBeResidentVal...,
    float ForceDuration,
    int32 CinematicTextureGroups,
    bool bFastResponse
)

Force the streaming system to disregard the normal logic for the specified duration and instead always load all mip-levels for all textures used by this material.

Public function Static

void

 

SetGlobalRequiredFeatureLevel

(
    ERHIFeatureLevel::Type FeatureLevel,
    bool bShouldCompile
)

Set which feature levels all materials should compile to. GMaxRHIFeatureLevel is always compiled.

Public function

void

 

SetLightingGuid()

Public function

void

 

SetOverrideCastShadowAsMasked

(
    bool bInOverrideCastShadowAsMasked
)

Public function

void

 

SetOverrideDiffuseBoost

(
    bool bInOverrideDiffuseBoost
)

Public function

void

 

SetOverrideEmissiveBoost

(
    bool bInOverrideEmissiveBoost
)

Public function

void

 

SetOverrideExportResolutionScale

(
    bool bInOverrideExportResolutionSca...
)

Public function

void

 

SetShouldForcePlanePreview

(
    const bool bInShouldForcePlanePrevi...
)

Set whether or not this Material Interface should force a plane preview

Public function

void

 

SetStrataCompilationConfig

(
    FStrataCompilationConfig& StrataCo...
)

Public function

void

 

SetTextureStreamingData

(
    const TArray< FMaterialTextureInfo ...
)

Set new texture streaming data.

Public function Virtual Const

bool

 

ShouldAlwaysEvaluateWorldPositionOffset()

Public function Virtual

bool

 

ShouldForcePlanePreview()

True if this Material Interface should force a plane preview

Public function

void

 

SortTextureStreamingData

(
    bool bForceSort,
    bool bFinalSort
)

Sort the texture streaming data by names to accelerate search. Only sorts if required.

Public function Static

void

 

SubmitRemainingJobsForWorld

(
    UWorld* World,
    EMaterialShaderPrecompileMode Compi...
)

Submits shaders to be compiled for all the materials in the world.

Public function Virtual

bool

 

UpdateLightmassTextureTracking()

Check if the textures have changed since the last time the material was serialized for Lightmass...

Protected function

void

 

UpdateMaterialRenderProxy

(
    FMaterialRenderProxy& Proxy
)

Public function Const

bool

 

UseAnyStreamingTexture()

Return whether this material refer to any streaming textures.

Public function Virtual Const

bool

 

WritesToRuntimeVirtualTexture()

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

Public function Virtual

bool

 

IsReadyForFinishDestroy()

Called to check if the object is ready for FinishDestroy.

Public function Virtual

void

 

PostCDOContruct()

Called after the C++ constructor has run on the Class Default Object (CDO) for a class.

Public function Virtual

void

 

PostDuplicate

(
    bool bDuplicateForPIE
)

Called after duplication & serialization and before PostLoad.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostInitProperties()

Called after the C++ constructor and after the properties have been initialized, including those loaded from config.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreSave

(
    FObjectPreSaveContext SaveContext
)

Presave function.

Public function Virtual

bool

 

Rename

(
    const TCHAR* NewName,
    UObject* NewOuter,
    ERenameFlags Flags
)

Rename this object to a unique name, or change its outer.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Overridden from IBlendableInterface

Name Description

Public function Virtual Const

void

 

OverrideBlendableSettings

(
    FSceneView& View,
    float Weight
)

Overridden from IInterface_AssetUserData

Name Description

Public function Virtual

void

 

AddAssetUserData

(
    UAssetUserData* InUserData
)

Public function Virtual

UAssetUserDa...

 

GetAssetUserDataOfClass

(
    TSubclassOf< UAssetUserData > InUse...
)

Public function Virtual

void

 

RemoveUserDataOfClass

(
    TSubclassOf< UAssetUserData > InUse...
)

Constants

Name

Description

FeatureLevelsForAllMaterials

Feature level bitfield to compile for all materials

SamplerTypeEnum

Cached type information for the sampler type enumeration.

Deprecated Functions

Name Description

Public function Virtual

float

 

GetScalarParameterDefault

(
    const FHashedMaterialParameterInfo ...,
    ERHIFeatureLevel::Type FeatureLevel
)

This function is deprecated. Use GetScalarParameterDefaultValue instead.

Public function Virtual

PRAGMA_DISAB...

 

PreSave

(
    const ITargetPlatform* TargetP...
)

Use version that takes FObjectPreSaveContext instead.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel