-
Notifications
You must be signed in to change notification settings - Fork 622
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: renderOrder of <Svg> meshes #1938
base: master
Are you sure you want to change the base?
Conversation
With this change the SVG with complex paths is showing correctly now.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
After testing on more use cases, this seems to not be a good solution. Using renderOrder like that makes wierd behaviour of SVG showing on top of everything in the camera planes. Also not sure how to fix this. |
This seems to show correctly and not overlap on other svg meshes
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. |
<shapeGeometry args={[shape]} /> | ||
<meshBasicMaterial | ||
color={path.userData!.style.fill} | ||
opacity={path.userData!.style.fillOpacity} | ||
transparent={true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove transparent
? It does affect grouping during sorting, but is that any relevant here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my experiments this was the only way i found to avoid the render order issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll investigate merging the geometries here. Definitely an issue with sorting, not z-fighting exactly.
Why
component was showing a weird z-fighting on camera orbit
What
Fixed the render order of the meshes.
Discussion here: https://discord.com/channels/740090768164651008/741751532592038022/1227336884255064195