// CASE STUDY

Every healthbar in one draw call: UI optimisation on Predecessor.

Every healthbar in Predecessor now draws in a single draw call, and the minimap, which cost 0.43 ms on the GPU, no longer shows up in profiling. Predecessor is a third-person MOBA from Omeda Studios, built in Unreal Engine. Jad Deeb, now Jin&Jaw's technical director, did the work as principal technical artist at Omeda Studios.

Why the healthbars were expensive

Every hero and minion carries a healthbar, so a team fight can put dozens of them on screen at once. Drawn one by one, their cost climbed with every unit in view.

Instanced mesh widgets

The fix uses SMeshWidget, the Slate widget that draws instanced meshes in the UI. Jad implemented instanced 3D widgets in C++ with a material written in HLSL, and every healthbar on screen now draws in a single draw call.

A mesh widget passes only four or five floats per instance to its material. To fit what a healthbar needs into that space, the data is packed with bit shifting in C++ and unpacked again in the material.

A HUD built on three master materials

The rest of the HUD was rebuilt on three UI master materials with heavy RGB texture packing, which keeps the number of UI draw calls down. A Python script also converted every alpha-only UI texture into a single-channel R texture automatically, so those textures stopped carrying three empty channels.

The minimap

The minimap cost 0.43 ms to render on the GPU. After the rework it no longer showed up in profiling. The minion icons on the minimap could also be batched into a mesh widget when the PS4 build needed it.

Profiling on console

The work was profiled on PS4 and PS5 with Razor, the PlayStation GPU and CPU profilers. Console numbers decide whether UI work is finished, so the measurements came from the target hardware.

What we take from it

We now sell UMG Mesh Widgets, a plugin for 3D widgets in UMG, on the Jin&Jaw Fab store. More images of the Predecessor work are on jaddeeb.com.

Related services

EMAIL US → BOOK A CALL →