Android GPU 검사기를 사용하여 GPU 사용량을 22% 줄인 NEW STATE Mobile
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
배경
Krafton의 배틀 로열 게임인 NEW STATE Mobile은 2021년 11월 전 세계에 출시되었으며 출시 첫 달에 4, 500만 회 이상의 다운로드를 기록했습니다. KRAFTON, Inc. 는 전 세계 게이머를 위한 혁신적이고 매력적인 엔터테인먼트 환경을 만들기 위해 모인 독립적인 게임 개발 스튜디오입니다. 이 회사는 PUBG Studios, Bluehole Studio, Striking Distance Studios, RizingWings, Dreamotion, Unknown Worlds로 구성되어 있으며 각각 고유한 전문성을 갖추고 있습니다. NEW STATE Mobile은 Unreal Engine 4로 제작되었으며, 독특한 게임 기능을 통해 높은 GPU 사용으로 인해 발생하는 열과 배터리 소모를 줄이기 위해 다양한 시도를 해왔습니다.
게이머는 장거리 전투를 할 수 있으므로 게임 엔진은 꽤 멀리서 장면을 렌더링할 수 있어야 합니다. 또한 전장에 수많은 초목이 있기 때문에 이러한 식생을 과도하게 사용하면 실적이 크게 저하됩니다. 이를 위해 팀은 게임의 GPU 사용을 최적화하고 병목 현상을 제거하는 데 도움이 되는 Android GPU 검사기 (AGI)를 채택했습니다.

그림 1: NEW STATE Mobile의 스크린샷
진행한 작업
NEW STATE Mobile은 AGI를 사용하여 수많은 GPU 카운터 정보에 액세스하고 그에 따라 GPU 사용을 최적화했습니다. 팀은 AGI에서 제공하는 GPU 활동 프로파일링 데이터를 활용하여 불필요한 렌더링 패스를 식별했습니다. 어떤 세그먼트가 GPU 사용량과 메모리 대역폭을 차지하는지 파악한 후 GPU 카운터와 GPU 활동을 사용해 최적화 진행 상황을 계속 확인하여 올바른 방향으로 나아가고 있는지 확인했습니다.

그림 2: NEW STATE Mobile의 스크린샷
다음은 AGI를 사용하여 게임의 실적에 관해 알게 된 몇 가지 사항입니다.
기본 패스 최적화: Early-z 사용을 늘리는 기술인 깊이 프리패스는 프래그먼트 셰이딩 사용을 줄이는 데 도움이 되었습니다. 깊이 프리패스는 특히 화면 공간의 대부분을 차지하는 LOD0에 사용되어 추가 그리기 호출에서 비롯될 수 있는 부담을 최소화했습니다. 또한 32비트 장면 색상 형식을 사용하면 전체 렌더링 패스의 성능이 향상될 수 있습니다. UnrealEngine4의 기본 SceneColor 형식은 64비트인 FloatRGBA입니다. 32비트 형식을 사용하는 경우 메모리 대역폭을 절반으로 줄일 수 있습니다.
영향 측정됨: 깊이 프리패스를 적용한 후 GPU 사용률이 7.5% 감소했습니다. 깊이 프리패스로 인해 더 많은 프래그먼트가 Early-Z일 수 있습니다. 프래그먼트 셰이딩에 필요한 시간 비율이 2% 감소했습니다. 32비트 장면 색상 형식을 통해 GPU 사용률이 5.3% 감소했습니다. Shaders Busy는 2% 감소했으며 시스템 메모리의 총 GPU 읽기는 330MB/s로 감소했습니다. GPU가 시스템 메모리에 쓰는 양은 초당 78MB, 텍스처 메모리 읽기도 43MB/초로 줄었습니다.
섀도우 패스 최적화: 메시를 섀도우 캐스터로 사용할 때 하이 폴리곤 LOD를 사용해도 품질에는 아무런 영향이 없습니다. 삼각형 수를 줄이는 데 도움이 되는 로우 폴리곤 LOD를 사용하는 것이 좋습니다. Unreal Engine 4에서는 콘솔 명령어 'ForceLODShadow'를 통해 로우 폴리곤 LOD를 사용할 수 있습니다.
영향 측정: 그림자에 사용되는 삼각형 수가 약 120,000개 감소했습니다. AGI의 GPU 카운터 데이터에 따르면 GPU 사용량은 약 2%, 시스템 메모리에서 읽는 GPU 메모리의 양은 130MB/s, GPU에서 시스템 메모리로 쓰이는 양이 약 23MB 감소했습니다.
자동 인스턴스 생성: 섀도 패스와 기본 패스 최적화 모두에 적용할 수 있는 자동 인스턴스를 사용하면 런타임에 동일한 렌더링 명령어를 병합한 다음 한 번에 모두 렌더링할 수 있습니다. 이를 통해 NEWSTATE 모바일에서는 성능 저하 없이 개별 객체에 전역 조명을 적용할 수 있었습니다. 자동 인스턴스 생성은 UnrealEngine4에서 제공하는 기본 기능입니다.
영향 측정: 그리기 호출이 500회 감소했습니다. 그리고 그리기 호출의 약 48% 를 줄였습니다. GPU 사용률은 약 3.5% 감소했습니다. 이 측정은 OpenGL을 사용하여 측정되었습니다.

그림 3: GPU 사용량 감소를 보여주는 내부 데이터
결과
NEW STATE Mobile은 AGI를 사용하여 GPU 사용량을 22% 줄였습니다. 깊이 프리패스와 섀도 패스 최적화로 인해 GPU 사용량이 각각 19%, 3% 감소했습니다. 그리기 호출과 GPU가 시스템 메모리에서 읽고 쓰는 총 메모리도 크게 줄었습니다.
시작하기
성능 문제와 Android GPU 검사기 (AGI)로 최적화할 영역을 파악하여 Android 기기에 미치는 게임의 영향을 분석하는 방법을 알아보세요.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 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)."]]