Open onelsonic opened 3 years ago
It's generally just called compressed texture formats and there's some support for that already, however not for html5. It's activated using something like project.addAssets('assets/**', { quality: 0.5 }); in your khafile. Feel free to send a pull-request to make it work in html5. Also please note that the astc-encoder is currently only compiled for Windows (see Kha/Kinc/Tools/kraffiti/Datatypes).
Fixing GPU memory bottleneck with GPU optimised Textures.
the HTML5 backend workflow picks up textures as PNG, JPG or HDR.
However these textures are not optimised for GPUs. Having optimised GPU textures can really improve real-time performances and GPU available memory. It would be ideal to have ASTC format added. https://www.khronos.org/blog/create-astc-textures-faster-with-the-new-astcenc-2.0-open-source-compression-tool
ASTC Textures can be loaded as javascript Blob objects and generated using the appropriate tool:
ASTC: https://github.com/ARM-software/astc-encoder
Example : how to load AST textures in HTML5/WebGL: