Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4801
I've tracked it down to this PR: mrdoob/three.js#22428 that affects the GLTF material import process. It seems that now the material format for GLTF imported materials is
RGBFormat
if blend mode is opaque so just enabling the transparency flag doesn't work anymore for imported materials with blend opaque modes, we need to switch toRGBAFormat
first. It doesn't make much sense and there is an open issue about it mrdoob/three.js#22598 so we can expect an update that fixes that soon.In the meantime I've patched that in the Hubs client code explicitly switching to
RGBAFormat
and also switch toNormalBlending
(to make sure it works for all models) while the avatar is transparent. I had to also enableDoubleSided
rendering, this shouldn't be necessary but it was failing for some models.As far as I know this is the only place in the app where we need this patch, I can't think of any other place where we import GLTF models and we want to change their transparency on demand but I might be missing some things.