class new in Git master
EtcDecImageConverterETC/EAC-compressed image decoding using etcdec.
Decodes ETC1, ETC2 and EAC blocks to uncompressed RGBA using the etcdec library. See also the BcDecImageConverter plugin for decoding BCn images.
Usage
This plugin depends on the Trade library and is built if MAGNUM_WITH_ETCDECIMAGECONVERTER
is enabled when building Magnum Plugins. To use as a dynamic plugin, load "EtcDecImageConverter"
via Corrade::
Additionally, if you're using Magnum as a CMake subproject, bundle the magnum-plugins repository and do the following:
set(MAGNUM_WITH_ETCDECIMAGECONVERTER ON CACHE BOOL "" FORCE) add_subdirectory(magnum-plugins EXCLUDE_FROM_ALL) # So the dynamically loaded plugin gets built implicitly add_dependencies(your-app MagnumPlugins::EtcDecImageConverter)
To use as a static plugin or as a dependency of another plugin with CMake, put FindMagnumPlugins.cmake into your modules/
directory, request the EtcDecImageConverter
component of the MagnumPlugins
package and link to the MagnumPlugins::EtcDecImageConverter
target:
find_package(MagnumPlugins REQUIRED EtcDecImageConverter) # ... target_link_libraries(your-app PRIVATE MagnumPlugins::EtcDecImageConverter)
See Downloading and building plugins, Plugin usage with CMake and Loading and using plugins for more information.
Behavior and limitations
The following formats are supported:
- CompressedPixelFormat::
EacR11Unorm / EacR11Snorm is decoded to PixelFormat:: R16Unorm / R16Snorm by default, and to PixelFormat:: R32F if the eacToFloat
configuration option is enabled - CompressedPixelFormat::
EacRG11Unorm / EacRG11Snorm is decoded to PixelFormat:: RG16Unorm / RG16Snorm by default, and to PixelFormat:: RG32F if the eacToFloat
configuration option is enabled - CompressedPixelFormat::
Etc2RGB8Unorm, Etc2RGB8A1Unorm and Etc2RGBA8Unorm is decoded to PixelFormat:: RGBA8Unorm - CompressedPixelFormat::
Etc2RGB8Srgb, Etc2RGB8A1Srgb and Etc2RGBA8Srgb is decoded to PixelFormat:: RGBA8Srgb
The output image always has data for whole 4x4 blocks, if the actual size isn't whole blocks, PixelStorage::
Only 2D image conversion is supported at the moment. Image flags, if any, are passed through unchanged.
Plugin-specific configuration
It's possible to tune various conversion options through configuration(). See below for all options and their default values:
[configuration] # Decode EAC R11 and RG11 to 32-bit floats. By default decodes to 16-bit # integers as that's the expected output format for this encoding. eacToFloat=false
See Editing plugin-specific configuration for more information and an example showing how to edit the configuration values.
Base classes
- class AbstractImageConverter
- Base for image converter plugins.
Constructors, destructors, conversion operators
-
EtcDecImageConverter(PluginManager::
AbstractManager& manager, const Containers:: StringView& plugin) explicit - Plugin manager constructor.