You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've noticed some issues with alpha blended meshes, where the sorting order chosen by Babylon is wrong (and inconsistent as you move the camera)
It seems very likely its due to Babylon sorting meshes according to the center of the bounding sphere (at least from what I can tell):
Avoid having heavily-stretched alpha blended meshes (i.e. large planes); since the center of its bounding sphere is used for depth sorting, doing this may result in a mesh being sorted as far away from the camera but actually closer to many other meshes.
I imagine this could be fixed by raycasting towards the mesh from the camera and manually setting alpha indexes dependent on if you hit a transparent voxel before reaching the mesh
I'm wondering if you've thought about this at all or have a simpler solution?
The text was updated successfully, but these errors were encountered:
Hi,
I've noticed some issues with alpha blended meshes, where the sorting order chosen by Babylon is wrong (and inconsistent as you move the camera)
It seems very likely its due to Babylon sorting meshes according to the center of the bounding sphere (at least from what I can tell):
Avoid having heavily-stretched alpha blended meshes (i.e. large planes); since the center of its bounding sphere is used for depth sorting, doing this may result in a mesh being sorted as far away from the camera but actually closer to many other meshes.
https://doc.babylonjs.com/divingDeeper/materials/advanced/transparent_rendering#rendering-order
It can be seen in test with the shadow:
(and when I zoom out)
I imagine this could be fixed by raycasting towards the mesh from the camera and manually setting alpha indexes dependent on if you hit a transparent voxel before reaching the mesh
I'm wondering if you've thought about this at all or have a simpler solution?
The text was updated successfully, but these errors were encountered: