Fix logo animation not rendering correctly on iOS #351
+7
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This issue is happening also due to premult, and is not one that can be fixed by ppy/osu-framework#6470, as premult is the norm in iOS's internals and what the logic in that PR does is use API that "un-premult" it, therefore there are inaccuracies introduced (this can be seen by the comparison picture in the PR where the two boxes aren't exactly 1:1 identical around the middle). Not to mention that this is 100% required when we use premult everywhere.
The fix is simply stripping alpha away from the textures entirely and storing its information in a colour channel instead (green is chosen), therefore the texture does not get affected by premult. This may sound one step backwards but I don't think it's usual for us to define shaders that act based on the colour value of the texture while including alpha information to it, so we have to change the formatting of the texture instead (also trimming KBs in the process).
The new format of the texture is:
CleanShot.2024-12-23.at.16.54.09.mp4