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

[Public WebGL] extension proposal: WEBGL_compressed_texture_pvrtc



Hi,

This is about a new extension proposal, WEBGL_compressed_texture_pvrtc.

The pull request is there:
https://github.com/KhronosGroup/WebGL/pull/11

I've attached the generated HTML. Unfortunately Github doesn't appear to allow viewing HTML files directly off the repository.

The need for mobile compressed texture formats is real. This is the #1 thing we're being asked for my game developers regarding Web games on mobile devices.

Also, while I understand that ETC2 is coming, we need something that will help WebGL take off on today's mobile devices.

This extension stays close to the corresponding OpenGL ES extension,
http://www.khronos.org/registry/gles/extensions/IMG/IMG_texture_compression_pvrtc.txt

In particular, the power-of-two and texSubImage-must-replace-the-whole-image requirements come from there.

You might notice that the formulas for butter byte length are looking different: for the 2bpp formats, the OpenGL ES extension has

  ( max(width, 16) * max(height, 8) * 2 + 7) / 8

whereas the WebGL extension proposal has

  max(width, 16) * max(height, 8) / 4 

The two formulas are in fact equivalent, given that width and height must be powers of two. The latter formula is just a simplification taking advantage of this fact.

Please, consider it for promotion to draft status so that implementation can start.
Benoit
Title: WebGL WEBGL_compressed_texture_pvrtc Extension Proposed Specification
WebGL
Khronos

WebGL WEBGL_compressed_texture_pvrtc Extension Proposed Specification

DO NOT IMPLEMENT!!!

Name

WEBGL_compressed_texture_pvrtc

Contact

WebGL working group (public_webgl 'at' khronos.org)

Contributors

Members of the WebGL working group

Version

Last modified date: August 07, 2012
Revision: 1

Number

WebGL extension #NN

Dependencies

Written against the WebGL API 1.0.1 specification.

Overview

This extension exposes the compressed texture formats defined in the IMG_texture_compression_pvrtc OpenGL extension to WebGL.

When this extension is enabled:

IDL

interface WEBGL_compressed_texture_pvrtc {
    /* Compressed Texture Formats */
    const GLenum COMPRESSED_RGB_PVRTC_4BPPV1_IMG      = 0x8C00;
    const GLenum COMPRESSED_RGB_PVRTC_2BPPV1_IMG      = 0x8C01;
    const GLenum COMPRESSED_RGBA_PVRTC_4BPPV1_IMG     = 0x8C02;
    const GLenum COMPRESSED_RGBA_PVRTC_2BPPV1_IMG     = 0x8C03;
};
  

Revision History

Revision 1, 2012/08/07