Navigation
API > API/Developer > API/Developer/TextureCompressor
References
| Module | TextureCompressor |
| Header | /Engine/Source/Developer/TextureCompressor/Public/TextureCompressorModule.h |
| Include | #include "TextureCompressorModule.h" |
Syntax
struct FTextureBuildSettings
Remarks
Texture build settings.
Variables
| Type | Name | Description | |
|---|---|---|---|
| FVector4f | AlphaCoverageThresholds | Channel values to compare to when preserving alpha coverage. | |
| bool | bAffectedBySharedLinearEncoding | 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. | |
| uint32: 1 | bApplyKernelToTopMip | 1:apply mip sharpening/blurring kernel to top mip as well (at half the kernel size), 0:don't | |
| uint32: 1 | bApplyYCoCgBlockScale | Calculate and apply a scale for YCoCg textures. | |
| FName | BaseTextureFormatName | If we have a child format, this is the base format (i.e. will have the platform prefix removed). | |
| uint32: 1 | bBorderColorBlack | Whether the border color should be black. | |
| uint32: 1 | bChromaKeyTexture | Whether to chroma key the image, replacing any pixels that match ChromaKeyColor with transparent black | |
| uint32: 1 | bComputeBokehAlpha | Whether bokeh alpha values should be computed for the texture. | |
| uint32: 1 | bCPUAccessible | If set, the texture will generate a tiny placeholder hw texture and save off a copy of the top mip for CPU access. | |
| uint32: 1 | bCubemap | Whether the texture being built is a cubemap. | |
| bool | bDoScaleMipsForAlphaCoverage | Enable preserving alpha coverage. | |
| uint32: 1 | bDownsampleWithAverage | Whether each mip should use the downsampled-with-average result instead of the sharpened result. | |
| uint32: 1 | bFlipGreenChannel | Whether the green channel should be flipped. Typically only done on normal maps. | |
| uint32: 1 | bForceAlphaChannel | Whether we should not discard the alpha channel when it contains 1 for the entire texture. | |
| uint32: 1 | bForceNoAlphaChannel | Whether we should discard the alpha channel even if it contains non-zero values in the pixel data. | |
| bool | bHasColorSpaceDefinition | Whether the texture has a defined source color space. | |
| bool | bHasTransparentAlpha | Only valid if bKnowAlphaTransparency is true. | |
| bool | bHDRSource | Whether the texture being built contains HDR source data | |
| bool | bKnowAlphaTransparency | Whether bHasTransparentAlpha is valid. | |
| uint32: 1 | bLongLatSource | Whether the texture being built from long/lat source to cubemap. | |
| FVector2f | BlueChromaticityCoordinate | Blue chromaticity coordinate of the source color space. | |
| bool | bNormalizeNormals | Normalize normals after mip gen, before compression | |
| bool | bOodlePreserveExtremes | 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. | |
| bool | bOodleUsesRDO | ||
| bool | bPadWithBorderColor | If set to true, texture padding will be performed using colors of the border pixels in order to improve quality of the generated mipmaps. | |
| uint32: 1 | bPreserveBorder | Whether the border of the image should be maintained during mipmap generation. | |
| uint32: 1 | bRenormalizeTopMip | 1: renormalizes the top mip (only useful for normal maps, prevents artists errors and adds quality) 0:don't | |
| uint32: 1 | bReplicateAlpha | Whether the contents of the alpha channel should be replicated to all channels. | |
| uint32: 1 | bReplicateRed | Whether the contents of the red channel should be replicated to all channels. | |
| uint32: 1 | bSharpenWithoutColorShift | Whether sharpening should prevent color shifts. | |
| uint32: 1 | bSRGB | Whether the texture contains color data in the sRGB colorspace. | |
| uint32: 1 | bStreamable_Unused | Can the texture be streamed. | |
| uint32: 1 | bTextureArray | Whether the texture being built is a texture array. | |
| uint32: 1 | bUseLegacyGamma | Whether the texture should use the legacy gamma space for converting to sRGB | |
| bool | bUseNewMipFilter | Use newer & faster mip generation filter | |
| uint32: 1 | bVirtualStreamable | Is the texture streamed using the VT system | |
| uint32: 1 | bVolume | Whether the texture being built is a volume. | |
| FColor | ChromaKeyColor | The color that will be replaced with transparent black if chroma keying is enabled | |
| float | ChromaKeyThreshold | 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) | |
| uint8 | ChromaticAdaptationMethod | Chromatic adaption method applied if the source white point differs from the working color space white point. | |
| FColorAdjustmentParameters | ColorAdjustment | Color adjustment parameters. | |
| float | CompositePower | Default 1, high values result in a stronger effect | |
| uint8 | CompositeTextureMode | E.g. CTM_RoughnessFromNormalAlpha | |
| int32 | CompressionQuality | 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. | |
| uint32 | DiffuseConvolveMipLevel | For angular filtered cubemaps, the mip level which contains convolution with the diffuse cosine lobe. | |
| float | Downscale | Values > 1.0 will scale down source texture. Ignored for textures with mips | |
| uint8 | DownscaleOptions | ETextureDownscaleOptions | |
| FCbObjectView | FormatConfigOverride | Format specific config object view or null if no format specific config is applied as part of this build. | |
| FVector2f | GreenChromaticityCoordinate | Green chromaticity coordinate of the source color space. | |
| uint32 | LODBias | The source texture's final LOD bias (i.e. includes LODGroup based biases). | |
| uint32 | LODBiasWithCinematicMips | The source texture's final LOD bias (i.e. includes LODGroup based biases). | |
| int32 | LossyCompressionAmount | ETextureLossyCompressionAmount - oodle resolves this to RDO lambda during fast/final resolution. | |
| uint32 | MaxTextureResolution | For maximum resolution. | |
| uint8 | MipGenSettings | Mipmap generation settings. | |
| float | MipSharpening | The desired amount of mip sharpening. | |
| uint8 | OodleEncodeEffort | ||
| uint8 | OodleRDO | Encoding settings resolved from fast/final. | |
| FName | OodleTextureSdkVersion | Which version of Oodle Texture to encode with | |
| uint8 | OodleUniversalTiling | ||
| FColor | PaddingColor | The color used to pad the texture out if it is resized due to PowerOfTwoMode | |
| uint8 | PowerOfTwoMode | How to stretch or pad the texture to a power of 2 size (if necessary); ETexturePowerOfTwoSetting::Type, opaque to avoid dependencies on Engine headers. | |
| FVector2f | RedChromaticityCoordinate | Red chromaticity coordinate of the source color space. | |
| uint8 | RepresentsEncodeSpeedNoSend | Which encode speed this build settings represents. | |
| int32 | ResizeDuringBuildX | Width of the resized texture when using "Resize To Specific Resolution" padding and resizing option. | |
| int32 | ResizeDuringBuildY | Width of the resized texture when using "Resize To Specific Resolution" padding and resizing option. | |
| uint32 | SharpenMipKernelSize | The size of the kernel with which mips should be sharpened. | |
| uint8 | SourceEncodingOverride | Advanced source encoding of the image. | |
| uint8 | TextureAddressModeX | "TextureAddress" enum values : (TA_Wrap default) | |
| uint8 | TextureAddressModeY | ||
| uint8 | TextureAddressModeZ | ||
| FName | TextureFormatName | Format of the compressed texture, used to choose a compression DLL. | |
| const ITextureTiler * | Tiler | If the target format is a tiled format and can leverage reusing the linear encoding, this is not nullptr. | |
| int32 | VirtualAddressingModeX | TextureAddress, opaque to avoid dependencies on engine headers. | |
| int32 | VirtualAddressingModeY | ||
| int32 | VirtualTextureBorderSize | Size in pixels of border on virtual texture tile | |
| int32 | VirtualTextureTileSize | Size in pixels of virtual texture tile, not including border | |
| FVector2f | WhiteChromaticityCoordinate | White chromaticity coordinate of the source color space. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
| Default settings. |
Functions
| Type | Name | Description | |
|---|---|---|---|
| EGammaSpace | |||
| void | GetEncodedTextureDescription
(
FEncodedTextureDescription* OutTextureDescription, |
Convert the build settings to an actual texture description containing enough information to describe the texture to hardware APIs. | |
| void | GetEncodedTextureDescriptionWithPixelFormat
(
FEncodedTextureDescription* OutTextureDescription, |
||
| EGammaSpace | |||
| uint32 | Obtain the OpenColorIO library version, primarily used for DDC invalidation. | ||
| EGammaSpace | GammaSpace is TextureCompressorModule is always a Destination gamma we get FImages as input with source gamma space already set on them | ||
| bool | GetTextureExpectsAlphaInPixelFormat
(
bool bInSourceMipsAlphaDetected |
If there is a choice to be had between two formats: one with alpha and one without, this returns which one the texture expects. |
Constants
| Name | Description |
|---|---|
| MaxTextureResolutionDefault |