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

Re: [Public WebGL] ATC texture size computation



Many thanks!

I confirm that I'm very interested in exposing ATC as a WebGL extension, and the information below was the only missing piece. I will write a spec proposal very soon.

The interest in ATC comes from the fact that together with PVRTC it's one of the two widespread mobile generalist compressed texture formats, and while PVRTC already has a WebGL extension spec proposal, it alone isn't enough to cover most of the existing devices: at least Qualcomm GPUs do not support PVRTC. Thus in order for WebGL games to take off on mobile devices we need to expose both PVRTC and ATC, the latter being made possible by Diego's email.

Thanks,
Benoit

On 12-09-07 12:15 PM, Wilson, Diego wrote:

Hello,

 

The AMD_compressed_ATC_texture format is documented here:

 

http://www.khronos.org/registry/gles/extensions/AMD/AMD_compressed_ATC_texture.txt

 

It was brought to my attention that this compressed texture format is a good candidate for exposing as a WebGL extension. And that it is only missing one piece of information: the buffer size computation. Below is that information that has been verified both with experts in the format and empirically.

 

Compressed texture images stored using the ATC compressed image formats are represented as a collection of 4x4 texel blocks.

 

The size in bytes of a compressed ATC_RGB_AMD image is:

 

   ((width_in_texels+3)/4) * ((height_in_texels+3)/4) * 8

 

The size in bytes of a compressed ATC_RGBA_EXPLICIT_ALPHA_AMD or ATC_RGBA_INTERPOLATED_ALPHA_AMD image is:

 

   ((width_in_texels+3)/4) * ((height_in_texels+3)/4) * 16

 

I’m currently working to include this in public documentation as well.

 

Regards,

 

_________________

Diego Wilson