Skip to content

Clarify the information about available texture format and its properties in WebGL 2 context #42269

@Tictim

Description

@Tictim

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D

What specific section or headline is this issue about?

Available texture formats in WebGL 2

What information was incorrect, unhelpful, or incomplete?

In WebGL2 section, a lot of texture formats such as RGBA32F are just listed as non-renderable. This can be misleading, as a number of such formats become renderable when certain extension (EXT_color_buffer_float/EXT_color_buffer_half_float) is enabled. Ideally the chart should denote this information, or at least the page should include links to the aforementioned extensions.

What did you expect to see?

(See above)

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

Additionally the contents of OES_texture_float is also misleading; the page says:

Note: This extension is only available to WebGL1 contexts. In WebGL2, the functionality of this extension is available on the WebGL2 context by default.

This is a blatant misinformation. This note suggests that the functionality of OES_texture_float, i.e. enabling creation of textures with data type of FLOAT, is available on WebGL2 context. This is not the case, and attempting to create such texture in WebGL2 context will result in an error. What you are supposed to do is enabling EXT_color_buffer_float/EXT_color_buffer_half_float, and using an appropriate WebGL2 texture format that accepts FLOAT/HALF_FLOAT as its underlying type. I think this page would also benefit from clearer documentation.

MDN metadata

Page report details

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content:WebAPIWeb API docsneeds triageTriage needed by staff and/or partners. Automatically applied when an issue is opened.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions