[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Why the width, height block-alignment restriction for DXT5 textures?



Hi Mark,

It's been years since these were specified and I personally don't remember all of the portability issues that were encountered. Perhaps there was a hard requirement of block size alignment in the D3D API which was therefore enforced for compressedTexImage2D in WebGL. compressedTexSubImage2D requires block alignment in native OpenGL per https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_texture_compression_s3tc.txt .

-Ken



On Wed, May 13, 2020 at 4:28 PM Mark Callow (khronos@callow.im) <public_webgl@khronos.org> wrote:
I’m seeing the following warning

    WebGL warning: compressedTexImage: COMPRESSED_RGBA_S3TC_DXT5_EXT requires that width and height are block-aligned, or, if level>0, equal to 0, 1, or 2.

While it is true the height of the texture I am using is not a multiple of 4, it works fine with native OpenGL, Vulkan and Metal - all on Intel hardware. Why is this limitation in WebGL? Is this caused by a D3D limitation?

Regards

    -Mark



--
I support flexible work schedules, and I’m sending this email now because it is within the hours I’m working today.  Please do not feel obliged to reply straight away - I understand that you will reply during the hours you work, which may not match mine.