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

#include <RenderResource.h>

+ Inheritance diagram for FTexture:

Public Member Functions

RENDERCORE_API FTexture ()
 
virtual RENDERCORE_API ~FTexture ()
 
RENDERCORE_API FTexture (const FTexture &)
 
RENDERCORE_API FTexture (FTexture &&)
 
RENDERCORE_API FTextureoperator= (const FTexture &Other)
 
RENDERCORE_API FTextureoperator= (FTexture &&Other)
 
const FTextureRHIRefGetTextureRHI ()
 
virtual RENDERCORE_API uint32 GetSizeX () const
 
virtual RENDERCORE_API uint32 GetSizeY () const
 
virtual RENDERCORE_API uint32 GetSizeZ () const
 
virtual RENDERCORE_API void ReleaseRHI () override
 
virtual RENDERCORE_API FString GetFriendlyName () const override
 
- Public Member Functions inherited from FRenderResource
RENDERCORE_API FRenderResource ()
 
RENDERCORE_API FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 
RENDERCORE_API FRenderResource (const FRenderResource &)
 
RENDERCORE_API FRenderResource (FRenderResource &&)
 
RENDERCORE_API FRenderResourceoperator= (const FRenderResource &Other)
 
RENDERCORE_API FRenderResourceoperator= (FRenderResource &&Other)
 
virtual RENDERCORE_API ~FRenderResource ()
 
virtual void InitRHI (FRHICommandListBase &RHICmdList)
 
virtual RENDERCORE_API void InitResource (FRHICommandListBase &RHICmdList)
 
virtual RENDERCORE_API void ReleaseResource ()
 
RENDERCORE_API void UpdateRHI (FRHICommandListBase &RHICmdList)
 
bool IsInitialized () const
 
int32 GetListIndex () const
 
EInitPhase GetInitPhase () const
 
void SetOwnerName (FName InOwnerName)
 
FName GetOwnerName () const
 
void SetResourceName (FName InResourceName)
 
FName GetResourceName () const
 

Public Attributes

FTextureRHIRef TextureRHI
 
FSamplerStateRHIRef SamplerStateRHI
 
FSamplerStateRHIRef DeferredPassSamplerStateRHI
 
double LastRenderTime = -FLT_MAX
 
FMipBiasFade MipBiasFade
 
bool bGreyScaleFormat = false
 
bool bIgnoreGammaConversions = false
 
bool bSRGB = false
 
- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 

Static Protected Member Functions

static RENDERCORE_API FRHISamplerStateGetOrCreateSamplerState (const FSamplerStateInitializerRHI &Initializer)
 
- Static Protected Member Functions inherited from FRenderResource
static RENDERCORE_API FRHICommandListBaseGetImmediateCommandList ()
 

Additional Inherited Members

- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 
- Static Public Member Functions inherited from FRenderResource
static RENDERCORE_API void ReleaseRHIForAllResources ()
 
static RENDERCORE_API void InitPreRHIResources ()
 
static RENDERCORE_API void ChangeFeatureLevel (ERHIFeatureLevel::Type NewFeatureLevel)
 
static RENDERCORE_API FName SetScopeName (FName Name)
 
- Protected Member Functions inherited from FRenderResource
void SetFeatureLevel (const FStaticFeatureLevel InFeatureLevel)
 
const FStaticFeatureLevel GetFeatureLevel () const
 
bool HasValidFeatureLevel () const
 
template<typename T >
FBufferRHIRef CreateRHIBuffer (FRHICommandListBase &RHICmdList, T &InOutResourceObject, uint32 ResourceCount, EBufferUsageFlags InBufferUsageFlags, const TCHAR *InDebugName)
 
void SetInitPhase (EInitPhase InInitPhase)
 

Detailed Description

A textures resource.

Constructor & Destructor Documentation

◆ FTexture() [1/3]

FTexture::FTexture ( )
default

◆ ~FTexture()

FTexture::~FTexture ( )
virtualdefault

◆ FTexture() [2/3]

FTexture::FTexture ( const FTexture )
default

◆ FTexture() [3/3]

FTexture::FTexture ( FTexture &&  )
default

Member Function Documentation

◆ GetFriendlyName()

FString FTexture::GetFriendlyName ( ) const
overridevirtual
Returns
The resource's friendly name. Typically a UObject name.

Reimplemented from FRenderResource.

Reimplemented in FPlanarReflectionRenderTarget, FMediaTextureResource, FRenderTargetTexture, FSlateFontTextureRHIResource, and FWebBrowserTextureResource.

◆ GetOrCreateSamplerState()

FRHISamplerState * FTexture::GetOrCreateSamplerState ( const FSamplerStateInitializerRHI Initializer)
staticprotected

◆ GetSizeX()

◆ GetSizeY()

◆ GetSizeZ()

uint32 FTexture::GetSizeZ ( ) const
virtual

Returns the depth of the texture in pixels.

Reimplemented in FTextureCubeArrayResource, FStreamableTextureResource, and FTextureRenderTargetVolumeResource.

◆ GetTextureRHI()

const FTextureRHIRef & FTexture::GetTextureRHI ( )
inline

◆ operator=() [1/2]

FTexture & FTexture::operator= ( const FTexture Other)
default

◆ operator=() [2/2]

FTexture & FTexture::operator= ( FTexture &&  Other)
default

◆ ReleaseRHI()

Member Data Documentation

◆ bGreyScaleFormat

bool FTexture::bGreyScaleFormat = false

bGreyScaleFormat indicates the texture is actually in R channel but should be read as Grey (replicate R to RGBA) this is set from CompressionSettings, not PixelFormat this is only used by Editor/Debug shaders, not real game materials, which use SamplerType from MaterialExpressions

◆ bIgnoreGammaConversions

bool FTexture::bIgnoreGammaConversions = false

true if the texture is in the same gamma space as the intended rendertarget (e.g. screenshots). The texture will have sRGB==false and bIgnoreGammaConversions==true, causing a non-sRGB texture lookup and no gamma-correction in the shader.

This was only ever checked in the Canvas renderer, not the standard Material shader path. It is no longer set or checked.

◆ bSRGB

bool FTexture::bSRGB = false

Is the pixel data in this texture sRGB?

◆ DeferredPassSamplerStateRHI

FSamplerStateRHIRef FTexture::DeferredPassSamplerStateRHI

Sampler state to be used in deferred passes when discontinuities in ddx / ddy would cause too blurry of a mip to be used.

◆ LastRenderTime

double FTexture::LastRenderTime = -FLT_MAX
mutable

The last time the texture has been bound

◆ MipBiasFade

FMipBiasFade FTexture::MipBiasFade

Base values for fading in/out mip-levels.

◆ SamplerStateRHI

FSamplerStateRHIRef FTexture::SamplerStateRHI

The sampler state to use for the texture.

◆ TextureRHI

FTextureRHIRef FTexture::TextureRHI

The texture's RHI resource.


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