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

Fix bubble transparency issues #4808

Merged
merged 3 commits into from
Nov 5, 2021
Merged

Fix bubble transparency issues #4808

merged 3 commits into from
Nov 5, 2021

Conversation

keianhzo
Copy link
Contributor

@keianhzo keianhzo commented Nov 4, 2021

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 to RGBAFormat 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 to NormalBlending (to make sure it works for all models) while the avatar is transparent. I had to also enable DoubleSided 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.

@keianhzo keianhzo requested a review from netpro2k November 4, 2021 14:58
Copy link
Contributor

@netpro2k netpro2k left a comment

Choose a reason for hiding this comment

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

Good digging, makes sense... Will definitely continue to monitor that ThreeJS discussion to see where it lands. Don't really have super strong opinions on it, but the current state feels weird for sure.

@keianhzo keianhzo merged commit e2606df into master Nov 5, 2021
@keianhzo keianhzo deleted the personal-bubble-fix branch November 5, 2021 11:01
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.

Personal space bubble has stopped working
2 participants