Compressed texture power of 2 requirement

Hi everyone, do compressed texture require a power of 2 size when not using mipmaps in WebGL 1? What about in WebGL 2?

I am currently experimenting with compressed textures in three.js, and ran into this warning:

I know that for regular textures, there are requirements for textures to need a size that is a power of 2 unless min filter is Linear/Nearest, but I can’t find any information about if there is a requirement in webgl for the compressed texture to need a power of 2 size.

Thanks for the help

Just to check – are you sure you don’t need mipmaps? Unless the texture is a 2D overlay aligned with the camera, you often want them… I guess I’m not too sure of the size requirements without mipmaps, but there may be other requirements based on the compressed texture block size, e.g. that the dimensions should be a multiple of four.

Currently for the application I am working on we don’t want mipmaps due to the size of the images that are loaded (and the power of 2 requirement). The images I am loading are of arbitrary size and can be very large which is why I am experimenting with basis textures. I just did not expect a power of 2 requirement for them (assuming there is and I am not doing something wrong). If WebGL 2 supports non power of 2 compressed textures, then maybe I need to finally transition (been waiting on Apple)

Perhaps helpful:

If you don’t need mipmaps, my reading would be that you only need to worry about the multiple-of-four size requirement. With mipmaps, the situation is better in WebGL 2. My own projects generally require mipmaps, and so stick to power-of-two dimensions until WebGL 2 is more widely supported (which appears to be happening more quickly now).

Also, from 3D-Formats-Guidelines/ at abb088ef6f2a015f830bfd942bd42930a543c6ca · KhronosGroup/3D-Formats-Guidelines · GitHub, …

Even when targeting newer platforms that support non-power-of-two texture dimensions, the texture dimensions still must be multiples of 4 to work with KHR_texture_basisu.

The reference to KHR_texture_basisu may be considered equivalent to KTX2 or Basis formats.