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

UI block layers: renderOrder does not play well with rest of scene #6

Open
lojjic opened this issue Aug 12, 2019 · 1 comment
Open

Comments

@lojjic
Copy link
Collaborator

lojjic commented Aug 12, 2019

The UIBlockLayer3DFacade impl for backgrounds and borders relies on renderOrder to ensure correct transparency blending in deep UI trees. This doesn't play well with other objects in the scene, however, requiring the author to manually set renderOrder for any other objects that may overlap in front of or behind the UI panes.

Let's try to find a better way to handle background/border layering that allows z-sorting to still work like normal.

@lojjic
Copy link
Collaborator Author

lojjic commented Jan 10, 2020

The approach I want to try is to force all block layer and text nodes within a flex layout to be given origins with x=0 and y=0, differing only by z according to their node depth. Then they will all have internal transforms shifting their vertices to the correct x/y plane positions and subtracting the origin's z offset to put them back in the same visual plane.

This should ensure that Three's painter sort function will render them back-to-front without using renderOrder.

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

No branches or pull requests

1 participant