UMaterialInstance::GetTextureDensity

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

Choose your operating system:

Windows

macOS

Linux

Override Hierarchy

References

Module

Engine

Header

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

Include

#include "Materials/MaterialInstance.h"

Source

/Engine/Source/Runtime/Engine/Private/Materials/MaterialInstance.cpp

Syntax

virtual float GetTextureDensity
(
    FName TextureName,
    const struct FMeshUVChannelInfo & UVChannelData
) const

Remarks

Returns the density of a texture in (LocalSpace Unit / Texture). Used for texture streaming metrics.

Returns

The density, or zero if no data is available for this texture.

Parameters

Parameter

Description

TextureName

The name of the texture to get the data for.

UVChannelData

The mesh UV density in (LocalSpace Unit / UV Unit).