[#12791] Mod sprites in `sprites` folder cause ~50% FPS drop on Android (no drop when placed in `sprites-ui`)
自动翻译暂时不可用
本帖暂时展示 GitHub 原始内容。
Platforms
Android
Build
160.7
Issue
Description
On Android, adding a large number of sprites from a mod to the sprites folder causes a heavy FPS drop in campaign sectors (e.g. sector 24). After moving the exact same sprites to sprites-ui, FPS goes back to normal. The sprites are not even used by any content, so just having them packed into the atlas seems to be enough.
There seems to be a threshold: the drop appears once the total pixel count of the added sprites goes past a certain amount (I don't know the exact value). I haven't noticed this on PC.
Expected behavior
Unused mod sprites should not noticeably affect FPS.
Actual behavior
Sprites in
sprites: ~15 FPSSprites in
sprites-ui: ~30+ FPS
Environment
Game version: build 160.7
Device: Tecno Pova (LD7), Android 10
Reproduced on PC: no (not noticed so far)
Attachments
sprtest-200.zip (test mod: 200 sprites 32x32, no content)
Additional context
Possibly related to the texture atlas size limit on mobile GPUs, where a bigger atlas is split into several pages and rendering needs more texture switches. This is only a guess.
Steps to reproduce
Steps to reproduce
Install the attached test mod (sprtest-200.zip) on Android. It contains no content, only 200 sprites (32x32 each, 204,800 px total) in
sprites/blocks.Load a campaign sector (e.g. sector 24) and check FPS.
Move all sprites from
sprites/blockstosprites-uiand check FPS again in the same sector.
Mods used
<!-- Failed to upload "sprtest-200.zip" -->
Save file
(Crash) logs
Note: the only mod enabled is the attached test mod (sprtest-200). It contains no content, only sprites, and is needed to reproduce the issue.
Submission
I have updated to the latest release (https://github.com/Anuken/Mindustry/releases) to make sure my issue has not been fixed.
I have searched the closed and open issues to make sure that this problem has not already been reported.
I am not using Foo's Client.
This issue occurs with no mods enabled.
I have attached a valid save file.
由 MDT GitHub 同步机器人自动同步。