Navigation
API > API/Runtime > API/Runtime/Engine
Implementation of the FMaterial interface for a UMaterial or UMaterialInstance.
| Name | FMaterialResource |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Public/MaterialShared.h |
| Include Path | #include "MaterialShared.h" |
Syntax
class FMaterialResource : public FMaterial
Inheritance Hierarchy
- FMaterial → FMaterialResource
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMaterialResource() |
MaterialShared.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMaterialResource() |
MaterialShared.h |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FLWCUsagesArray | TStaticArray< uint16,(int) ELWCFunctionKind::Max > | MaterialShared.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void GetEstimatedLWCFuncUsages
(
FLWCUsagesArray& UsagesVS, |
MaterialShared.h | ||
void GetEstimatedNumTextureSamples
(
uint32& VSSamples, |
MaterialShared.h | ||
uint32 GetEstimatedNumVirtualTextureLookups() |
MaterialShared.h | ||
const UMaterial * GetMaterial() |
MaterialShared.h | ||
const UMaterialInstance * GetMaterialInstance() |
MaterialShared.h | ||
uint32 GetNumVirtualTextureStacks() |
MaterialShared.h | ||
void GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
MaterialShared.h | ||
int32 GetSamplerUsage() |
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). | MaterialShared.h | |
void GetUserInterpolatorUsage
(
uint32& NumUsedUVScalars, |
MaterialShared.h | ||
void SetMaterial
(
UMaterial* InMaterial |
MaterialShared.h | ||
void SetMaterial
(
UMaterial* InMaterial, |
MaterialShared.h | ||
void SetMaterialInstance
(
UMaterialInstance* InMaterialInstance |
MaterialShared.h |
Overridden from FMaterial
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
MaterialShared.h | ||
virtual bool AllowNegativeEmissiveColor() |
MaterialShared.h | ||
virtual bool AllowTranslucentLocalLightShadow() |
MaterialShared.h | ||
virtual void BeginAllowCachingStaticParameterValues() |
MaterialShared.h | ||
virtual bool CastsRayTracedShadows() |
MaterialShared.h | ||
virtual bool CheckInValidStateForCompilation
(
FMaterialCompiler* Compiler |
Checks that no pre-compilation errors have been detected and if so it reports them using specified compiler. | MaterialShared.h | |
virtual bool ComputeFogPerPixel() |
MaterialShared.h | ||
virtual void EndAllowCachingStaticParameterValues() |
MaterialShared.h | ||
virtual void FeedbackMaterialLayersInstancedGraphFromCompilation
(
const FMaterialLayersFunctions* InLayers |
MaterialShared.h | ||
virtual bool GetAllowDevelopmentShaderCompile() |
Returns true if this material is allowed to make development shaders via the global CVar CompileShadersForDevelopment. | MaterialShared.h | |
virtual 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. | MaterialShared.h | |
virtual FName GetAssetPath() |
Allows to associate the shader resources with the asset for load order. | MaterialShared.h | |
virtual int32 GetBlendableLocation() |
MaterialShared.h | ||
virtual bool GetBlendableOutputAlpha() |
MaterialShared.h | ||
virtual int32 GetBlendablePriority() |
MaterialShared.h | ||
virtual enum EBlendMode GetBlendMode() |
MaterialShared.h | ||
virtual bool GetCastDynamicShadowAsMasked() |
MaterialShared.h | ||
virtual bool GetDisablePreExposureScale() |
MaterialShared.h | ||
virtual FDisplacementFadeRange GetDisplacementFadeRange() |
MaterialShared.h | ||
virtual FDisplacementScaling GetDisplacementScaling() |
MaterialShared.h | ||
virtual bool GetForceCompatibleWithLightFunctionAtlas() |
MaterialShared.h | ||
virtual bool GetForwardBlendsSkyLightCubemaps() |
MaterialShared.h | ||
virtual FString GetFriendlyName() |
MaterialShared.h | ||
virtual FString GetFullPath() |
MaterialShared.h | ||
virtual uint32 GetMaterialDecalResponse() |
MaterialShared.h | ||
virtual EMaterialDomain GetMaterialDomain() |
MaterialShared.h | ||
virtual enum EMaterialFloatPrecisionMode GetMaterialFloatPrecisionMode() |
MaterialShared.h | ||
virtual FGuid GetMaterialId() |
Gets the Guid that represents this material. | MaterialShared.h | |
virtual UMaterialInterface * GetMaterialInterface() |
MaterialShared.h | ||
virtual const FMaterialLayersFunctions * GetMaterialLayers() |
MaterialShared.h | ||
virtual EMaterialTranslateValidationFlags GetMaterialTranslateValidationFlags() |
MaterialShared.h | ||
virtual FString GetMaterialUsageDescription() |
Returns a string that describes the material's usage for debugging purposes. | MaterialShared.h | |
virtual int32 GetNeuralProfileId() |
MaterialShared.h | ||
virtual int32 GetNumCustomizedUVs() |
MaterialShared.h | ||
virtual float GetOpacityMaskClipValue() |
MaterialShared.h | ||
virtual EPixelDepthOffsetMode GetPixelDepthOffsetMode() |
MaterialShared.h | ||
virtual uint16 GetPreshaderGap() |
MaterialShared.h | ||
virtual TConstArrayView< TObjectPtr< UTextureCollection > > GetReferencedTextureCollections() |
MaterialShared.h | ||
virtual TArrayView< const TObjectPtr< UObject > > GetReferencedTextures() |
MaterialShared.h | ||
virtual ERefractionCoverageMode GetRefractionCoverageMode() |
MaterialShared.h | ||
virtual float GetRefractionDepthBiasValue() |
MaterialShared.h | ||
virtual enum ERefractionMode GetRefractionMode() |
MaterialShared.h | ||
virtual bool GetRootNodeOverridesDefaultRefraction() |
MaterialShared.h | ||
virtual void GetShaderMapId
(
EShaderPlatform Platform, |
Material properties. | MaterialShared.h | |
| MaterialShared.h | |||
virtual FMaterialShadingModelField GetShadingModels() |
MaterialShared.h | ||
virtual EMaterialShadingRate GetShadingRate() |
MaterialShared.h | ||
virtual void GetStaticParameterSet
(
EShaderPlatform Platform, |
MaterialShared.h | ||
virtual uint32 GetStencilCompare() |
MaterialShared.h | ||
virtual uint32 GetStencilRefValue() |
MaterialShared.h | ||
virtual float GetTranslucencyDirectionalLightingIntensity() |
MaterialShared.h | ||
virtual enum ETranslucencyLightingMode GetTranslucencyLightingMode() |
MaterialShared.h | ||
virtual float GetTranslucentBackscatteringExponent() |
MaterialShared.h | ||
virtual float GetTranslucentDirectionalLightShadowQuality() |
MaterialShared.h | ||
virtual float GetTranslucentLocalLightShadowQuality() |
MaterialShared.h | ||
virtual FLinearColor GetTranslucentMultipleScatteringExtinction() |
MaterialShared.h | ||
virtual float GetTranslucentSelfShadowDensityScale() |
MaterialShared.h | ||
virtual float GetTranslucentSelfShadowSecondDensityScale() |
MaterialShared.h | ||
virtual float GetTranslucentSelfShadowSecondOpacity() |
MaterialShared.h | ||
virtual float GetTranslucentShadowDensityScale() |
MaterialShared.h | ||
virtual float GetTranslucentShadowStartOffset() |
MaterialShared.h | ||
virtual bool HasAmbientOcclusionConnected() |
MaterialShared.h | ||
virtual bool HasAnisotropyConnected() |
MaterialShared.h | ||
virtual bool HasBaseColorConnected() |
MaterialShared.h | ||
virtual bool HasDisplacementConnected() |
MaterialShared.h | ||
virtual bool HasEmissiveColorConnected() |
MaterialShared.h | ||
virtual bool HasFirstPersonOutput() |
MaterialShared.h | ||
virtual bool HasMaterialPropertyConnected
(
EMaterialProperty In |
MaterialShared.h | ||
virtual bool HasMetallicConnected() |
MaterialShared.h | ||
virtual bool HasNormalConnected() |
MaterialShared.h | ||
virtual bool HasPerInstanceCustomData() |
MaterialShared.h | ||
virtual bool HasPerInstanceRandom() |
MaterialShared.h | ||
virtual bool HasPixelAnimation() |
MaterialShared.h | ||
virtual bool HasRenderTracePhysicalMaterialOutputs() |
MaterialShared.h | ||
virtual bool HasRoughnessConnected() |
MaterialShared.h | ||
virtual bool HasRuntimeVirtualTextureOutput() |
MaterialShared.h | ||
virtual bool HasSpecularConnected() |
MaterialShared.h | ||
virtual bool HasSubstrateRoughnessTracking() |
MaterialShared.h | ||
virtual bool HasVertexInterpolator() |
MaterialShared.h | ||
virtual bool IsDefaultMaterial() |
MaterialShared.h | ||
virtual bool IsDeferredDecal() |
MaterialShared.h | ||
virtual bool IsDisplacementFadeEnabled() |
MaterialShared.h | ||
virtual bool IsDistorted() |
MaterialShared.h | ||
virtual bool IsDitheredLODTransition() |
MaterialShared.h | ||
virtual bool IsDitherMasked() |
MaterialShared.h | ||
virtual bool IsDualBlendingEnabled
(
EShaderPlatform Platform |
MaterialShared.h | ||
virtual bool IsFullyRough() |
MaterialShared.h | ||
virtual bool IsLightFunction() |
MaterialShared.h | ||
virtual bool IsMasked() |
MaterialShared.h | ||
virtual bool IsMobileSeparateTranslucencyEnabled() |
MaterialShared.h | ||
virtual bool IsNonmetal() |
MaterialShared.h | ||
virtual bool IsPersistent() |
Should shaders compiled for this material be saved to disk? | MaterialShared.h | |
virtual bool IsPostProcessMaterial() |
MaterialShared.h | ||
virtual bool IsShadingModelFromMaterialExpression() |
MaterialShared.h | ||
virtual bool IsSky() |
MaterialShared.h | ||
virtual bool IsSpecialEngineMaterial() |
MaterialShared.h | ||
virtual bool IsStencilTestEnabled() |
MaterialShared.h | ||
virtual bool IsSubstrateMaterial() |
MaterialShared.h | ||
virtual bool IsTangentSpaceNormal() |
MaterialShared.h | ||
virtual bool IsTessellationEnabled() |
MaterialShared.h | ||
virtual bool IsThinSurface() |
MaterialShared.h | ||
virtual bool IsTranslucencyAfterDOFEnabled() |
MaterialShared.h | ||
virtual bool IsTranslucencyAfterMotionBlurEnabled() |
MaterialShared.h | ||
virtual bool IsTranslucencyVelocityFromDepth() |
MaterialShared.h | ||
virtual bool IsTranslucencyWritingCustomDepth() |
MaterialShared.h | ||
virtual bool IsTranslucencyWritingFrontLayerTransparency() |
MaterialShared.h | ||
virtual bool IsTranslucencyWritingVelocity() |
MaterialShared.h | ||
virtual bool IsTwoSided() |
MaterialShared.h | ||
virtual bool IsUIMaterial() |
MaterialShared.h | ||
virtual bool IsUsedWithAPEXCloth() |
MaterialShared.h | ||
virtual bool IsUsedWithBeamTrails() |
MaterialShared.h | ||
virtual bool IsUsedWithEditorCompositing() |
MaterialShared.h | ||
virtual bool IsUsedWithGeometryCache() |
MaterialShared.h | ||
virtual bool IsUsedWithGeometryCollections() |
MaterialShared.h | ||
virtual bool IsUsedWithHairStrands() |
MaterialShared.h | ||
virtual bool IsUsedWithHeterogeneousVolumes() |
MaterialShared.h | ||
virtual bool IsUsedWithInstancedStaticMeshes() |
MaterialShared.h | ||
virtual bool IsUsedWithLandscape() |
MaterialShared.h | ||
virtual bool IsUsedWithLidarPointCloud() |
MaterialShared.h | ||
virtual bool IsUsedWithMeshParticles() |
MaterialShared.h | ||
virtual bool IsUsedWithMorphTargets() |
MaterialShared.h | ||
virtual bool IsUsedWithNanite() |
MaterialShared.h | ||
virtual bool IsUsedWithNeuralNetworks() |
MaterialShared.h | ||
virtual bool IsUsedWithNiagaraMeshParticles() |
MaterialShared.h | ||
virtual bool IsUsedWithNiagaraRibbons() |
MaterialShared.h | ||
virtual bool IsUsedWithNiagaraSprites() |
MaterialShared.h | ||
virtual bool IsUsedWithParticleSprites() |
MaterialShared.h | ||
virtual bool IsUsedWithParticleSystem() |
MaterialShared.h | ||
virtual bool IsUsedWithSkeletalMesh() |
MaterialShared.h | ||
virtual bool IsUsedWithSplineMeshes() |
MaterialShared.h | ||
virtual bool IsUsedWithStaticLighting() |
MaterialShared.h | ||
virtual bool IsUsedWithStaticMesh() |
MaterialShared.h | ||
virtual bool IsUsedWithVirtualHeightfieldMesh() |
MaterialShared.h | ||
virtual bool IsUsedWithVolumetricCloud() |
MaterialShared.h | ||
virtual bool IsUsedWithWater() |
MaterialShared.h | ||
virtual bool IsUsingAlphaToCoverage() |
MaterialShared.h | ||
virtual bool IsUsingHQForwardReflections() |
MaterialShared.h | ||
virtual bool IsUsingNewHLSLGenerator() |
Is the material using the new (WIP) HLSL generator? | MaterialShared.h | |
virtual bool IsUsingPlanarForwardReflections() |
MaterialShared.h | ||
virtual bool IsUsingPreintegratedGFForSimpleIBL() |
MaterialShared.h | ||
virtual bool IsVariableRateShadingAllowed() |
MaterialShared.h | ||
virtual bool IsVolumetricPrimitive() |
MaterialShared.h | ||
virtual bool IsWireframe() |
MaterialShared.h | ||
virtual void LegacySerialize
(
FArchive& Ar |
Serializes the material. | MaterialShared.h | |
virtual void NotifyCompilationFinished() |
Called when compilation of an FMaterial finishes, after the GameThreadShaderMap is set and the render command to set the RenderThreadShaderMap is queued | MaterialShared.h | |
virtual bool RequiresSynchronousCompilation() |
MaterialShared.h | ||
virtual bool ShouldAlwaysEvaluateWorldPositionOffset() |
MaterialShared.h | ||
virtual bool ShouldApplyCloudFogging() |
MaterialShared.h | ||
virtual bool ShouldApplyFogging() |
MaterialShared.h | ||
virtual bool ShouldDisableDepthTest() |
MaterialShared.h | ||
virtual bool ShouldDoContactShadows() |
MaterialShared.h | ||
virtual bool ShouldDoSSR() |
MaterialShared.h | ||
virtual bool ShouldEnableResponsiveAA() |
MaterialShared.h | ||
virtual bool ShouldGenerateSphericalParticleNormals() |
MaterialShared.h | ||
virtual bool ShouldInlineShaderCode() |
MaterialShared.h | ||
virtual bool ShouldWriteOnlyAlpha() |
MaterialShared.h | ||
virtual bool SupportsMaterialCache() |
MaterialShared.h | ||
virtual bool UseLmDirectionality() |
MaterialShared.h | ||
virtual bool UseNormalCurvatureToRoughness() |
MaterialShared.h |
Protected
Overridden from FMaterial
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 CompileCustomAttribute
(
const FGuid& AttributeID, |
Used to translate code for custom output attributes such as ClearCoatBottomNormal | MaterialShared.h | |
virtual int32 CompilePropertyAndSetMaterialProperty
(
EMaterialProperty Property, |
Entry point for compiling a specific material property. This must call SetMaterialProperty. | MaterialShared.h | |
virtual void GatherCustomOutputExpressions
(
TArray< class UMaterialExpressionCustomOutput* >& OutCustomOutputs |
Gives the material a chance to compile any custom output nodes it has added | MaterialShared.h | |
virtual void GatherExpressionsForCustomInterpolators
(
TArray< class UMaterialExpression* >& OutExpressions |
Gather any UMaterialExpressionCustomOutput expressions in the material and referenced function calls | MaterialShared.h | |
virtual FString GetBaseMaterialPathName() |
Useful for debugging. | MaterialShared.h | |
virtual FString GetDebugName() |
MaterialShared.h | ||
virtual bool HasPixelDepthOffsetConnected() |
MaterialShared.h | ||
virtual bool HasVertexPositionOffsetConnected() |
MaterialShared.h |