Performance issues with background-image property
Closed this issue · 3 comments
KurtGokhan commented
Currently the background-image property has some performance issues that drop fps significantly when used abundantly.
There are two main reasons:
NotifyStencilStateChangedis 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
KurtGokhan commented
Looks like all of these issues will be solved once I implement mesh-based background/border/shadow instead of shader-based.
KurtGokhan commented
This is being worked on the branch https://github.com/ReactUnity/core/tree/mesh-based-bg-shapes
KurtGokhan commented
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.