Terrible translucency performance? (Regarding 2D/sprites)

Hello,

About to start a 2D project and just realizing that performance may be a huge issue.

Game will have many background layers similar to Ori/Hollowknight, etc.

Did some tests by making a bunch of layers of a tree sprite and this is the result:

The trees are currently set to Translucent to get the nice smooth edges, but even setting them to Masked produces similar results as the outer area is still considered translucent.
I love unreal and everything about it, but this just seems a bit crazy for a game that will have many background layers.

Is there any way around this? I swapped to forward rendering but that didn’t help. I don’t want to switch over to Unity, but I fear the translucency problem alone will have serious performance issues, especially on switch.

Thoughts?

Thanks.

You should probably make more accurate cutout meshes out of the textures. You need to aim for minimizing the amount of overdraw.

That would be pretty difficult for organic/outdoor environments (check that gif again and you’ll see why).

I take it there are no other performance tricks for masked/sprites aside from just hand-making custom meshes for each one?

A lot of 2D games optimize performance and memory usage by breaking everything up into small fixed-size tiles, with fully transparent parts left out. Then every sprite consists of some varying arrangement of quads that are merged together into a single mesh as a pre-process.

I don’t understand how it’s difficult. You just make cutouts out of square meshes, no? The particle system in UE 4 does it automatically for example. You’d just cut out parts that are 100% translucent.

I dont see any actual translucent sprites. All i see is sprites with 1bit alpha.
Set them to masked and it already should decrease the overdraw.
Additionally you’ll either need to cutout your sprites, or enable “Mask Materials only in early z pass” in the rendering settings. It does wonders with masked materials.

If you want to stick to translucent sprites, (which I recommend it not doing) you should consider making them unlit/ or only vertex shaded