Triangle Sorter

$9
Publisher Wojt Sterna
File size 386.03kB
Number of files 10
Latest version 1
Latest release date 2014-07-08 07:02:18
First release date 2014-07-08 07:02:18
Supported Unity versions 2018.4.2 or higher
Very often, in particular for mobile games, objects like foliage are rendered with alpha blending. This produces good looking semi-transparent objects and their silhouettes but brings in one crucial problem – sorting of triangles. Some triangles that are further from the camera pop up in front of those that are closer which is incorrect. This problem is partially solved by Unity’s sorting mechanism on a per-object basis what does not solve at all the problem with triangles within a single object (like a tree which usually is placed in the scene as a single mesh).

Here is where Triangle Sorter comes handy. It’s a tool that, during a mesh preprocessing step (upon import), sorts triangles of that mesh along a specified axis. This way, for instance, triangles can be sorted top-down for a tree making the top-most leaves be rendered after the bottom-most ones have been rendered. This ensures correct triangles sorting order on a per-triangle basis when the camera is looking down the tree.

Top Publisher Assets