MeshEffect performance issues in Unity 5.2

The change introduced in Unity 5.2 where BaseVertexEffect was changed to BaseMeshEffect causes some rather significant side-effects. With the previous BaseVertexEffect, the vertex list always only contained vertices that were not added by previous BaseVertexEffects. This allowed the effects to be stacked so that for example two or more Outline effects (or any other effect modifying vertices in same manner) could be used for single object.

However, after the changes introduced, the BaseMeshEffect always gets all vertices, even those modified by earlier effects. This causes a big performance hit on objects that use more than one effect, because for example if you have a text component with outline and shadow effect, the shadow effect also considers the outline vertices when creating the shadow and so the number of vertices used by the shadow is now doubled compared to earlier versions of Unity.

I cannot really understand why the BaseVertexEffect was completely removed, instead of adding the BaseMeshEffect as additional functionality or by adding similar functionality into BaseMeshEffect? It is currently impossible to stack BaseMeshEffects in any reasonable manner.

Can you report it using the bug tool and provide an example which we can compare.

The official bug report, with steps to reproduce can be found at:
https://fogbugz.unity3d.com/default.asp?729550_vos6t3qrlinunkmk

1 Like