Hello, I have a problem.When an object rendering with Edge and the other tranparent object is in front of it,the edge of the object rend not affected by transparency. *The edge color is not mixed with the translucent color of the front.
I think it’s because the edge rendering is done at a later stage and does not account for the alpha test or blend. Let’s ask the expert, see if there’s a work-around for this? cc @Evgeni_Popov
As @mawa said, edge rendering is the very last step of the rendering process, even after the transparent meshes.
If you want some meshes to appear in front of transparent meshes, you will either have to:
- enable depth writing (
mat.forceDepthWrite = true
) for the transparent objects, but you won’t be able to see the edges behind the transparent objects => https://playground.babylonjs.com/#TYAHX#280 - render your transparent objects with a higher
renderingGroupId
, so that they are rendered after the edges => https://playground.babylonjs.com/#TYAHX#279
2 Likes
Thank you very much ! The solution is very useful.