EXT_texture_compression_bptc WebGL working group (public_webgl 'at' khronos.org) Olli Etuaho, NVIDIA Members of the WebGL working group 38

This extension exposes the compressed texture format defined in the EXT_texture_compression_bptc OpenGL ES extension to WebGL. Consult that extension specification for behavioral definitions, including error behaviors.

Sampling from textures in the COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT format performs a color space conversion as specified for SRGB textures in the EXT_sRGB OpenGL ES extension.

Compression format COMPRESSED_RGBA_BPTC_UNORM_EXT, COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, and COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT may be passed to the compressedTexImage2D and compressedTexSubImage2D entry points. Calling getParameter with the argument COMPRESSED_TEXTURE_FORMATS will include the formats from this specification.

If the internalformat is one of the BPTC internal formats from this specification, the byteLength of the ArrayBufferView, pixels, passed to compressedTexImage2D or compressedTexSubImage2D must be equal to the following number of bytes:

ceil(width / 4) * ceil(height / 4) * 16

If it is not, an INVALID_VALUE error is generated.

[NoInterfaceObject] interface EXT_texture_compression_bptc { const GLenum COMPRESSED_RGBA_BPTC_UNORM_EXT = 0x8E8C; const GLenum COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT = 0x8E8D; const GLenum COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT = 0x8E8E; const GLenum COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT = 0x8E8F; }; Accepted by the internalformat parameter: COMPRESSED_RGBA_BPTC_UNORM_EXT, COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT
Accepted by the internalformat parameter: COMPRESSED_RGBA_BPTC_UNORM_EXT, COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT, COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT, COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT
The error INVALID_VALUE is generated by compressedTexImage2D and compressedTexSubImage2D if the internalformat parameter is one of the BPTC internal formats from this extension and the byteLength of the ArrayBufferView is not:
ceil(width / 4) * ceil(height / 4) * 16
Initial revision. Moved to draft status. Retarget against EXT_texture_compression_bptc instead of ARB_texture_compression_bptc Rename to EXT_texture_compression_bptc from WEBGL_compressed_texture_bptc