osu-framework icon indicating copy to clipboard operation
osu-framework copied to clipboard

Implement `FastCircle` component

Open EVAST9919 opened this issue 3 months ago • 10 comments

Adresses https://github.com/ppy/osu-framework/issues/6067, https://github.com/ppy/osu/issues/21495

Pros:

  • No nested Box drawable (adds up in demanding scenarios)
  • Correct masking when used inside CircularContainer
  • No overhead from masking info and no batch breaking in cases when multiple circles are being drawn consecutively (though I think SSBO supposed to fix that?)

Cons (which are holding me back from replacing current Circle implementation with this one):

  • Circle is no longer a container (so is the Box which I think is fine)
  • No ability to set masking-related effects directly (again Box has the same properties)
  • Points above might be considered a breaking change, but easily fixeable by using CircularContainer instead
  • Texture coordinates abuse to pass draw size into the shader without uniform buffers
  • Has a separate shader

Performance comparison in demanding scenarios:

master pr
Снимок экрана (524) Снимок экрана (525)
master-mania pr-mania
master-mania-2 pr-mania-2
master-slider pr-slider

EVAST9919 avatar May 19 '24 11:05 EVAST9919