Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require rgb renderable webgl1 #3364

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kdashg
Copy link
Contributor

@kdashg kdashg commented Nov 18, 2021

Depends on #3357

Checks all texture formats for filterable and color-renderable.
WebGL 1 and 2.
WebGL 1's RGB8 doesn't look like it's spec-required. Should it be?
Every device and browser I tested supports it, and it's color-renderable
in ES3/webgl2.
<li> <code>RGB</code>, <code>UNSIGNED_BYTE</code>
<li> <code>RGBA</code>, <code>UNSIGNED_SHORT_4_4_4_4</code>
<li> <code>RGBA</code>, <code>UNSIGNED_SHORT_4_4_4_4</code>
<li> <code>RGB</code>, <code>UNSIGNED_SHORT_5_6_5</code>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of recollections:

  • Early ES 2.0 implementations didn't guarantee renderability of these formats.
  • I recall that ES 3.0 revoked renderability of some RGB formats, but looking again at the spec, RGB8 is in fact guaranteed to be color-renderable (ES 3.0.6 p.130).

What are the concerns we should be thinking of when asserting these formats are renderable in both WebGL 1.0 and 2.0?

@greggman
Copy link
Contributor

greggman commented Dec 3, 2021

So I wrote a C++ test and 5_5_5_1 fails on NVidia MacOS

@kenrussell
Copy link
Member

Not surprising. Note though that ANGLE would likely emulate that format on top of RGBA8 as a driver bug workaround, since it's legal for the implementation to provide more bits of precision.

kenrussell added a commit that referenced this pull request Dec 23, 2021
Testing this pull request:
#3364
off the main branch of the KhronosGroup/WebGL repository.

Require all RGB and RGBA textures to be renderable in webgl1.

Authored-by: Kelsey Gilbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants