Navigation
API > API/Developer > API/Developer/TextureCompressor
Texture build settings.
| Name | FTextureBuildSettings |
| Type | struct |
| Header File | /Engine/Source/Developer/TextureCompressor/Public/TextureCompressorModule.h |
| Include Path | #include "TextureCompressorModule.h" |
Syntax
struct FTextureBuildSettings
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FTextureBuildSettings() |
Default settings. | TextureCompressorModule.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| MaxTextureResolutionDefault | uint32 | TextureCompressorModule.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AlphaCoverageThresholds | FVector4f | Channel values to compare to when preserving alpha coverage. | TextureCompressorModule.h | |
| AstcEncVersion | FName | If NAME_None, this encodes with the first non-versioned astcenc (4.2.0). | TextureCompressorModule.h | |
| bAffectedBySharedLinearEncoding | bool | If shared linear is enabled at all and this texture in involved with that at all then we set this so we can segregate the derived data keys. | TextureCompressorModule.h | |
| bApplyKernelToTopMip | uint32 | 1:apply mip sharpening/blurring kernel to top mip as well (at half the kernel size), 0:don't | TextureCompressorModule.h | |
| bApplyYCoCgBlockScale | uint32 | Calculate and apply a scale for YCoCg textures. | TextureCompressorModule.h | |
| BaseTextureFormat | const ITextureFormat * | Cached pointer to BaseTextureFormatName. Resolved in FinalizeBuildSettingsForLayer and ResolveBuildSettings. | TextureCompressorModule.h | |
| BaseTextureFormatName | FName | If we have a child format, this is the base format (i.e. will have the platform prefix removed). | TextureCompressorModule.h | |
| bBorderColorBlack | uint32 | Whether the border color should be black. | TextureCompressorModule.h | |
| bChromaKeyTexture | uint32 | Whether to chroma key the image, replacing any pixels that match ChromaKeyColor with transparent black | TextureCompressorModule.h | |
| bComputeBokehAlpha | uint32 | Whether bokeh alpha values should be computed for the texture. | TextureCompressorModule.h | |
| bCPUAccessible | uint32 | If set, the texture will generate a tiny placeholder hw texture and save off a copy of the top mip for CPU access. | TextureCompressorModule.h | |
| bCubemap | uint32 | Whether the texture being built is a cubemap. | TextureCompressorModule.h | |
| bDecodeForPCUsage | bool | If true, after encoding and potentially tiling, convert the texture back to something a PC can render so we can view the final encoding. | TextureCompressorModule.h | |
| bDoScaleMipsForAlphaCoverage | bool | Enable preserving alpha coverage. | TextureCompressorModule.h | |
| bDownsampleWithAverage | uint32 | Whether each mip should use the downsampled-with-average result instead of the sharpened result. | TextureCompressorModule.h | |
| bFlipGreenChannel | uint32 | Whether the green channel should be flipped. Typically only done on normal maps. | TextureCompressorModule.h | |
| bForceAlphaChannel | uint32 | Whether we should not discard the alpha channel when it contains 1 for the entire texture. | TextureCompressorModule.h | |
| bForceNoAlphaChannel | uint32 | Whether we should discard the alpha channel even if it contains non-zero values in the pixel data. | TextureCompressorModule.h | |
| bHasColorSpaceDefinition | bool | Whether the texture has a defined source color space. | TextureCompressorModule.h | |
| bHasTransparentAlpha | bool | Only valid if bKnowAlphaTransparency is true. | TextureCompressorModule.h | |
| bHDRSource | bool | Whether the texture being built contains HDR source data | TextureCompressorModule.h | |
| bKnowAlphaTransparency | bool | Whether bHasTransparentAlpha is valid. | TextureCompressorModule.h | |
| bLongLatSource | uint32 | Whether the texture being built from long/lat source to cubemap. | TextureCompressorModule.h | |
| BlueChromaticityCoordinate | FVector2f | Blue chromaticity coordinate of the source color space. | TextureCompressorModule.h | |
| bNormalizeNormals | bool | Normalize normals after mip gen, before compression | TextureCompressorModule.h | |
| bOodlePreserveExtremes | bool | If set to true, then Oodle encoder preserves 0 and 255 (0.0 and 1.0) values exactly in alpha channel for BC3/BC7 and in all channels for BC4/BC5. | TextureCompressorModule.h | |
| bOodleUsesRDO | bool | TextureCompressorModule.h | ||
| bPadWithBorderColor | bool | If set to true, texture padding will be performed using colors of the border pixels in order to improve quality of the generated mipmaps. | TextureCompressorModule.h | |
| bPreserveBorder | uint32 | Whether the border of the image should be maintained during mipmap generation. | TextureCompressorModule.h | |
| bRenormalizeTopMip | uint32 | 1: renormalizes the top mip (only useful for normal maps, prevents artists errors and adds quality) 0:don't | TextureCompressorModule.h | |
| bReplicateAlpha | uint32 | Whether the contents of the alpha channel should be replicated to all channels. | TextureCompressorModule.h | |
| bReplicateRed | uint32 | Whether the contents of the red channel should be replicated to all channels. | TextureCompressorModule.h | |
| bSharpenWithoutColorShift | uint32 | Whether sharpening should prevent color shifts. | TextureCompressorModule.h | |
| bSRGB | uint32 | Whether the texture contains color data in the sRGB colorspace. | TextureCompressorModule.h | |
| bStreamable_Unused | uint32 | Can the texture be streamed. | TextureCompressorModule.h | |
| bTextureArray | uint32 | Whether the texture being built is a texture array. | TextureCompressorModule.h | |
| bUseLegacyGamma | uint32 | Whether the texture should use the legacy gamma space for converting to sRGB | TextureCompressorModule.h | |
| bUseNewMipFilter | bool | Use newer & faster mip generation filter | TextureCompressorModule.h | |
| bVirtualStreamable | uint32 | Is the texture streamed using the VT system | TextureCompressorModule.h | |
| bVolume | uint32 | Whether the texture being built is a volume. | TextureCompressorModule.h | |
| ChromaKeyColor | FColor | The color that will be replaced with transparent black if chroma keying is enabled | TextureCompressorModule.h | |
| ChromaKeyThreshold | float | The threshold that components have to match for the texel to be considered equal to the ChromaKeyColor when chroma keying (<=, set to 0 to require a perfect exact match) | TextureCompressorModule.h | |
| ChromaticAdaptationMethod | uint8 | Chromatic adaption method applied if the source white point differs from the working color space white point. | TextureCompressorModule.h | |
| ColorAdjustment | FColorAdjustmentParameters | Color adjustment parameters. | TextureCompressorModule.h | |
| CompositePower | float | Default 1, high values result in a stronger effect | TextureCompressorModule.h | |
| CompositeTextureMode | uint8 | E.g. CTM_RoughnessFromNormalAlpha | TextureCompressorModule.h | |
| CompressionQuality | int32 | The quality of the compression algorithm (min 0 - lowest quality, highest cook speed, 4 - highest quality, lowest cook speed) only used by ASTC formats right now. | TextureCompressorModule.h | |
| DiffuseConvolveMipLevel | uint32 | For angular filtered cubemaps, the mip level which contains convolution with the diffuse cosine lobe. | TextureCompressorModule.h | |
| Downscale | float | Values > 1.0 will scale down source texture. Ignored for textures with mips | TextureCompressorModule.h | |
| DownscaleOptions | uint8 | ETextureDownscaleOptions | TextureCompressorModule.h | |
| FormatConfigOverride | FCbObjectView | Format specific config object view or null if no format specific config is applied as part of this build. | TextureCompressorModule.h | |
| GreenChromaticityCoordinate | FVector2f | Green chromaticity coordinate of the source color space. | TextureCompressorModule.h | |
| LODBias | uint32 | The source texture's final LOD bias (i.e. includes LODGroup based biases). | TextureCompressorModule.h | |
| LODBiasWithCinematicMips | uint32 | The source texture's final LOD bias (i.e. includes LODGroup based biases). | TextureCompressorModule.h | |
| LossyCompressionAmount | int32 | ETextureLossyCompressionAmount - oodle resolves this to RDO lambda during fast/final resolution. | TextureCompressorModule.h | |
| MaxTextureResolution | uint32 | For maximum resolution. | TextureCompressorModule.h | |
| MipGenSettings | uint8 | Mipmap generation settings. | TextureCompressorModule.h | |
| MipSharpening | float | The desired amount of mip sharpening. | TextureCompressorModule.h | |
| OodleEncodeEffort | uint8 | TextureCompressorModule.h | ||
| OodleRDO | uint8 | Encoding settings resolved from fast/final. | TextureCompressorModule.h | |
| OodleTextureSdkVersion | FName | Which version of Oodle Texture to encode with | TextureCompressorModule.h | |
| OodleUniversalTiling | uint8 | TextureCompressorModule.h | ||
| PaddingColor | FColor | The color used to pad the texture out if it is resized due to PowerOfTwoMode | TextureCompressorModule.h | |
| PowerOfTwoMode | uint8 | How to stretch or pad the texture to a power of 2 size (if necessary); ETexturePowerOfTwoSetting::Type, opaque to avoid dependencies on Engine headers. | TextureCompressorModule.h | |
| RedChromaticityCoordinate | FVector2f | Red chromaticity coordinate of the source color space. | TextureCompressorModule.h | |
| RepresentsEncodeSpeedNoSend | uint8 | Which encode speed this build settings represents. | TextureCompressorModule.h | |
| ResizeDuringBuildX | int32 | Width of the resized texture when using "Resize To Specific Resolution" padding and resizing option. | TextureCompressorModule.h | |
| ResizeDuringBuildY | int32 | Width of the resized texture when using "Resize To Specific Resolution" padding and resizing option. | TextureCompressorModule.h | |
| SharpenMipKernelSize | uint32 | The size of the kernel with which mips should be sharpened. | TextureCompressorModule.h | |
| SourceEncodingOverride | uint8 | Advanced source encoding of the image. UE::Color::EEncoding / ETextureSourceEncoding (same thing) | TextureCompressorModule.h | |
| TextureAddressModeX | uint8 | "TextureAddress" enum values : (TA_Wrap default) | TextureCompressorModule.h | |
| TextureAddressModeY | uint8 | TextureCompressorModule.h | ||
| TextureAddressModeZ | uint8 | TextureCompressorModule.h | ||
| TextureFormatName | FName | Format of the compressed texture, used to choose a compression DLL. | TextureCompressorModule.h | |
| Tiler | const ITextureTiler * | If the target format is a tiled format and can leverage reusing the linear encoding, this is not nullptr. | TextureCompressorModule.h | |
| TilerEvenIfNotSharedLinear | const ITextureTiler * | If the target format has a tiler we store it here independent of shared linear. | TextureCompressorModule.h | |
| VirtualAddressingModeX | int32 | TextureAddress, opaque to avoid dependencies on engine headers. | TextureCompressorModule.h | |
| VirtualAddressingModeY | int32 | TextureCompressorModule.h | ||
| VirtualTextureBorderSize | int32 | Size in pixels of border on virtual texture tile | TextureCompressorModule.h | |
| VirtualTextureTileSize | int32 | Size in pixels of virtual texture tile, not including border | TextureCompressorModule.h | |
| WhiteChromaticityCoordinate | FVector2f | White chromaticity coordinate of the source color space. | TextureCompressorModule.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
EGammaSpace GetDestGammaSpace() |
TextureCompressorModule.h | ||
void GetEncodedTextureDescription
(
FEncodedTextureDescription* OutTextureDescription, |
Convert the build settings to an actual texture description containing enough information to describe the texture to hardware APIs. | TextureCompressorModule.h | |
bool GetEncodedTextureDescriptionFromSourceMips
(
FEncodedTextureDescription* OutTextureDescription, |
As per GetEncodedTextureDescription but the mip sizes are pre encoding. Return false for same reasons as GetOutputMipInfo. | TextureCompressorModule.h | |
void GetEncodedTextureDescriptionWithPixelFormat
(
FEncodedTextureDescription* OutTextureDescription, |
TextureCompressorModule.h | ||
EGammaSpace GetGammaSpace() |
TextureCompressorModule.h | ||
bool GetOutputAlphaFromKnownAlphaOrFail
(
bool* bOutOutputHasAlpha |
Returns false if we can't determine instead of passing through a fallback | TextureCompressorModule.h | |
void GetOutputAlphaFromKnownAlphaOrFallback
(
bool* bOutOutputHasAlpha, |
BUnknownSourceAlphaFallback is whether we should treat the source as having alpha, in cases where the source alpha is unknown | TextureCompressorModule.h | |
bool GetOutputMipInfo
(
int32 InMip0SizeX, |
Return the expected size and mip count for a texture processed with these build settings. | TextureCompressorModule.h | |
EGammaSpace GetSourceGammaSpace() |
GammaSpace is TextureCompressorModule is always a Destination gamma we get FImages as input with source gamma space already set on them | TextureCompressorModule.h | |
bool GetTextureExpectsAlphaInPixelFormat
(
bool bTopMipAlphaDetected |
If there is a choice to be had between two formats: one with alpha and one without, this returns which one the texture expects. | TextureCompressorModule.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static uint32 GetOpenColorIOVersion() |
Obtain the OpenColorIO library version, primarily used for DDC invalidation. | TextureCompressorModule.h |