Skip to content

RGB(A)8 renderbuffers on WebGL 1.0 #3475

Description

@lexaknyazev

This looks like a quirk existing due to historical reasons but may still be worth clarifying.

  1. WebGL 1.0, Section 2.2 guarantees that the default renderbuffer has at least 8 bits per component.
  2. OpenGL ES 2.0, Section 4.4.3 allows only RGBA4/RGB5_A1/RGB565 internal formats for renderbuffer color attachments. 8-bit renderbuffers are provided only by OES_rgb8_rgba8.
  3. WebGL EXT_sRGB extension is based on GL_EXT_sRGB that requires OES_rgb8_rgba8.

Given 1-3, it seems quite counter-intuitive that WebGL 1.0 renderbuffers can have SRGB8_ALPHA8_EXT or floating-point formats but not RGBA8.

At the very least, we should add a note to EXT_sRGB clarifying the ignored dependency. Optionally, WebGL 1.0 renderbuffers may be allowed to have RGB8/ RGBA8 internal formats (aliased as their unsized counterparts, similar to DEPTH_STENCIL) as if OES_rgb8_rgba8 is always enabled.

Maybe related: #3364.

/cc @kenrussell @kdashg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions