NEW STATE Mobile、Android GPU Inspector を使用して GPU 使用率を 22% 削減
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
背景
NEW STATE Mobile は Krafton のバトルロイヤル ゲームで、2021 年 11 月に全世界でリリースされ、リリース 1 か月で 4, 500 万回以上ダウンロードされました。KRAFTON, Inc. は、独立系ゲーム開発スタジオの集合体で、世界中のゲーマーに革新的で魅力的なエンターテイメント体験を生み出しています。PUBG Studios、Bluehole Studio、Striking Distance Studios、RisingWings、Dreamotion、Unknown Worlds で構成されており、それぞれが独自の専門知識を有しています。NEW STATE Mobile は Unreal Engine 4 で開発され、独特のゲーミング機能による GPU の高使用率に起因する発熱とバッテリーの消費量の削減に向けてさまざまな試みがなされました。
ゲーマーは遠距離のバトルをプレイできるため、ゲームエンジンはかなり遠くからシーンをレンダリングできる必要があります。また、戦場には多数の植生が存在するため、それらの植生が過剰に吸収されると、パフォーマンスの低下に大きく影響します。そこでチームは Android GPU Inspector(AGI)を導入し、ゲームの GPU 使用を最適化してボトルネックを解消することにしました。

図 1: NEW STATE Mobile のスクリーンショット
Eyecon の取り組み
NEW STATE Mobile は AGI を使用して大量の GPU カウンタ情報にアクセスし、それに応じて GPU の使用を最適化しました。チームは AGI が提供する GPU アクティビティ プロファイリング データを利用して、不要なレンダリング パスを特定しました。GPU 使用率とメモリ帯域幅を占有しているセグメントを特定した後、GPU カウンタと GPU アクティビティを行き来して最適化の進捗状況を確認し、正しい方向に向かっているかどうかを確認しました。

図 2: NEW STATE Mobile のスクリーンショット
同社が AGI を使用してゲームのパフォーマンスについて学んだことをいくつか紹介します。
ベースパスの最適化: Depth prepass は Early-z の使用を増やすテクノロジーであり、フラグメント シェーディングの使用を減らすのに役立ちました。Depth prepass は特に LOD0 に使用されました。LOD0 は画面スペースの大部分を占めるため、追加の描画呼び出しによる負荷が最小限に抑えられます。また、32 ビットのシーンカラー形式を使用すると、レンダリングパス全体のパフォーマンスが向上します。UnrealEngine4 のデフォルトの SceneColor 形式は FloatRGBA(64 ビット)です。32 ビット形式を使用すると、メモリ帯域幅を半分に削減できます。
測定された影響: 深度プリパスの適用後、GPU 使用率が 7.5% 低下しました。深度プリパスにより、さらに多くのフラグメントが Early-Z になる可能性があります。フラグメントのシェーディングに必要な時間が 2% 短縮されました。32 ビットの scenecolor フォーマットにより、GPU 使用率が 5.3% 減少しました。Shaders PENDING が 2% 減少し、システムメモリからの合計 GPU 読み取りが 330 MB/秒減少しました。GPU がシステムメモリに書き込む量は 78 MB/秒、テクスチャ メモリの読み取りも 43 MB/秒削減されました。
シャドウパスの最適化: メッシュをシャドウ キャスターとして使用する場合、高ポリゴン LOD を使用しても品質は変わりません。低ポリゴン LOD を使用することをおすすめします。これにより、三角形の数を削減できます。Unreal Engine 4 では、コンソール コマンド「ForceLODShadow」を使用して低ポリゴン LOD を使用できます。
測定された影響: 影に使用される三角形の数が約 12 万個減りました。AGI の GPU カウンタデータによると、GPU 使用量が約 2% 減少し、システムメモリから読み取られる GPU メモリの量が 130 MB/秒に減少し、GPU からシステムメモリへの書き込み量が約 23 MB 減少しました。
自動インスタンシング: シャドウパスの最適化とベースパスの最適化の両方に適用できる自動インスタンシングでは、実行時に同じレンダリング コマンドをマージして、一度にすべてレンダリングできます。これにより、NEWSTATE モバイルではパフォーマンスを損なうことなく、個々のオブジェクトにグローバル イルミネーションを適用できるようになりました。自動インスタンス化は UnrealEngine4 で提供される基本機能です。
測定された影響: 描画呼び出しが 500 回減少しました。これにより、描画呼び出しを約 48% 削減できました。GPU 使用率が約 3.5% 低下しました。これらの測定値は OpenGL を使用して実施されました。

図 3: GPU 使用量の削減を示す内部データ
結果
NEW STATE Mobile は AGI を使用することで GPU 使用率を 22% 削減しました。深度プリパスとシャドウパスの最適化によって、GPU 使用量がそれぞれ 19% と 3% 減少しました。描画呼び出しと、GPU がシステムメモリから読み書きする合計メモリも大幅に削減されました。
始める
Android GPU Inspector(AGI)を使用して、パフォーマンスの問題と最適化が必要な領域を特定し、Android デバイスに対するゲームの影響を分析する方法について学習します。
このページのコンテンツやコードサンプルは、コンテンツ ライセンスに記載のライセンスに従います。Java および OpenJDK は Oracle および関連会社の商標または登録商標です。
最終更新日 2022-02-25 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2022-02-25 UTC。"],[],[],null,["# NEW STATE Mobile reduces GPU usage by 22% with Android GPU Inspector\n\nBackground\n----------\n\n[NEW STATE Mobile](https://play.google.com/store/apps/details?id=com.pubg.newstate) is a battle royale game from Krafton that launched Nov 2021 worldwide, and reached 45M+ downloads in the first month of launch. KRAFTON, Inc. is a collective of independent game development studios brought together to create innovative and engaging entertainment experiences for gamers across the world. The company consists of PUBG Studios, Bluehole Studio, Striking Distance Studios, RisingWings, Dreamotion, and Unknown Worlds, each with its own unique expertise. NEW STATE Mobile was created with Unreal Engine 4, and various attempts have been made to reduce heat and battery consumption caused by high GPU usage from their distinctive gaming features.\n\nGamers can play long range battles, so the game engine needs to be able to render scenes from quite a distance. Also, numerous vegetations are present in the battleground, leading the overdraw of these vegetations to have a substantial impact on decreasing performance. This led the team to [Android GPU Inspector](http://developer.android.com/agi) (AGI) to help optimize the game's GPU usage and eliminate bottlenecks.\n\n**Figure 1**: Screenshot from NEW STATE Mobile\n\nWhat they did\n-------------\n\nNEW STATE Mobile used AGI to access loads of GPU counter information and optimize their GPU usage accordingly. They identified unnecessary render passes with the help of the GPU activity profiling data provided by AGI. After identifying which segments were taking up GPU usage and memory bandwidth, they continued to check the optimization progress using the GPU Counter and GPU activity back and forth to check if they were headed in the right direction.\n\n**Figure 2**: Screenshot from NEW STATE Mobile\n\nHere are a few things they learned about the game's performance using AGI:\n\n- **Base pass optimization**: Depth prepass, which is a technology that increases usage of Early-z, helped decrease the use of fragment shading. Depth prepass was specifically used for LOD0 which takes up most of the screen space, minimizing the burden that can come from additional draw calls. Also, using the 32-bit scenecolor format can increase the performance of the entire render pass. Default SceneColor format of UnrealEngine4 is FloatRGBA, which is 64-bit. If a 32-bit format is used, memory bandwidth can be reduced by half.\n\n- **Impact measured**: After applying depth prepass, GPU utilization dropped by 7.5%. Due to the depth prepass, more Fragments could be Early-Z. The rate of time required for fragment shading has decreased by 2%. Through the 32-bit scenecolor format, GPU utilization was reduced by 5.3%. Shaders Busy decreased by 2%, and total GPU read from system memory decreased 330 MB/s. The amount the GPU writes to system memory was reduced by 78 MB/s and Texture memory read was also reduced by 43 MB/s.\n\n- **Shadow pass optimization**: When meshes are used as shadow casters, using high polygon LOD does not really make a difference in quality. It is preferred to use low polygon LOD which helps reduce the number of triangles. In Unreal Engine 4, low polygon LOD can be used via the console command 'ForceLODShadow'.\n\n- **Impact measured**: The number of triangles used for shadows decreased by about 120,000. The GPU counter data in AGI showed that GPU usage decreased about 2%, the amount of the GPU memory read from the system memory decreased 130MB/s, and the amount written from the GPU to the system memory decreased about 23MBs.\n\n- **Auto-instancing**: Auto-instancing, which can be applied for both shadow pass and base pass optimization, allows you to merge the same render commands at runtime and then be rendered all at once. This allowed NEWSTATE mobile to apply global illumination to individual objects without losing performance. Auto-instancing is a basic feature provided by UnrealEngine4.\n\n- **Impact measured**: Draw calls were reduced by 500. It reduced about 48% of the draw calls. GPU utilization decreased about 3.5%. These measurements were taken using OpenGL.\n\n**Figure 3**: Internal data showing GPU usage reduction\n\nResults\n-------\n\nBy using AGI, NEW STATE Mobile reduced its GPU usage by 22%. From depth prepass and shadow pass optimization, GPU usage was down by 19% and 3% respectively. Draw calls and the total memory read and written by GPU from system memory was also substantially reduced.\n\nGet started\n-----------\n\nLearn how to analyze the impact of your game on Android devices by identifying performance issues and areas to optimize with the [Android GPU Inspector](https://developer.android.com/agi) (AGI)."]]