You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When encoding a 256x256 n.png with astc6x6 format, the size is changed to 258x258 (for 6x6 alignment)
texturec -f n.png -o n.ktx -t astc6x6
And it may cause segment fault because of accessing memory beyond boundary. See #28 . My solution is not suitable, but I need a correct solution. Our tool chain is broken because of it.
For images which are not an integer multiple of the block size, additional texels are added to the edges with maximum X and Y (and Z for 3D textures). These texels may be any color, as they will not be accessed.
Although these are not all powers of two, it is possible to calculate block addresses and pixel addresses within the block, for legal image sizes, without undue complexity.
We may remain width 256 and height 256 in .ktx file header in this case. But now, it's 258.
When encoding a 256x256 n.png with astc6x6 format, the size is changed to 258x258 (for 6x6 alignment)
And it may cause segment fault because of accessing memory beyond boundary. See #28 . My solution is not suitable, but I need a correct solution. Our tool chain is broken because of it.
I think the
texturec
should remain the original size (256x256) for astc6x6 format likeastcenc.exe
does ( https://github.com/ARM-software/astc-encoder/blob/master/Binary/windows-x64/astcenc.exe ) .According to https://www.khronos.org/registry/OpenGL/extensions/OES/OES_texture_compression_astc.txt
We may remain width 256 and height 256 in .ktx file header in this case. But now, it's 258.
@andrewwillmott
The text was updated successfully, but these errors were encountered: