So I've made an entity with depthFunc and depthBias material properties to make it render through blocks. However, the entity doesn't get rendered if it's slightly far away from player towards the (+x,-z) axis. On other axes it gets rendered through walls as expected.
I've also noticed that the problem goes away when player switches to spectator mode.
Here's the material code-
"playeroutline:entity_alphatest": {
"depthFunc": "Always",
"depthBias": 1000000000
}
I'm not that knowledgeable when it comes down to materials, so any suggestions would be welcome and helpful! 🙏