UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMaterialCompilationOutput Class Reference

#include <MaterialShared.h>

Public Member Functions

 FMaterialCompilationOutput ()
 
bool IsSceneTextureUsed (ESceneTextureId TexId) const
 
void SetIsSceneTextureUsed (ESceneTextureId TexId)
 
void SetIsDBufferTextureUsed (int32 TextureIndex)
 
void SetIsDBufferTextureLookupUsed (bool bValue)
 
void SetIsPathTracingBufferTextureUsed (int32 TexId)
 
bool RequiresSceneColorCopy () const
 
bool NeedsGBuffer () const
 
bool UsesSceneDepthLookup () const
 
bool UsesVelocitySceneTexture () const
 
 LAYOUT_FIELD (FUniformExpressionSet, UniformExpressionSet)
 
 LAYOUT_FIELD (TMemoryImageArray< FScriptName >, UserSceneTextureInputs)
 
 LAYOUT_FIELD (uint32, UsedSceneTextures)
 
 LAYOUT_FIELD (uint8, UsedPathTracingBufferTextures)
 
 LAYOUT_FIELD_EDITORONLY (uint16, EstimatedNumTextureSamplesVS)
 
 LAYOUT_FIELD_EDITORONLY (uint16, EstimatedNumTextureSamplesPS)
 
 LAYOUT_FIELD_EDITORONLY (uint16, EstimatedNumVirtualTextureLookups)
 
 LAYOUT_FIELD_EDITORONLY (uint8, NumUsedUVScalars)
 
 LAYOUT_FIELD_EDITORONLY (uint8, NumUsedCustomInterpolatorScalars)
 
 LAYOUT_FIELD_EDITORONLY (uint8, NumVirtualTextureFeedbackRequests)
 
 LAYOUT_FIELD (FSubstrateMaterialCompilationOutput, SubstrateMaterialCompilationOutput)
 
 LAYOUT_FIELD (uint8, UsedDBufferTextures)
 
 LAYOUT_FIELD (uint8, RuntimeVirtualTextureOutputAttributeMask)
 
 LAYOUT_BITFIELD (uint8, bNeedsSceneTextures, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesDBufferTextureLookup, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesEyeAdaptation, 1)
 
 LAYOUT_BITFIELD (uint8, bModifiesMeshPosition, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesWorldPositionOffset, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesTemporalResponsiveness, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesMotionVectorWorldOffset, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesGlobalDistanceField, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesPixelDepthOffset, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesDistanceCullFade, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesPerInstanceCustomData, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesVertexInterpolator, 1)
 
 LAYOUT_BITFIELD (uint8, bHasRuntimeVirtualTextureOutputNode, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesAnisotropy, 1)
 
 LAYOUT_BITFIELD (uint8, bIsLightFunctionAtlasCompatible, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesDisplacement, 1)
 
 LAYOUT_BITFIELD (uint8, bUsedWithNeuralNetworks, 1)
 
 LAYOUT_BITFIELD (uint8, bUsesCustomizedUVs, 1)
 

Static Public Member Functions

static uint32 GetGBufferMask ()
 

Detailed Description

Stores outputs from the material compile that need to be saved. Updates to layout fields in this class must be accompanied with a GUID bump to MaterialTranslationDDCVersion entry in FDevSystemGuids.

Constructor & Destructor Documentation

◆ FMaterialCompilationOutput()

FMaterialCompilationOutput::FMaterialCompilationOutput ( )
inline

Member Function Documentation

◆ GetGBufferMask()

static uint32 FMaterialCompilationOutput::GetGBufferMask ( )
inlinestatic

Returns mask for all scene textures that are from the GBuffer

◆ IsSceneTextureUsed()

bool FMaterialCompilationOutput::IsSceneTextureUsed ( ESceneTextureId  TexId) const
inline

◆ LAYOUT_BITFIELD() [1/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bHasRuntimeVirtualTextureOutputNode  ,
 
)

true if the material writes to a runtime virtual texture custom output node.

◆ LAYOUT_BITFIELD() [2/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bIsLightFunctionAtlasCompatible  ,
 
)

true if the material is compatible with the light function atlas

◆ LAYOUT_BITFIELD() [3/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bModifiesMeshPosition  ,
 
)

true if the material modifies the the mesh position.

◆ LAYOUT_BITFIELD() [4/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bNeedsSceneTextures  ,
 
)

true if the material needs the scene texture lookups.

◆ LAYOUT_BITFIELD() [5/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsedWithNeuralNetworks  ,
 
)

Whether the material uses NNE.

◆ LAYOUT_BITFIELD() [6/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesAnisotropy  ,
 
)

true if the material uses non 0 anisotropy value

◆ LAYOUT_BITFIELD() [7/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesCustomizedUVs  ,
 
)

Whether the material uses customized UVs.

◆ LAYOUT_BITFIELD() [8/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesDBufferTextureLookup  ,
 
)

true if the material uses DBuffer texture lookups.

◆ LAYOUT_BITFIELD() [9/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesDisplacement  ,
 
)

Whether the material uses scalar displacement.

◆ LAYOUT_BITFIELD() [10/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesDistanceCullFade  ,
 
)

true if the material uses distance cull fade

◆ LAYOUT_BITFIELD() [11/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesEyeAdaptation  ,
 
)

true if the material uses the EyeAdaptationLookup

◆ LAYOUT_BITFIELD() [12/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesGlobalDistanceField  ,
 
)

true if material uses the global distance field

◆ LAYOUT_BITFIELD() [13/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesMotionVectorWorldOffset  ,
 
)

true if the material uses motion vector offset.

◆ LAYOUT_BITFIELD() [14/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesPerInstanceCustomData  ,
 
)

true if the material uses per-instance custom data

◆ LAYOUT_BITFIELD() [15/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesPixelDepthOffset  ,
 
)

true if the material writes a pixel depth offset

◆ LAYOUT_BITFIELD() [16/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesTemporalResponsiveness  ,
 
)

true if the material uses temporal responsiveness.

◆ LAYOUT_BITFIELD() [17/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesVertexInterpolator  ,
 
)

true if the material uses vertex interpolator

◆ LAYOUT_BITFIELD() [18/18]

FMaterialCompilationOutput::LAYOUT_BITFIELD ( uint8  ,
bUsesWorldPositionOffset  ,
 
)

Whether the material uses world position offset.

◆ LAYOUT_FIELD() [1/7]

FMaterialCompilationOutput::LAYOUT_FIELD ( FSubstrateMaterialCompilationOutput  ,
SubstrateMaterialCompilationOutput   
)

The Substrate material layout

◆ LAYOUT_FIELD() [2/7]

FMaterialCompilationOutput::LAYOUT_FIELD ( FUniformExpressionSet  ,
UniformExpressionSet   
)

◆ LAYOUT_FIELD() [3/7]

FMaterialCompilationOutput::LAYOUT_FIELD ( TMemoryImageArray< FScriptName ,
UserSceneTextureInputs   
)

User scene texture inputs to this material, these will use slots not taken up by the UsedSceneTextures bitfield below

◆ LAYOUT_FIELD() [4/7]

FMaterialCompilationOutput::LAYOUT_FIELD ( uint32  ,
UsedSceneTextures   
)

Bitfield of the ESceneTextures used

◆ LAYOUT_FIELD() [5/7]

FMaterialCompilationOutput::LAYOUT_FIELD ( uint8  ,
RuntimeVirtualTextureOutputAttributeMask   
)

Bitfield of runtime virtual texture output attributes.

◆ LAYOUT_FIELD() [6/7]

FMaterialCompilationOutput::LAYOUT_FIELD ( uint8  ,
UsedDBufferTextures   
)

Bitfield of used DBuffer textures .

◆ LAYOUT_FIELD() [7/7]

FMaterialCompilationOutput::LAYOUT_FIELD ( uint8  ,
UsedPathTracingBufferTextures   
)

Bitfield of the EPathTracingBufferTextureId used

◆ LAYOUT_FIELD_EDITORONLY() [1/6]

FMaterialCompilationOutput::LAYOUT_FIELD_EDITORONLY ( uint16  ,
EstimatedNumTextureSamplesPS   
)

◆ LAYOUT_FIELD_EDITORONLY() [2/6]

FMaterialCompilationOutput::LAYOUT_FIELD_EDITORONLY ( uint16  ,
EstimatedNumTextureSamplesVS   
)

Number of times SampleTexture is called, excludes custom nodes.

◆ LAYOUT_FIELD_EDITORONLY() [3/6]

FMaterialCompilationOutput::LAYOUT_FIELD_EDITORONLY ( uint16  ,
EstimatedNumVirtualTextureLookups   
)

Estimate of the number of times each LWC operator occurs in the material shader code Number of virtual texture lookups performed, excludes direct invocation in shaders (for example VT lightmaps)

◆ LAYOUT_FIELD_EDITORONLY() [4/6]

FMaterialCompilationOutput::LAYOUT_FIELD_EDITORONLY ( uint8  ,
NumUsedCustomInterpolatorScalars   
)

Number of used custom vertex interpolation scalars.

◆ LAYOUT_FIELD_EDITORONLY() [5/6]

FMaterialCompilationOutput::LAYOUT_FIELD_EDITORONLY ( uint8  ,
NumUsedUVScalars   
)

Number of used custom UV scalars.

◆ LAYOUT_FIELD_EDITORONLY() [6/6]

FMaterialCompilationOutput::LAYOUT_FIELD_EDITORONLY ( uint8  ,
NumVirtualTextureFeedbackRequests   
)

Number of feedback requests used for virtual texturing.

◆ NeedsGBuffer()

bool FMaterialCompilationOutput::NeedsGBuffer ( ) const
inline

true if the material uses any GBuffer textures

◆ RequiresSceneColorCopy()

bool FMaterialCompilationOutput::RequiresSceneColorCopy ( ) const
inline

Indicates whether the material uses scene color.

◆ SetIsDBufferTextureLookupUsed()

void FMaterialCompilationOutput::SetIsDBufferTextureLookupUsed ( bool  bValue)
inline

◆ SetIsDBufferTextureUsed()

void FMaterialCompilationOutput::SetIsDBufferTextureUsed ( int32  TextureIndex)
inline

◆ SetIsPathTracingBufferTextureUsed()

void FMaterialCompilationOutput::SetIsPathTracingBufferTextureUsed ( int32  TexId)
inline

◆ SetIsSceneTextureUsed()

void FMaterialCompilationOutput::SetIsSceneTextureUsed ( ESceneTextureId  TexId)
inline

◆ UsesSceneDepthLookup()

bool FMaterialCompilationOutput::UsesSceneDepthLookup ( ) const
inline

true if the material uses the SceneDepth lookup

◆ UsesVelocitySceneTexture()

bool FMaterialCompilationOutput::UsesVelocitySceneTexture ( ) const
inline

true if the material uses the Velocity SceneTexture lookup


The documentation for this class was generated from the following file: