ReactUnity/core

Performance issues with background-image property

Closed this issue · 3 comments

Currently the background-image property has some performance issues that drop fps significantly when used abundantly.

There are two main reasons:

  • NotifyStencilStateChanged is called needlessly. Discord link
  • Background image draw calls are not batched because of non-sharing materials. Discord link

Additionally, performance can be improved for box-shadow with this technique

Looks like all of these issues will be solved once I implement mesh-based background/border/shadow instead of shader-based.

Implemented all border, border-image, background and similar features using meshes now, instead of shaders. This will improve performance a lot, as well as allow anti-aliasing.