Navigation
API > API/Developer > API/Developer/TextureFormat
Version of ITextureFormat that handles a child texture format that is used as a "post-process" after compressing textures, useful for several platforms that need to modify already compressed texture data for optimal data.
There are 3 ways a texture can get processed: ITextureFormat::SupportsTiling returns true. This should only be for the old Oodle RAD Game Tools supplied texture encoder and is being deprecated in favor of the new built-in Oodle texture encoder (TextureFormatOodle). In this case, the child format passes the images to the encoder to split apart prior to passing to the platform tools. FChildTextureFormat::GetTiler returns nullptr. This is being phased out because the linear version of the input texture gets encoded for each platform with a post process, wasting cook time. In this case the child format encodes the "base" texture and then tiles it using the platform tools. FChildTextureFormat::GetTiler returns a valid pointer. This is the most recent design. In this case, the child format is used as a holder of metadata and doesn't actually do any work (CompressImage class of functions not called).
| Name | FChildTextureFormat |
| Type | class |
| Header File | /Engine/Source/Developer/TextureFormat/Public/ChildTextureFormat.h |
| Include Path | #include "ChildTextureFormat.h" |
Syntax
class FChildTextureFormat : public ITextureFormat
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FChildTextureFormat
(
const TCHAR* PlatformFormatPrefix |
ChildTextureFormat.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool CompressBaseImage
(
const FImage& InImage, |
ChildTextureFormat.h | ||
PRAGMA_DISABLE_DEPRECATION_WARNINGS bool CompressBaseImageTiled
(
const FImage* Images, |
ChildTextureFormat.h | ||
FName GetBaseFormatName
(
FName ChildFormatName |
ChildTextureFormat.h | ||
const ITextureFormat * GetBaseFormatObject
(
FName FormatName |
Given a platform specific format name, get the texture format object that will do the encoding. | ChildTextureFormat.h | |
FTextureBuildSettings GetBaseTextureBuildSettings
(
const FTextureBuildSettings& BuildSettings |
ChildTextureFormat.h | ||
virtual const ITextureTiler * GetTiler () |
Return the texture tiler for this platform. | ChildTextureFormat.h |
Overridden from ITextureFormat
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanAcceptNonF32Source
(
FName Format |
ChildTextureFormat.h | ||
virtual PRAGMA_ENABLE_DEPRECATION_WARNINGS FCbObject ExportGlobalFormatConfig
(
const FTextureBuildSettings& BuildSettings |
Obtains the current global format config object for this texture format. | ChildTextureFormat.h | |
virtual const FChildTextureFormat * GetChildFormat() |
ChildTextureFormat.h | ||
virtual FString GetDerivedDataKeyString
(
const FTextureBuildSettings& InBuildSettings, |
Gets an optional derived data key string, so that the compressor can rely upon the number of mips, size of texture, etc, when compressing the image | ChildTextureFormat.h | |
virtual EPixelFormat GetEncodedPixelFormat
(
const FTextureBuildSettings& InBuildSettings, |
Returns what the compressed pixel format will be for a given format and the given settings. | ChildTextureFormat.h | |
virtual FName GetEncoderName
(
FName Format |
Return the name of the encoder used for the given format.Used for debugging and UI. | ChildTextureFormat.h | |
virtual void GetSupportedFormats
(
TArray< FName >& OutFormats |
Gets the list of supported formats. | ChildTextureFormat.h | |
virtual uint16 GetVersion
(
FName Format, |
Gets the current version of the specified texture format. | ChildTextureFormat.h | |
virtual bool PrepareTiling
(
const FImage* Images, |
Prepares to compresses a single image with tiling. | ChildTextureFormat.h | |
virtual void ReleaseTiling
(
const FTextureBuildSettings& BuildSettings, |
Cleans up the FTilerSettings object once it is finished. | ChildTextureFormat.h | |
virtual bool SetTiling
(
const FTextureBuildSettings& BuildSettings, |
Sets the tiling settings after device-specific tiling has been performed. | ChildTextureFormat.h | |
virtual bool SupportsEncodeSpeed
(
FName Format, |
Exposes whether the format supports the fast/final encode speed switching in project settings. | ChildTextureFormat.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddBaseTextureFormatModules
(
const TCHAR* ModuleNameWildcard |
ChildTextureFormat.h | ||
virtual FCbObject ExportGlobalChildFormatConfig
(
const FTextureBuildSettings& BuildSettings |
Obtains the global format config object for this texture format. | ChildTextureFormat.h | |
void FinishAddBaseTextureFormatModules() |
ChildTextureFormat.h | ||
FCbObjectView GetBaseFormatConfigOverride
(
const FCbObjectView& ObjView |
ChildTextureFormat.h | ||
FString GetChildDerivedDataKeyString
(
const FTextureBuildSettings& InBuildSettings, |
Make the child type think about if they need a key string or not, by making it pure virtual. | ChildTextureFormat.h | |
virtual FCbObjectView GetChildFormatConfigOverride
(
const FCbObjectView& ObjView |
Obtains the format config appropriate for the build . | ChildTextureFormat.h | |
uint8 GetChildFormatVersion
(
FName Format, |
The final version is a combination of parent and child formats, 8 bits for each | ChildTextureFormat.h |