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

Allow custom near/far clip depth when using toWebGLEntities #109

Open
ianmackenzie opened this issue Nov 1, 2023 · 0 comments
Open

Allow custom near/far clip depth when using toWebGLEntities #109

ianmackenzie opened this issue Nov 1, 2023 · 0 comments
Assignees

Comments

@ianmackenzie
Copy link
Owner

ianmackenzie commented Nov 1, 2023

When using toWebGLEntities to interop with other WebGL code, the automatic computation of near and far clip depth from scene bounds makes it very difficult to ensure the same near/far clip depths are used by both elm-3d-scene and custom WebGL code, meaning that depth sorting between elm-3d-scene and custom WebGL entities may end up being incorrect.

One possible fix would be to do the automatic computation of near/far clip depth in composite instead of in toWebGLEntities, and then pass those values in to toWebGLEntities; this would then mean that any code that called toWebGLEntities could pass its own custom near/far clip depths instead.

@ianmackenzie ianmackenzie self-assigned this Nov 1, 2023
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