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.
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.
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.
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
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
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