Closed ddenisyuk closed 2 months ago
hey @ddenisyuk just back from holiday so will review this soon!
hey guys do you have an example of loading a spritesheet compressed with astc (either inside ktx container or not) in pixi 8? i recently was trying to implement it, and encounter some issues:
[.WebGL-0x138005ba100] GL_INVALID_VALUE: Compressed texture dimensions must exactly match the dimensions of the data passed in.
I am using pixi@8.3.0, and TexturePacker. Maybe these issues is not relevant to AssetPack? also it it possible to specify either 4x4 or 12x12 astc pixel format, in implementation from this PR?) default 4x4 is mostly useless because textures takes more space than PNG, and ASTC usually used for mobile where game size is really important
Hey @norflin321, it's hard to help you without examples, but you can check the test file to see how to load textures: https://github.com/pixijs/pixijs/blob/dev/tests/compressed/CompressedTextures.test.ts. Pixi, by default, expects a specific naming format for compressed textures: {name}.{format}.{extension/container}, like my-texture.astc.ktx.
Regarding item # 2, it could be related to a misconfiguration of 'Premultiplied Alpha' and/or 'Colorspace'.
also it it possible to specify either 4x4 or 12x12 astc pixel format, in implementation from this PR?) default 4x4 is mostly useless because textures takes more space than PNG, and ASTC usually used for mobile where game size is really important
yes, you can define preferable blocksize:
compress({
png: true,
webp: true,
astc: {
blocksize: "12x12"
},
}),
hey @ddenisyuk just back from holiday so will review this soon!
hey @Zyie, any updates?
The image compression extension has been enhanced with the ability to generate
ASTC
,BC7
, and supercompressedBasis
textures.