-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
glTF 2.0 'OPAQUE' mode broken #7795
Comments
It looks like the strength of the blending has noticeably changed in the |
Thanks for tracking this down @emackey ! Looks like this is indeed an ImageBitmap issue. One of the major issues with implementing it was that an ImageBitmap cannot be flipped during texture upload. It looks like premultiplied alpha is another setting that would need to be done passed on image decode to get ImageBitmap to work correctly. Here's my local Sandcastle. This expects the Changing Resource.js:1894 to:
Fixes the issue. This potentially impacts imagery as well. |
@lilleyse I can't seem to find any logic when loading a glTF to set premultiplyAlpha. It seems to just always be false? Or to be based just on the given pixel format. |
I think "always false" might be correct for glTF 2.0, particularly if the BLEND side of the test model continues to work. |
When
alphaBlend
mode is set toOPAQUE
, glTF 2.0 specifies that source alpha values will be ignored, not pre-multiplied. There is a test model to check this: AlphaBlendModeTest.This was broken recently. I ran
git bisect
on this, and I'm sorry @OmarShehata, it narrowed this down to one of your image handling commits here: b772d52 (part of #7579).The text was updated successfully, but these errors were encountered: