Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung...

75

Transcript of Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung...

Page 1: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com
Page 2: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Mobile Game Optimization with Vulkan and Unity Adaptive Performance

Powered by Samsung GameSDK

Page 3: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Presented by Samsung and Unity

Vulkan Optimization

GameDev Engineer

Samsung Electronics

[email protected]

Samsung

Adaptive Performance

David Berger

Software Developer

Unity Technologies

[email protected]

GameSDK

GameDev Engineer

Samsung Electronics

[email protected]

Page 4: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

GameDevGALAXY GAMEDEV

Page 5: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

What Samsung did…

• Helping developers with adoption of new technologies

Page 6: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com
Page 7: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

GameDev

Page 8: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Team GameDev

Page 9: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

•→

•→

•→

•→

•→

Page 10: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Engine/Game

Page 11: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

GPU Driver

GameEngines

DeveloperSupport

Tools & SDKs

Page 12: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Vulkan Grahpics API

• Way of Developing High Fidelity Android Games

Page 13: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Vulkan Grahpics API

Application

OpenGL Driver

GPU

Vulkan Driver

GPU

Application

Page 14: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Vulkan

Page 15: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

FINAL FANTASY XV POCKET EDITIONSquare Enix / Summertime Studio

• GameEngine Optimize

• Contents Optimize

• Trouble Support

• Pipeline Barrier Optimize

• Pending RenderPass

• Primitive Buffer

Before After

42 FPS 60 FPS

S8 Mali — Within Sustainable Power

Page 16: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

• GameEngine Optimize

• Contents Optimize

• Trouble Support

• Pipeline Barrier Optimize

• Pending RenderPass

• Primitive Buffer

FINAL FANTASY XV POCKET EDITIONSquare Enix / Summertime Studio

Before After

42 FPS 60 FPS

S8 Mali — Within Sustainable Power

Page 17: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

• GameEngine Optimize

• Contents Optimize

• Trouble Support

• Pipeline Barrier Optimize

• Pending RenderPass

• Primitive Buffer

FINAL FANTASY XV POCKET EDITIONSquare Enix / Summertime Studio

Before After

42 FPS 60 FPS

S8 Mali — Within Sustainable Power

Page 18: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

FINAL FANTASY XV POCKET EDITIONSquare Enix / Summertime Studio

Vertex Shader

Fragment Shader

SRC VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT

DST VK_PIPELINE_STAGE_VERTEX_SHADER_BIT VK_PIPELINE_STAGE_VERTEX_INPUT_BIT

Pipeline Barrier, Wait - !

Vertex Shader

Fragment Shader

Vertex Shader

Fragment Shader

• Pipeline Barrier Optimize

Page 19: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

FINAL FANTASY XV POCKET EDITIONSquare Enix / Summertime Studio

• Vulkan with proper barriers

• Vulkan with wrong barriers

Page 20: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

• GameEngine Optimize

• Contents Optimize

• Trouble Support

• Pipeline Barrier Optimize

• Pending RenderPass

• Primitive Buffer

FINAL FANTASY XV POCKET EDITIONSquare Enix / Summertime Studio

Before After

42 FPS 60 FPS

S8 Mali — Within Sustainable Power

Page 21: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

FINAL FANTASY XV POCKET EDITIONSquare Enix / Summertime Studio

• Pending RenderPass

Page 22: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Hundred SoulHOUND 13

• Bloom Optimize

• RenderPass Load/Store Optimize

• Paging Allocate Buffer

• Batching UpdateDescriptorSet

• Shader Module Cache

Before After

41 FPS 52 FPS

Note9 Adreno — Within Sustainable Power

Page 23: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Hundred SoulHOUND 13

• Bloom Optimize

• RenderPass Load/Store Optimize

• Paging Allocate Buffer

• Batching UpdateDescriptorSet

• Shader Module Cache

Before After

41 FPS 52 FPS

Note9 Adreno — Within Sustainable Power

Page 24: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Hundred SoulHOUND 13

• Bloom Optimize

• RenderPass Load/Store Optimize

• Paging Allocate Buffer

• Batching UpdateDescriptorSet

• Shader Module Cache

Before After

41 FPS 52 FPS

Note9 Adreno — Within Sustainable Power

Page 25: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Hundred SoulHOUND 13

• RenderPass Load/Store Optimize

https://community.arm.com/developer/tools-software/graphics/b/blog/posts/the-mali-gpu-an-abstract-machine-part-4---the-bifrost-shader-core

Page 26: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of KingsTencent Timi Studio – L1

• Single Scratch Buffer

• Low Priority Destroy Thread

• Batching UpdateDescriptorSet

• RenderPass Load/Store Optimize

• Shader Module Cache

Before After

41 FPS 53 FPS

S7 Adreno — Within Sustainable Power

Page 27: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

• Single Scratch Buffer

• Low Priority Destroy Thread

• Batching UpdateDescriptorSet

• RenderPass Load/Store Optimize

• Shader Module Cache

Before After

41 FPS 53 FPS

S7 Adreno — Within Sustainable Power

Honor of KingsTencent Timi Studio – L1

Page 28: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of KingsTencent Timi Studio – L1

• Only recreate during 1st loading

• 100% hit rate during playingoffset offset offset

Free Memory

Not enough memory

Larger buffer

Page 29: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of KingsTencent Timi Studio – L1

• Single Scratch Buffer

• Low Priority Destroy Thread

• Batching UpdateDescriptorSet

• RenderPass Load/Store Optimize

• Shader Module Cache

Before After

41 FPS 53 FPS

S7 Adreno — Within Sustainable Power

Page 30: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of KingsTencent Timi Studio – L1

• Single Scratch Buffer

• Low Priority Destroy Thread

• Batching UpdateDescriptorSet

• RenderPass Load/Store Optimize

• Shader Module Cache

Before After

41 FPS 53 FPS

S7 Adreno — Within Sustainable Power

Page 31: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of KingsTencent Timi Studio – L1

● 매 draw 마다 UpdateDescriptorSets호출● Texture, Buffer, Buffer Offset, Buffer View 변경을위해호출

vkUpdateDescriptorSets

vkCmdDraw

vkUpdateDescriptorSets

vkCmdDraw

...

vkQueueSummit

Page 32: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

• Threaded queue present

• VB, IB binding optimization

• Direct buffer access

• Cache optimization

• Async texture load

• Single buffer for image upload

Before After

49 FPS 59 FPS

Note8 Mali — Within Sustainable Power

Page 33: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

• Threaded queue present

• VB, IB binding optimization

• Direct buffer access

• Cache optimization

• Async texture load

• Single buffer for image upload

Before After

49 FPS 59 FPS

Note8 Mali — Within Sustainable Power

Page 34: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

• Threaded queue present

– Run thread for vkQueuePresent()

Page 35: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

• Threaded queue present

• VB, IB binding optimization

• Direct buffer access

• Cache optimization

• Async texture load

• Single buffer for image upload

Before After

49 FPS 59 FPS

Note8 Mali — Within Sustainable Power

Page 36: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

Skip binding buffers, just draw with bound

buffers from previous draw call.

Page 37: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

• Threaded queue present

• VB, IB binding optimization

• Direct buffer access

• Cache optimization

• Async texture load

• Single buffer for image upload

Before After

49 FPS 59 FPS

Note8 Mali — Within Sustainable Power

Page 38: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

• Direct Buffer Access

Data(vertex, index,

uniform…)

Main Thread

Temp Buffercopyupload

Render Thread

Real Buffer

Before

Data(vertex, index,

uniform…)

Main Thread

upload

Render Thread

Real Buffersync

After

Page 39: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Honor of Kings – The King’s ExpeditionTencent Timi Studio – L1

• Threaded queue present

• VB, IB binding optimization

• Direct buffer access

• Cache optimization

• Async texture load

• Single buffer for image upload

Before After

49 FPS 59 FPS

Note8 Mali — Within Sustainable Power

Page 40: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Collaboration Titles

• 2017 GameLoft, Asphalt 8

• 2017 Cornfox&Bros, Oceanhorn: Monster of Uncharted Seas

• 2017 Deep Silver, Galaxy On Fire 3: Manticore!

• 2017 Digital Legends Entertainment, Afterpulse

• 2017 First Touch Games, Score! Hero / Dream League Soccer

• 2018 Tencent, Honor of Kings

• 2018 Pearl Abyss, BlackDesert Mobile

• 2018 Epic Games, Fortnite Battle Royale

• 2018 Amazon Lumberyard, Bistro

• 2019 Moai Games, TRAHA

• 2019 PUBG corporation / Tencent, PUBG MOBILE

• 2019 Tencent, QQ Speed

• 2016 Epic Games, ProtoStar Galaxy S7 Collaboration

• 2016 NetGames, HIT

• 2016 Super Evil MegaCorp, VainGlory

• 2017 433, HeroDC

• 2017 Netmarble, Lineage 2: Revolution

• 2017 Nexon, AxE

• 2017 XL Games, Archeage: Begins

• 2017 Action Square, Blade II

• 2017 Hound13, HundredSoul

• 2017 Square Enix, FinalFantasy XV Pocket Edition

• 2017 Croteam, Talos Principle

• 2017 Roblox Corporation, Roblox

• 2017 Doragon Entertainment, Danmaku Unlimited 3

Page 41: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Contact

[email protected]

https://developer.samsung.com/game

Page 42: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Samsung GameSDK

Presented by Junsik Kong

Samsung Galaxy GameDev

Page 43: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Limitation of Mobile

– No active cooling system

– Performance Throttling

– Limitation of battery

– Use more Power than necessary

— Developer can’t control

FPS

Core Freq

Temperature After Throttling

43

Page 44: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

GameApplicationunity

Galaxy GameSDK

44

Page 45: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Thermal Throttling

40 fps @ end

60 fps @ start

Throttling ?

45

— Performance drops and shakes

Page 46: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Thermal Throttling

— onHighTempWarning(int warningLevel)

warningLevel 0 warningLevel 1 warningLevel 2

Throttling46

Page 47: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Thermal Throttling

— getTempLevel(), getCPU/GPUJTLevel(), getSkinTempLevel()

01

23

45

6 7

47

Page 48: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Thermal Throttling

— Now you can do !

– Thermal Throttling 시점예측가능

– Thermal Throttling 방지

– Adjust Target FPS, Quality or etc!

50 fps steady

48

Page 49: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Power control

CPU Freq

GPU Freq

— Frequency over reat

49

Page 50: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Power control

— setLevelWithScene(String scene, int cpuLevel, int gpuLevel)

CPU Freq

GPU Freq

Level 2

Level 1

50

Page 51: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Bottleneck Check

— Power level

Target FPS 30

@FPS 28

setlevel….(1,1)

setlevel….(2 ,1)

setlevel….(1 ,2)

51

Page 52: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Bottleneck Check

— getGpuFrameTime()

– #n frame’s GpuFrameTime

GPU Bottleneck! GPU Level 증가

16.00 ms10.23ms

#n frame Time

#n gpuframeTime

52

Page 53: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Goal #1 Balancing Quality & Performance

40 fps @ end

60 fps @ start

50 fps steady

53

Page 54: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Goal #2 Controlling Power Budge

CPU Freq

GPU Freq

Level 2

Level 1

54

Page 55: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Goal #3 Maximizing Peformance

setlevel….(1,1)55

16.00 ms10.23ms

#n frame Time

#n gpuframeTime

setlevel….(2 ,1)

setlevel….(1 ,2)

55

Page 56: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance in Megacity

56

Presented by David BergerUnity Technologies

Page 57: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance

Get device performance status and thermal trends

Proactively adjust performance and quality settings on the fly

Page 58: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Smoother Gameplay

58

Page 59: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

59

Page 60: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

8MTriangles

6MEntities

2KCars

60

Page 61: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

30FPS - stable over time

61

Page 62: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

30

15

200 Time [m]

Framerate

62

Page 63: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance

• Start with Low CPU/GPU levels (Menu->Level)

– Increase levels for CPU or GPU bottleneck respectively

– Keeps energy consumption low

• Not hitting target frame rate

– Decrease the LOD bias

– Decreases GFX load (triangles, memory, draw calls)

• Decrease target framerate when close to throttling

63

Page 64: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

30

15

200 10

Time [m]

64

Page 65: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com
Page 66: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance: How it works

1-Add the package

66

Page 67: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance: How it works

2-Register to OnThermalEvent, Set initial target level

67

Page 68: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance: How it works

3-Manage your quality settings when Thermal status changes

68

Page 69: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance: How it works

4-You can subscribe to Performance bottleneck events

69

Page 70: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance: How it works

4-You can subscribe to performance bottleneck events

70

Page 71: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance Preview

available now!

71

Page 72: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Adaptive Performance Blost Posthttps://blogs.unity3d.com/2019/04/01/higher-fidelity-and-smoother-

frame-rates-with-adaptive-performance/

72

Page 73: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

73

Page 74: Mobile Game Optimization Adaptive Performanceuniteseoul.com/2019/PDF/D2T4S5.pdfPresented by Samsung and Unity Vulkan Optimization GameDev Engineer Samsung Electronics shawn1.lee@samsung.com

Roadmap

• Preview

• 2019.1+

• Verified

• 2019.3

• Future

• 2019.3+

74