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
set the blend mode on a material on a mesh rendered in bevy to blend
What went wrong
as i understand from the bevy docs, blend should only differ from opaque in that it allows mixing with fragments behind according to alpha value. if alpha value is 1 like here, then the behaviour should be exactly the same
in these tests, there doesn't seem to be any depth testing going on - please say if i misunderstand anything :)
the mesh i used in the video (from the celeste64 repo) but it's the same with all other meshes i've tried including skeletal meshes
biosphere.2024-06-13.22-35-18.mp4
same with geometry produced by bevy_trenchbroom
biosphere.2024-06-13.22-47-51.mp4
The text was updated successfully, but these errors were encountered:
Alpha blended meshes only get sorted based on the distance between the camera and the center of the mesh. So it doesn't sort every fragment in the material. this means that sometimes, a mesh is in front of another because the center is closer to the camera even if a lot of the mesh should be hidden. There are various solutions to this, one of them is order independent transparency which sorts each fragments. I'm working on it, but it's not currently supported. Generally you should avoid alpha blending if you don't need it, especially when the alpha is 1. And if you need an alpha of 1, maybe consider working with multiple smaller meshes
Thanks for the response! I originally noticed this when making a material for the player character which became more transparent when the camera got too close so most of the time alpha is 1. I'll leave that as is for now then :)
bevy 0.13.2 on windows 10
What you did
set the blend mode on a material on a mesh rendered in bevy to blend
What went wrong
as i understand from the bevy docs, blend should only differ from opaque in that it allows mixing with fragments behind according to alpha value. if alpha value is 1 like here, then the behaviour should be exactly the same
in these tests, there doesn't seem to be any depth testing going on - please say if i misunderstand anything :)
the mesh i used in the video (from the celeste64 repo) but it's the same with all other meshes i've tried including skeletal meshes
biosphere.2024-06-13.22-35-18.mp4
same with geometry produced by bevy_trenchbroom
biosphere.2024-06-13.22-47-51.mp4
The text was updated successfully, but these errors were encountered: