A Material is an asset which can be applied to a mesh to control the visual look of the scene. 更多...
#include <Material.h>
继承自 UMaterialInterface .
Public 成员函数 | |
| void | AppendReferencedFunctionIdsTo (TArray< FGuid > &OutIds) const |
| Returns an array of the guids of functions used in this material, with the call hierarchy flattened. | |
| void | AppendReferencedParameterCollectionIdsTo (TArray< FGuid > &OutIds) const |
| Returns an array of the guids of parameter collections used in this material. | |
| ENGINE_API bool | AttemptInsertNewGroupName (const FString &InNewName) |
| Attempts to add a new group name to the Group Data struct. 更多... | |
| virtual ENGINE_API void | BeginDestroy () override |
| Called before destroying the object. 更多... | |
| virtual ENGINE_API bool | CanBeClusterRoot () const override |
| Called after load to determine if the object can be a cluster root 更多... | |
| virtual ENGINE_API void | FinishDestroy () override |
| Called to finish destroying the object. 更多... | |
| virtual ENGINE_API void | GetAssetRegistryTags (TArray< FAssetRegistryTag > &OutTags) const override |
| 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 更多... | |
| uint32 | GetDecalBlendMode () const |
| Returns the material's decal blend mode, calculated from the DecalBlendMode property and what inputs are connected. | |
| virtual ENGINE_API void | GetLightingGuidChain (bool bIncludeTextures, TArray< FGuid > &OutGuids) const override |
| Returns all the Guids related to this material. 更多... | |
| uint32 | GetMaterialDecalResponse () const |
| Returns the material's decal response mode | |
| void | GetQualityLevelUsage (TArray< bool, TInlineAllocator< EMaterialQualityLevel::Num > > &QualityLevelsUsed, EShaderPlatform ShaderPlatform, bool bCooking=false) |
| Determines whether each quality level has different nodes by inspecting the material's expressions. 更多... | |
| virtual ENGINE_API TArrayView< UObject *const > | GetReferencedTextures () const override final |
| Appends textures referenced by expressions, including nested functions. | |
| virtual ENGINE_API void | GetResourceSizeEx (FResourceSizeEx &CumulativeResourceSize) override |
| Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific). 更多... | |
| ENGINE_API bool | GetUsageByFlag (const EMaterialUsage Usage) const |
| FString | GetUsageName (const EMaterialUsage Usage) const |
| ENGINE_API bool | IsCompilingOrHadCompileError (ERHIFeatureLevel::Type InFeatureLevel) |
| Useful to customize rendering if that case (e.g. 更多... | |
| ENGINE_API bool | IsDefaultMaterial () const |
| Returns true if the material is one of the default materials. | |
| virtual ENGINE_API bool | IsPropertyActive (EMaterialProperty InProperty) const override |
| Checks to see if an input property should be active, based on the state of the material | |
| ENGINE_API bool | IsPropertyActiveInDerived (EMaterialProperty InProperty, const UMaterialInterface *DerivedMaterial) const |
| Like IsPropertyActive(), but considers any state overriden by DerivedMaterial | |
| virtual ENGINE_API bool | IsReadyForFinishDestroy () override |
| Called to check if the object is ready for FinishDestroy. 更多... | |
| ENGINE_API bool | IsUsageFlagDirty (EMaterialUsage Usage) |
| Checks to see if the Usage flag has an annotation marking it as needing to be saved | |
| virtual ENGINE_API void | LogMaterialsAndTextures (FOutputDevice &Ar, int32 Indent) const override |
| Output to the log which materials and textures are used by this material. 更多... | |
| ENGINE_API bool | NeedsSetMaterialUsage_Concurrent (bool &bOutHasUsage, const EMaterialUsage Usage) const |
| Tests to see if this material needs a usage flag update 更多... | |
| virtual ENGINE_API void | PostDuplicate (bool bDuplicateForPIE) override |
| Called after duplication & serialization and before PostLoad. 更多... | |
| virtual ENGINE_API void | PostInitProperties () override |
| Called after the C++ constructor and after the properties have been initialized, including those loaded from config. 更多... | |
| virtual ENGINE_API void | PostLoad () override |
| Do any object-specific cleanup required immediately after loading an object. 更多... | |
| virtual ENGINE_API void | PreSave (const class ITargetPlatform *TargetPlatform) override |
| Presave function. 更多... | |
| ENGINE_API void | ReleaseResources () |
| Releases rendering resources used by this material. 更多... | |
| virtual ENGINE_API void | Serialize (FArchive &Ar) override |
| Handles reading, writing, and reference collecting using FArchive. 更多... | |
| ENGINE_API bool | SetMaterialUsage (bool &bNeedsRecompile, const EMaterialUsage Usage) |
| Set the given usage flag. 更多... | |
静态 Public 成员函数 | |
| static ENGINE_API void | BackupMaterialShadersToMemory (TMap< class FMaterialShaderMap *, TUniquePtr< TArray< uint8 > > > &ShaderMapToSerializedShaderData) |
| Backs up all material shaders to memory through serialization, organized by FMaterialShaderMap. 更多... | |
| static ENGINE_API void | CompileMaterialsForRemoteRecompile (const TArray< UMaterialInterface * > &MaterialsToCompile, EShaderPlatform ShaderPlatform, TMap< FString, TArray< TRefCountPtr< class FMaterialShaderMap > > > &OutShaderMaps) |
| Builds a map from UMaterialInterface name to the shader maps that are needed for rendering on the given platform. | |
| static bool | CopyExpressionParameters (UMaterialExpression *Source, UMaterialExpression *Destination) |
| Copy the values of an expression parameter to another expression parameter of the same class. 更多... | |
| static ENGINE_API UMaterial * | GetDefaultMaterial (EMaterialDomain Domain) |
| Return the default material, loading it if necessary | |
| static bool | GetExpressionParameterName (const UMaterialExpression *Expression, FName &OutName) |
| Get the name of a parameter. 更多... | |
| static ENGINE_API bool | IsDynamicParameter (const UMaterialExpression *Expression) |
| Return whether the provided expression node is a dynamic parameter. 更多... | |
| static ENGINE_API bool | IsParameter (const UMaterialExpression *Expression) |
| Return whether the provided expression node is a parameter. 更多... | |
| static ENGINE_API void | RestoreMaterialShadersFromMemory (const TMap< class FMaterialShaderMap *, TUniquePtr< TArray< uint8 > > > &ShaderMapToSerializedShaderData) |
| Recreates FShaders for FMaterialShaderMap's from the serialized data. 更多... | |
| static ENGINE_API void | UpdateMaterialShaders (TArray< const FShaderType * > &ShaderTypesToFlush, TArray< const FShaderPipelineType * > &ShaderPipelineTypesToFlush, TArray< const FVertexFactoryType * > &VFTypesToFlush, EShaderPlatform ShaderPlatform) |
| Go through every material, flush the specified types and re-initialize the material's shader maps. | |
Public 属性 | |
| uint8 | AllowTranslucentCustomDepthWrites: 1 |
| Allows a translucent material to be used with custom depth writing by compiling additional shaders. | |
| uint8 | bAllowDevelopmentShaderCompile: 1 |
| If true the compilation environment will be changed to remove the global COMPILE_SHADERS_FOR_DEVELOPMENT flag. | |
| uint8 | bAllowNegativeEmissiveColor: 1 |
| Whether the material should allow outputting negative emissive color values. 更多... | |
| uint8 | bApplyCloudFogging: 1 |
| When true, translucent materials receive cloud contribution as part of the fog evaluation, per vertex or per pixel according to the other selected options. 更多... | |
| uint8 | bAutomaticallySetUsageInEditor: 1 |
| Whether to automatically set usage flags based on what the material is applied to in the editor. 更多... | |
| uint8 | bBlockGI: 1 |
| If enabled, the material's opacity defines how much GI is blocked when using the LightPropagationVolume feature | |
| uint8 | bCanMaskedBeAssumedOpaque: 1 |
| true if this Material can be assumed Opaque when set to masked. | |
| uint8 | bCastDynamicShadowAsMasked: 1 |
| Whether the material should cast shadows as masked even though it has a translucent blend mode. | |
| uint8 | bCastRayTracedShadows: 1 |
| when true, the material casts ray tracing shadows. | |
| uint8 | bComputeFogPerPixel: 1 |
| When true, translucent materials have fog computed for every pixel, which costs more but fixes artifacts due to low tessellation. | |
| uint8 | bContactShadows: 1 |
| Contact shadows on translucency | |
| uint8 | bDisableDepthTest: 1 |
| Whether to draw on top of opaque pixels even if behind them. 更多... | |
| uint8 | bEnableAdaptiveTessellation: 1 |
| Enables adaptive tessellation, which tries to maintain a uniform number of pixels per triangle. | |
| uint8 | bEnableCrackFreeDisplacement: 1 |
| Prevents cracks in the surface of the mesh when using tessellation. | |
| uint8 | bEnableMobileSeparateTranslucency: 1 |
| Indicates that the translucent material should not be affected by bloom or DOF. 更多... | |
| uint8 | bEnableResponsiveAA: 1 |
| Indicates that the material should be rendered using responsive anti-aliasing. 更多... | |
| uint8 | bEnableSeparateTranslucency: 1 |
| Indicates that the material should be rendered in the SeparateTranslucency Pass (not affected by DOF, requires bAllowSeparateTranslucency to be set in .ini). | |
| uint8 | bEnableStencilTest: 1 |
| Selectively execute post process material only for pixels that pass the stencil test against the Custom Depth/Stencil buffer. 更多... | |
| uint8 | bGenerateSphericalParticleNormals: 1 |
| Whether to generate spherical normals for particles that use this material. | |
| uint8 | bIsBlendable: 1 |
| Allows blendability to be turned off, only used if domain is PostProcess | |
| uint8 | bIsFunctionPreviewMaterial: 1 |
| true if Material is the function preview material used in the material instance editor. | |
| uint8 | bIsMasked_DEPRECATED: 1 |
| true if Material is masked and uses custom opacity | |
| uint8 | bIsMaterialEditorStatsMaterial: 1 |
| true if this is a special material used for stats by the material editor. | |
| uint8 | bIsPreviewMaterial: 1 |
| true if Material is the preview material used in the material editor. | |
| uint8 | bIsSky: 1 |
| Unlit and Opaque materials can be used as sky material on a sky dome mesh. 更多... | |
| TEnumAsByte< enum EBlendableLocation > | BlendableLocation |
| Where the node is inserted in the (post processing) graph, only used if domain is PostProcess | |
| uint8 | BlendableOutputAlpha: 1 |
| If this is enabled, the blendable will output alpha | |
| int32 | BlendablePriority |
| If multiple nodes with the same type are inserted at the same point, this defined order and if they get combined, only used if domain is PostProcess | |
| uint8 | bOutputTranslucentVelocity: 1 |
| When true, translucent materials will output motion vectors in velocity pass. | |
| uint8 | bScreenSpaceReflections: 1 |
| SSR on translucency | |
| uint8 | bTangentSpaceNormal: 1 |
| Whether the material takes a tangent space normal or a world space normal as input. 更多... | |
| uint8 | bUsedAsSpecialEngineMaterial: 1 |
| This is a special usage flag that allows a material to be assignable to any primitive type. 更多... | |
| uint8 | bUsedWithBeamTrails: 1 |
| Indicates that the material and its instances can be used with beam trails This will result in the shaders required to support beam trails being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithClothing: 1 |
| Indicates that the material and its instances can be used with clothing This will result in the shaders required to support clothing being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithEditorCompositing: 1 |
| Indicates that the material and its instances can be used with editor compositing This will result in the shaders required to support editor compositing being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithGeometryCollections: 1 |
| Indicates that the material and its instances can be use with geometry collections This will result in the shaders required to support geometry collections being compiled which will increase shader compile time and memory usage. | |
| uint32 | bUsedWithHairStrands: 1 |
| Indicates that the material and its instances can be use with hair strands This will result in the shaders required to support hair strands geometries being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithInstancedStaticMeshes: 1 |
| Indicates that the material and its instances can be used with instanced static meshes This will result in the shaders required to support instanced static meshes being compiled which will increase shader compile time and memory usage. | |
| uint32 | bUsedWithLidarPointCloud: 1 |
| Indicates that the material and its instances can be use with LiDAR Point Clouds This will result in the shaders required to support LiDAR Point Cloud geometries being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithMeshParticles: 1 |
| Indicates that the material and its instances can be used with mesh particles This will result in the shaders required to support mesh particles being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithMorphTargets: 1 |
| Indicates that the material and its instances can be used with morph targets This will result in the shaders required to support morph targets being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithNiagaraSprites: 1 |
| Indicates that the material and its instances can be used with Niagara sprites (meshes and ribbons, respectively) This will result in the shaders required to support Niagara sprites being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithParticleSprites: 1 |
| Indicates that the material and its instances can be used with particle sprites This will result in the shaders required to support particle sprites being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithSkeletalMesh: 1 |
| Indicates that the material and its instances can be used with skeletal meshes. 更多... | |
| uint8 | bUsedWithSplineMeshes: 1 |
| Indicates that the material and its instances can be used with spline meshes This will result in the shaders required to support spline meshes being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithStaticLighting: 1 |
| Indicates that the material and its instances can be used with static lighting This will result in the shaders required to support static lighting being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUsedWithUI_DEPRECATED: 1 |
| Indicates that the material and its instances can be used with Slate UI and UMG This will result in the shaders required to support UI materials being compiled which will increase shader compile time and memory usage. | |
| uint32 | bUsedWithVirtualHeightfieldMesh: 1 |
| Indicates that the material and its instances can be used with Virtual Heightfield Mesh. 更多... | |
| uint32 | bUsedWithWater: 1 |
| Indicates that the material and its instances can be use with water This will result in the shaders required to support water meshes being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUseEmissiveForDynamicAreaLighting: 1 |
| If enabled, the material's emissive colour is injected into the LightPropagationVolume | |
| uint8 | bUseFullPrecision: 1 |
| Forces this material to use full (highp) precision in the pixel shader. 更多... | |
| uint8 | bUseMaterialAttributes: 1 |
| when true, the material attributes pin is used instead of the regular pins. | |
| uint8 | bUsesDistortion: 1 |
| Indicates that the material and its instances can be used with distortion This will result in the shaders required to support distortion being compiled which will increase shader compile time and memory usage. | |
| uint8 | bUseTranslucencyVertexFog: 1 |
| When true, translucent materials are fogged. 更多... | |
| uint8 | bWriteOnlyAlpha: 1 |
| Whether the transluency pass should write its alpha, and only the alpha, into the framebuffer | |
| TEnumAsByte< enum EMaterialTessellationMode > | D3D11TessellationMode |
| The type of tessellation to apply to this object. 更多... | |
| class FDefaultMaterialInstance * | DefaultMaterialInstance |
| FMaterialRenderProxy derivative that represent this material to the renderer, when the renderer needs to fetch parameter values. | |
| uint8 | DitheredLODTransition: 1 |
| Whether meshes rendered with the material should support dithered LOD transitions. | |
| uint8 | DitherOpacityMask: 1 |
| Dither opacity mask. 更多... | |
| int32 | NumCustomizedUVs |
| Number of customized UV inputs to display. 更多... | |
| float | OpacityMaskClipValue |
| If BlendMode is BLEND_Masked, the surface is not rendered where OpacityMask < OpacityMaskClipValue. 更多... | |
| FScalarMaterialInput | Refraction |
| output refraction index for translucent rendering Air:1.0 Water:1.333 Ice:1.3 Glass:~1.6 Diamond:2.42 | |
| float | RefractionDepthBias |
| This is the refraction depth bias, larger values offset distortion to prevent closer objects from rendering into the distorted surface at acute viewing angles but increases the disconnect between surface and where the refraction starts. | |
| TEnumAsByte< enum ERefractionMode > | RefractionMode |
| Controls how the Refraction input is interpreted and how the refraction offset into scene color is computed for this material. | |
| TEnumAsByte< EMaterialShadingRate > | ShadingRate |
| Select what shading rate to apply for platforms that have variable rate shading | |
| FGuid | StateId |
| Guid that uniquely identifies this material. 更多... | |
| float | TranslucencyDirectionalLightingIntensity |
| Useful for artificially increasing the influence of the normal on the lighting result for translucency. 更多... | |
| TEnumAsByte< enum ETranslucencyLightingMode > | TranslucencyLightingMode |
| Sets the lighting mode that will be used on this material if it is translucent. | |
| float | TranslucentBackscatteringExponent |
| Controls how diffuse the material's backscattering is when using the MSM_Subsurface shading model. 更多... | |
| FLinearColor | TranslucentMultipleScatteringExtinction |
| Colored extinction factor used to approximate multiple scattering in dense volumes. 更多... | |
| float | TranslucentSelfShadowDensityScale |
| Scale used to make translucent self-shadowing more or less opaque than the material's shadow on other objects. 更多... | |
| float | TranslucentSelfShadowSecondDensityScale |
| Used to make a second self shadow gradient, to add interesting shading in the shadow of the first. | |
| float | TranslucentSelfShadowSecondOpacity |
| Controls the strength of the second self shadow gradient. | |
| float | TranslucentShadowDensityScale |
| Scale used to make translucent shadows more or less opaque than the material's actual opacity. | |
| float | TranslucentShadowStartOffset |
| Local space distance to bias the translucent shadow. 更多... | |
| uint8 | TwoSided: 1 |
| Indicates that the material should be rendered without backface culling and the normal should be flipped for backfaces. | |
| uint32 | UsageFlagWarnings |
| true if we have printed a warning about material usage for a given usage flag. | |
| uint8 | Wireframe: 1 |
| Enables a wireframe view of the mesh the material is applied to. 更多... | |
| FVectorMaterialInput | WorldPositionOffset |
| Adds to world position in the vertex shader. | |
友元 | |
| class | FMaterialResource |
| class | FMaterialUpdateContext |
| Class that knows how to update Materials | |
A Material is an asset which can be applied to a mesh to control the visual look of the scene.
When light from the scene hits the surface, the shading model of the material is used to calculate how that light interacts with the surface.
Warning: Creating new materials directly increases shader compile times! Consider creating a Material Instance off of an existing material instead.
| ENGINE_API bool UMaterial::AttemptInsertNewGroupName | ( | const FString & | InNewName | ) |
Attempts to add a new group name to the Group Data struct.
True if new name was added.
|
static |
Backs up all material shaders to memory through serialization, organized by FMaterialShaderMap.
This will also clear all FMaterialShaderMap references to FShaders.
|
overridevirtual |
Called before destroying the object.
This is called immediately upon deciding to destroy the object, to allow the object to begin an asynchronous cleanup process.
重载 UObject .
|
overridevirtual |
Called after load to determine if the object can be a cluster root
重载 UObjectBaseUtility .
|
static |
Copy the values of an expression parameter to another expression parameter of the same class.
| Source | The source parameter. |
| Destination | The destination parameter that will receive Source's values. |
|
overridevirtual |
Called to finish destroying the object.
After UObject::FinishDestroy is called, the object's memory should no longer be accessed.
重载 UObject .
|
overridevirtual |
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
| OutTags | A list of key-value pairs associated with this object and their types |
重载 UObject .
|
static |
Get the name of a parameter.
| Expression | The expression to retrieve the name from. |
| OutName | The variable that will hold the parameter name. |
|
overridevirtual |
Returns all the Guids related to this material.
For material instances, this includes the parent hierarchy. Used for versioning as parent changes don't update the child instance Guids.
| bIncludeTextures | Whether to include the referenced texture Guids. |
| OutGuids | The list of all resource guids affecting the precomputed lighting system and texture streamer. |
| void UMaterial::GetQualityLevelUsage | ( | TArray< bool, TInlineAllocator< EMaterialQualityLevel::Num > > & | QualityLevelsUsed, |
| EShaderPlatform | ShaderPlatform, | ||
| bool | bCooking = false |
||
| ) |
Determines whether each quality level has different nodes by inspecting the material's expressions.
Or is required by the material quality setting overrides.
| QualityLevelsUsed | output array of used quality levels. |
| ShaderPlatform | The shader platform to use for the quality settings. |
| bCooking | During cooking, certain quality levels may be discarded |
|
overridevirtual |
Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).
| CumulativeResourceSize | Struct used to count up the cumulative size of the resource as to be displayed to artists/LDs in the Editor. |
重载 UObject .
| ENGINE_API bool UMaterial::GetUsageByFlag | ( | const EMaterialUsage | Usage | ) | const |
| FString UMaterial::GetUsageName | ( | const EMaterialUsage | Usage | ) | const |
| ENGINE_API bool UMaterial::IsCompilingOrHadCompileError | ( | ERHIFeatureLevel::Type | InFeatureLevel | ) |
Useful to customize rendering if that case (e.g.
hide the object)
|
static |
Return whether the provided expression node is a dynamic parameter.
| Expression | The expression node to inspect. |
|
static |
Return whether the provided expression node is a parameter.
| Expression | The expression node to inspect. |
|
overridevirtual |
Called to check if the object is ready for FinishDestroy.
This is called after BeginDestroy to check the completion of the potentially asynchronous object cleanup.
重载 UObject .
|
overridevirtual |
Output to the log which materials and textures are used by this material.
| Indent | Number of tabs to put before the log. |
| ENGINE_API bool UMaterial::NeedsSetMaterialUsage_Concurrent | ( | bool & | bOutHasUsage, |
| const EMaterialUsage | Usage | ||
| ) | const |
Tests to see if this material needs a usage flag update
| Usage | - The usage flag to set |
| bOutHasUsage | - if we don't need to call SMU, then this is what SMU would have returned |
|
overridevirtual |
Called after duplication & serialization and before PostLoad.
Used to e.g. make sure UStaticMesh's UModel gets copied as well. Note: NOT called on components on actor duplication (alt-drag or copy-paste). Use PostEditImport as well to cover that case.
重载 UObject .
|
overridevirtual |
Called after the C++ constructor and after the properties have been initialized, including those loaded from config.
This is called before any serialization or other setup has happened.
重载 UObject .
|
overridevirtual |
Do any object-specific cleanup required immediately after loading an object.
This is not called for newly-created objects, and by default will always execute on the game thread.
重载 UObject .
|
overridevirtual |
Presave function.
Gets called once before an object gets serialized for saving. This function is necessary for save time computation as Serialize gets called three times per object from within SavePackage.
重载 UObject .
| ENGINE_API void UMaterial::ReleaseResources | ( | ) |
Releases rendering resources used by this material.
This should only be called directly if the material will not be deleted through the GC system afterward. FlushRenderingCommands() must have been called before this.
|
static |
Recreates FShaders for FMaterialShaderMap's from the serialized data.
Shader maps may not be complete after this due to changes in the shader keys.
|
overridevirtual |
| ENGINE_API bool UMaterial::SetMaterialUsage | ( | bool & | bNeedsRecompile, |
| const EMaterialUsage | Usage | ||
| ) |
Set the given usage flag.
| bNeedsRecompile | - true if the material was recompiled for the usage change |
| Usage | - The usage flag to set |
| uint8 UMaterial::bAllowNegativeEmissiveColor |
Whether the material should allow outputting negative emissive color values.
Only allowed on unlit materials.
| uint8 UMaterial::bApplyCloudFogging |
When true, translucent materials receive cloud contribution as part of the fog evaluation, per vertex or per pixel according to the other selected options.
This is a rough approximation but can help in some cases. Defaults to false. Fog is applied on clouds, so Apply Fogging must be true to use this feature.
| uint8 UMaterial::bAutomaticallySetUsageInEditor |
Whether to automatically set usage flags based on what the material is applied to in the editor.
It can be useful to disable this on a base material with many instances, where adding another usage flag accidentally (eg bUsedWithSkeletalMeshes) can add a lot of shader permutations.
| uint8 UMaterial::bDisableDepthTest |
Whether to draw on top of opaque pixels even if behind them.
This only has meaning for translucency.
| uint8 UMaterial::bEnableMobileSeparateTranslucency |
Indicates that the translucent material should not be affected by bloom or DOF.
(Note: Depth testing is not available)
| uint8 UMaterial::bEnableResponsiveAA |
Indicates that the material should be rendered using responsive anti-aliasing.
Improves sharpness of small moving particles such as sparks. Only use for small moving features because it will cause aliasing of the background.
| uint8 UMaterial::bEnableStencilTest |
Selectively execute post process material only for pixels that pass the stencil test against the Custom Depth/Stencil buffer.
Pixels that fail the stencil test are filled with the previous post process material output or scene color.
| uint8 UMaterial::bIsSky |
Unlit and Opaque materials can be used as sky material on a sky dome mesh.
When IsSky is true, these meshes will not receive any contribution from the aerial perspective. Height and Volumetric fog effects will still be applied.
| uint8 UMaterial::bTangentSpaceNormal |
Whether the material takes a tangent space normal or a world space normal as input.
(TangentSpace requires extra instructions but is often more convenient).
| uint8 UMaterial::bUsedAsSpecialEngineMaterial |
This is a special usage flag that allows a material to be assignable to any primitive type.
This is useful for materials used by code to implement certain viewmodes, for example the default material or lighting only material. The cost is that nearly 20x more shaders will be compiled for the material than the average material, which will greatly increase shader compile time and memory usage. This flag should only be enabled when absolutely necessary, and is purposefully not exposed to the UI to prevent abuse.
| uint8 UMaterial::bUsedWithSkeletalMesh |
Indicates that the material and its instances can be used with skeletal meshes.
This will result in the shaders required to support skeletal meshes being compiled which will increase shader compile time and memory usage.
| uint32 UMaterial::bUsedWithVirtualHeightfieldMesh |
Indicates that the material and its instances can be used with Virtual Heightfield Mesh.
This will result in the shaders required to support Virtual Heightfield Mesh geometries being compiled which will increase shader compile time and memory usage.
| uint8 UMaterial::bUseFullPrecision |
Forces this material to use full (highp) precision in the pixel shader.
This is slower than the default (mediump) but can be used to work around precision-related rendering errors. This setting has no effect on older mobile devices that do not support high precision.
| uint8 UMaterial::bUseTranslucencyVertexFog |
When true, translucent materials are fogged.
Defaults to true.
| TEnumAsByte<enum EMaterialTessellationMode> UMaterial::D3D11TessellationMode |
The type of tessellation to apply to this object.
Note D3D11 required for anything except MTM_NoTessellation.
| uint8 UMaterial::DitherOpacityMask |
Dither opacity mask.
When combined with Temporal AA this can be used as a form of limited translucency which supports all lighting features.
| int32 UMaterial::NumCustomizedUVs |
Number of customized UV inputs to display.
Unconnected customized UV inputs will just pass through the vertex UVs.
| float UMaterial::OpacityMaskClipValue |
If BlendMode is BLEND_Masked, the surface is not rendered where OpacityMask < OpacityMaskClipValue.
If BlendMode is BLEND_Translucent, BLEND_Additive, or BLEND_Modulate, and "Output Velocity" is enabled, the object velocity is not rendered where Opacity < OpacityMaskClipValue.
| FGuid UMaterial::StateId |
Guid that uniquely identifies this material.
Any changes to the state of the material that do not appear separately in the shadermap DDC keys must cause this guid to be regenerated! For example, a modification to the Expressions array. Code changes that cause the guid to be regenerated on load should be avoided, as that requires a resave of the content to stop recompiling every load.
| float UMaterial::TranslucencyDirectionalLightingIntensity |
Useful for artificially increasing the influence of the normal on the lighting result for translucency.
A value larger than 1 increases the influence of the normal, a value smaller than 1 makes the lighting more ambient.
| float UMaterial::TranslucentBackscatteringExponent |
Controls how diffuse the material's backscattering is when using the MSM_Subsurface shading model.
Larger exponents give a less diffuse look (smaller, brighter backscattering highlight). This is only used when the object is casting a volumetric translucent shadow from a directional light.
| FLinearColor UMaterial::TranslucentMultipleScatteringExtinction |
Colored extinction factor used to approximate multiple scattering in dense volumes.
This is only used when the object is casting a volumetric translucent shadow.
| float UMaterial::TranslucentSelfShadowDensityScale |
Scale used to make translucent self-shadowing more or less opaque than the material's shadow on other objects.
This is only used when the object is casting a volumetric translucent shadow.
| float UMaterial::TranslucentShadowStartOffset |
Local space distance to bias the translucent shadow.
Positive values move the shadow away from the light.
| uint8 UMaterial::Wireframe |
Enables a wireframe view of the mesh the material is applied to.