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

Re: [Public WebGL] ATC texture size computation

On 12-09-07 12:22 PM, Florian Bösch wrote:
Quoting from the specification:

"The details of these formats is not disclosed, so refer to AMD's
    Compressonator tool in order to encode your textures offline:
This is not acceptable for any standard intended for the web. The format has to be documented and is required to be independently implementable.
Speaking only for Mozilla here (we have had some internal concertation), we are willing to make a pragmatic compromise. The choice is either do this, or leave the mobile gaming market to other platforms which already expose these compressed texture formats (indeed, which expose raw OpenGL ES with extensions). I don't believe that the Web would be better off by abandoning this market.

There was a very real problem though that was indeed a non-starter: the buffer size formula was not even documented. That's what Diego's email fixed. I can live with the rest.


On Fri, Sep 7, 2012 at 6:15 PM, Wilson, Diego <dwilson@quicinc.com> wrote:



The AMD_compressed_ATC_texture format is documented here:




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.





Diego Wilson