Translucent polygons are supposed to be alpha sorted, i.e., rendered from back to front. The shader renderer does not do per-poly alpha sorting, but rather sorts each
mesh relative to one another, based on the farthest point on its bounding sphere. The mesh may be a world mesh (internally called "cube") or a model / instance.
Meshes that are completely enclosed within the bounding sphere of another are always drawn in front. For example, if your glass window were to be a huge quad, its bounding sphere will engulf small meshes behind it (like plants) and this results in incorrect sorting. The below sketch can help visualize your problem:
The solution is to chop up your glass window into smaller meshes such that its bounding sphere is reasonably small. Here's a fixed sketch:
Special effects such as sparks and skidmarks are an exception - these are
never sorted and will always appear in front of other translucent meshes. This is done for performance reasons, but I can consider enabling it as an option. In fact, it's something I already experimented with. I have some screenshots from precisely an year ago (hey, even the time is close...).
Below is the comparison I did. The numbers say we're processing 8 different objects and we were able to aggregate them into 4 groups before drawing. All the skidmarks together form a single object, and they can't be sorted.
Below is the same scene with sorting enabled. We now have to process each skidmark section individually in order to sort them, resulting in 746 objects in all. Rendering each of them individually would drastically impact performance. Fortunately, we find that we can actually aggregate everything into 5 groups - just one more than before. The skidmarks behind the pickup form one group, and those in front of the pickup form another. So the performance impact in this scenario is minimal.
