Description: A microservice running that uses
KTX command line tools to create/encode/compress
Compressed GPU textures.
Understanding Compressed GPU Textures:
GPU-compressed textures are image data formats that use compression algorithms to reduce the size of textures stored in memory.
These textures are specifically optimized to be process in parallel on GPUs, enabling faster loading and rendering times.
Understanding KTX2 Container format:
" This file does not in fact contains different formats of the same asset but a
universal representation of the data
that can be transcoded to any format supported by the target device! We are speaking of
transcoding instead of
expanding because the data are not expanded per se, they are transformed to another compressed format, one supported by your target device (the universal representation being itself compressed)."
-babylonjs.com
Current Implementation:
The final implementation of this feature will be decided as the first version of the app is released. However, I have created a shallow implementation for testing purposes. Currently, when a user uploads an image to S3 it triggers an event .This event deploys an ecs task to create a Compressed GPU Texture from the image. On completion the ecs instance uses the AWS SDK to upload the texture back to a separate bucket.
Benefits of Compressed GPU Textures:
-
Real-time decompression of textures directly on the GPU.
-
Uses less of the available memory bandwidth
-
Increases the efficiency of the texture cache
-
No need to decode images on the CPU.