Navigation
API > API/Runtime > API/Runtime/Engine
Inheritance Hierarchy
- FMaterial
- FMaterialResource
- FMaterialResourceStats
References
| Module | Engine |
| Header | /Engine/Source/Runtime/Engine/Public/MaterialShared.h |
| Include | #include "MaterialShared.h" |
Syntax
class FMaterialResource : public FMaterial
Remarks
Implementation of the FMaterial interface for a UMaterial or UMaterialInstance.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< UMaterial > | Material | ||
| TObjectPtr< UMaterialInstance > | MaterialInstance |
Constructors
| Type | Name | Description | |
|---|---|---|---|
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| TStaticArray< uint16,(int) ELWCFunctionKind::Max > | |||
| void | GetEstimatedNumTextureSamples
(
uint32& VSSamples, |
||
| uint32 | |||
| const UMaterial * | GetMaterial () |
||
| const UMaterialInstance * | |||
| uint32 | |||
| void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
||
| int32 | Returns the number of samplers used in this material, or -1 if the material does not have a valid shader map (compile error or still compiling). | ||
| void | GetUserInterpolatorUsage
(
uint32& NumUsedUVScalars, |
||
| void | SetMaterial
(
UMaterial* InMaterial |
||
| void | SetMaterial
(
UMaterial* InMaterial, |
||
| void | SetMaterialInstance
(
UMaterialInstance* InMaterialInstance |
Overridden from FMaterial
| Type | Name | Description | |
|---|---|---|---|
| void | AddReferencedObjects
(
FReferenceCollector& Collector |
||
| bool | |||
| void | |||
| bool | |||
| bool | CheckInValidStateForCompilation
(
FMaterialCompiler* Compiler |
Checks that no pre-compilation errors have been detected and if so it reports them using specified compiler. | |
| int32 | CompilePropertyAndSetMaterialProperty
(
EMaterialProperty Property, |
Entry point for compiling a specific material property. This must call SetMaterialProperty. | |
| bool | |||
| void | |||
| void | GatherCustomOutputExpressions
(
TArray< class UMaterialExpressionCustomOutput* >& OutCustomOutputs |
Gives the material a chance to compile any custom output nodes it has added | |
| void | GatherExpressionsForCustomInterpolators
(
TArray< class UMaterialExpression* >& OutExpressions |
Gather any UMaterialExpressionCustomOutput expressions in the material and referenced function calls | |
| bool | Returns true if this material is allowed to make development shaders via the global CVar CompileShadersForDevelopment. | ||
| FString | GetAssetName () |
Similar to GetFriendlyName, but but avoids historical behavior of the former, returning the exact asset name for material instances instead of just the material. | |
| FName | GetAssetPath () |
Allows to associate the shader resources with the asset for load order. | |
| FString | Useful for debugging. | ||
| int32 | |||
| bool | |||
| enum EBlendMode | GetBlendMode () |
||
| bool | |||
| FString | GetDebugName () |
||
| FDisplacementScaling | |||
| bool | |||
| FString | |||
| FString | GetFullPath () |
||
| uint32 | |||
| EMaterialDomain | |||
| enum EMaterialFloatPrecisionMode | |||
| FGuid | Gets the Guid that represents this material. | ||
| UMaterialInterface * | |||
| FString | Returns a string that describes the material's usage for debugging purposes. | ||
| int32 | |||
| float | |||
| TArrayView< const TObjectPtr< UObject > > | |||
| ERefractionCoverageMode | |||
| float | |||
| enum ERefractionMode | |||
| bool | |||
| void | GetShaderMapId
(
EShaderPlatform Platform, |
Material properties. | |
| FMaterialShadingModelField | |||
| EMaterialShadingRate | |||
| void | GetStaticParameterSet
(
EShaderPlatform Platform, |
||
| uint32 | |||
| uint32 | |||
| float | |||
| enum ETranslucencyLightingMode | |||
| float | |||
| FLinearColor | |||
| float | |||
| float | |||
| float | |||
| float | |||
| float | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | HasMaterialPropertyConnected
(
EMaterialProperty In |
||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | IsDistorted () |
||
| bool | |||
| bool | |||
| bool | IsDualBlendingEnabled
(
EShaderPlatform Platform |
||
| bool | IsFullyRough () |
||
| bool | |||
| bool | IsMasked () |
||
| bool | |||
| bool | |||
| bool | IsNonmetal () |
||
| bool | IsPersistent () |
Should shaders compiled for this material be saved to disk? | |
| bool | |||
| bool | |||
| bool | IsSky () |
||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | IsTwoSided () |
||
| bool | IsUIMaterial () |
||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | Should the material be compiled using exec pin? | ||
| bool | |||
| bool | Is the material using the new (WIP) HLSL generator? | ||
| bool | |||
| bool | |||
| bool | |||
| bool | IsWireframe () |
||
| void | LegacySerialize
(
FArchive& Ar |
Serializes the material. | |
| void | Called when compilation of an FMaterial finishes, after the GameThreadShaderMap is set and the render command to set the RenderThreadShaderMap is queued | ||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | |||
| bool | ShouldDoSSR () |
||
| bool | |||
| bool | |||
| bool | Some materials may be loaded early - before the shader library - and need their code inlined | ||
| bool | |||
| bool | |||
| bool |
Deprecated Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | Should instead check individual properties | ||
| void | SetMaterial
(
UMaterial* InMaterial, |
Parameter bInHasQualityLevelUsage is deprecated |