SlideShare ist ein Scribd-Unternehmen logo
1 von 30
Generative
Art
—
Made
with
Unity
Mobile Graphics Best
Practices for Artists
Unite Seoul 2020
Owen Wu | Developer Relations Engineer, Arm | owen.wu@arm.com
Agenda
3
— Introduction
— Texturing
— Geometry
— Shaders
— Frame Rendering
— Resources
Texturing
Texture Filtering - Trilinear
— Trilinear - Like Bilinear but with
added blur between mipmap
level
— Don’t use trilinear without
mipmap
— This filtering will remove
noticeable change between
mipmap by adding smooth
transition
— Trilinear filtering is still
expensive on mobile
— Use it with caution
Texture Filtering - Anisotropic
— Anisotropic - Make textures look
better when viewed from different
angle, which is good for ground level
textures
— Higher anisotropic level cost higher
Texture Filtering
— Use bilinear for balance between performance and visual quality
— Trilinear will cost more memory bandwidth than bilinear and needs to be
used selectively
— Bilinear + 2x Anisotropic most of the time will look and perform better
than Trilinear + 1x Anisotropic, so this combination can be better solution
rather than using Trilinear
— Keep the anisotropic level low
— Using a level higher than 2 should be done very selectively for critical
game assets
– This is because higher anisotropic level will cost a lot more bandwidth and affect
device battery life
Always Use Mipmap If Camera Is Not Still
— Using mipmapping will improve
GPU performance
— Less cache miss
— Mipmapping also reduce
texture aliasing and improve
final image quality
— Don’t use it on 2D objects
Texture Color Space
— Use linear color space rendering if using
dynamic lighting
— Check sRGB in texture inspector window
— Textures that are not processed as color
should NOT be used in sRGB color space
(such as metallic, roughness, normal map,
etc)
— Current hardware supports sRGB format
and hardware will do Gamma correction
automatically for free
Texture Compression
— ASTC may get better quality with
same memory size as ETC or same
quality with less memory size than
ETC
— ASTC may take longer to encode
compared to ETC - use it on final
packaging of the game
— ASTC allows more control in terms of
quality by allowing to set block size -
5x5 or 6x6 is good default
Texture Channel Packing
— Use texture channels to pack multiple
textures into one
— Commonly used to pack roughness, or
smoothness, and metallic into one
texture
— Can be applied for any texture mask
— Make good use of alpha channel
Geometry
Avoid Rendering Small Triangles
— The bandwidth and processing cost
of a vertex is typically orders of
magnitude higher than the cost of
processing a fragment
— Make sure that you get many pixels
worth of fragment work for each
primitive
— Use dynamic mesh level-of-detail,
using simpler meshes when objects
are further away from the camera
— Make sure each model which create
at least 10-20 fragments per
primitive
Avoid Rendering Long Thin Triangles
— More expensive for the GPU to process when compared
with normal triangles
— GPUs process pixels in quad blocks
— Long thin triangle edges will waste more GPU power to
rasterize
— Adjacent long thin triangles will waste doubly
Avoid Duplicating Vertices
— Reuse as many vertices as possible
— Transformed vertex data can be cached to save
computation power
— Avoid duplicating vertices unless it’s necessary
V0
V1
V2
V3
V4
V0
V1
V2
V3
V5
V4 V7
V6
V8
T1 : (V0, V1, V2)
T2 : (V1, V3, V2)
T3 : (V2, V3, V4)
T1 : (V0, V1, V2)
T2 : (V3, V4, V5)
T3 : (V6, V7, V8)
GOOD BAD
Instancing
— Render many objects using the same
mesh
— Each instance can have its own
properties
— Reduce the number of draw call and
memory bandwidth
— Check the “Enable GPU Instancing”
option in material
— Then use
UNITY_ACCESS_INSTANCED_PROP() in
shader to access the instance
properties
Shaders
Shader Floating-point Precision
— Use mediump and highp keywords
— Full FP32 of vertex attributes is unnecessary for many
uses of attribute data
— Keep the data at the minimum precision needed to
produce an acceptable final output
— Use FP32 for computing vertex positions only
— Use the lowest possible precision for other attributes
— Don’t always use FP32 for everything
— Don’t upload FP32 data into a buffer and then read it as a
mediump attribute
Take Advantage of Early-Z
— Many fragments are occluded by other fragments
— Running fragment shader of occluded fragment is wasting
GPU power
— Render opaque object from front to back
— Occluded fragment will be rejected before shading
— Fragment writing out depth/stencil will go Late-Z path
which rejects occluded fragment after fragment shader
— Fragment using discard or Alpha-to-coverage will be
forced to do Late-Z and may stall the pipeline
Early Frag Op
Fragment
Shader
Late Frag Op
Avoid Heavy Overdraw
— Overdraw means one pixel has been rendered more
than once
— Alpha blending overdraw is expensive on mobile
— Use Unity built-in display feature to check the amount
of overdraw
— Use Arm Mobile Studio to check the in-game overdraw
— Brighter area means more overdraw
— Render from front to back order to reduce the
overdraw
— Optimize arrangement of layer, sorting layer, render
queue and camera setting to avoid overdraw
Reduce the Amount of Alpha Blending/Tested
Fragments
— Separate transparent mesh from opaque mesh
— Use polygon mesh instead of quad for transparent texture
— Both ways can reduce the amount of transparent
fragments and improve performance
Dynamic Branching
— Dynamic branching in shader is not as expensive as most
developers think, but…
— Both sides of branch will be executed and pick one if the
branching area is too small
— Shader compiler will optimize it automatically
— Use dynamic branching when it can skip enough
computation
Frame Rendering
Reduce Render State Switch
— Render state switch is very expensive operation
— Rendering as many primitives as possible before render state(SetPass)
switch
— Don’t just check number of draw calls or batches
— Number of render state switch is also an important index
— Check Tris/SetPass (i.e. 95.2K/34)
— Batch as many draw calls as possible
– Static batching
– GPU Instancing
– Dynamic batching
Reduce Frame Buffer Switch
— Bind each frame buffer only once
— Making all required draw calls before
switching to the next frame buffer
— Avoid unnecessary render buffer switch
— Can reduce memory bandwidth
requirement and power consumption
(~100mW for 1GB/s)
— Use Unity frame debugger to check
— Use Arm Mobile Studio to do API level
check
Clear Frame Buffer Before
Rendering
— Before rendering, GPU will read frame buffer into
tile memory from external memory
— Minimizing tile loads at renderpass start
— Can cheaply initialize the tile memory to a clear
color value
— Ensure that you clear or invalidate all of your
attachments at the start of each render pass
— Use Unity frame debugger to check
— Use Arm Mobile Studio to do API level check
Doesn’t clear before rendering
Bad for performance
Reduce Frame Buffer Write
— After rendering, GPU will write result from tile
memory to external memory
— Minimizing tile stores at renderpass end
— Avoid writing back to external memory
whenever is possible
— Don’t bind depth/stencil buffer if depth/stencil
value is not used
— Use RenderTexture.DiscardContents() to
invalidate frame buffers if you don’t need the
data at next frame
— Use Unity frame debugger to check
— Use Arm Mobile Studio to do API level check
Resources
Generative
Art
—
Made
with
Unity
Arm Mobile Studio – Free Tool for Mobile Optimization
• https://developer.arm.com/mobile-studio
Arm Guide for Unity Developers
• https://developer.arm.com/solutions/graphics-and-gaming/gaming-
engine/unity/arm-guide-for-unity-developers
모바일 게임 아티스트를 위한 베스트 프랙티스 가이드
• https://blogs.unity3d.com/kr/2020/04/07/artists-best-practices-for-
mobile-game-development/
Arm DevRel
• developer@arm.com
Generative
Art
—
Made
with
Unity
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

OpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsOpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsJungsoo Nam
 
Direct3D12 and the Future of Graphics APIs by Dave Oldcorn
Direct3D12 and the Future of Graphics APIs by Dave OldcornDirect3D12 and the Future of Graphics APIs by Dave Oldcorn
Direct3D12 and the Future of Graphics APIs by Dave OldcornAMD Developer Central
 
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsGFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsPrabindh Sundareson
 
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019Unity Technologies
 
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...AMD Developer Central
 
The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...
The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...
The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...AMD Developer Central
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCQLOC
 
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsAMD Developer Central
 
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla MahGS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla MahAMD Developer Central
 
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESGFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESPrabindh Sundareson
 
Why is EFL used on Tizen?
Why is EFL used on Tizen?Why is EFL used on Tizen?
Why is EFL used on Tizen?Ryo Jin
 
GS-4147, TressFX 2.0, by Bill-Bilodeau
GS-4147, TressFX 2.0, by Bill-BilodeauGS-4147, TressFX 2.0, by Bill-Bilodeau
GS-4147, TressFX 2.0, by Bill-BilodeauAMD Developer Central
 
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...DevGAMM Conference
 
IS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
IS-4081, Rabbit: Reinventing Video Chat, by Philippe ClavelIS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
IS-4081, Rabbit: Reinventing Video Chat, by Philippe ClavelAMD Developer Central
 
HC-4017, HSA Compilers Technology, by Debyendu Das
HC-4017, HSA Compilers Technology, by Debyendu DasHC-4017, HSA Compilers Technology, by Debyendu Das
HC-4017, HSA Compilers Technology, by Debyendu DasAMD Developer Central
 
MM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary Demos
MM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary DemosMM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary Demos
MM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary DemosAMD Developer Central
 
GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...
GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...
GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...AMD Developer Central
 

Was ist angesagt? (20)

OpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIsOpenGL ES EGL Spec&APIs
OpenGL ES EGL Spec&APIs
 
Direct3D12 and the Future of Graphics APIs by Dave Oldcorn
Direct3D12 and the Future of Graphics APIs by Dave OldcornDirect3D12 and the Future of Graphics APIs by Dave Oldcorn
Direct3D12 and the Future of Graphics APIs by Dave Oldcorn
 
Media SDK Webinar 2014
Media SDK Webinar 2014Media SDK Webinar 2014
Media SDK Webinar 2014
 
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specificationsGFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
GFX Part 1 - Introduction to GPU HW and OpenGL ES specifications
 
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019Built for performance: the UIElements Renderer – Unite Copenhagen 2019
Built for performance: the UIElements Renderer – Unite Copenhagen 2019
 
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...
PT-4053, Advanced OpenCL - Debugging and Profiling Using AMD CodeXL, by Uri S...
 
The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...
The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...
The Small Batch (and other) solutions in Mantle API, by Guennadi Riguer, Mant...
 
Checkerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOCCheckerboard Rendering in Dark Souls: Remastered by QLOC
Checkerboard Rendering in Dark Souls: Remastered by QLOC
 
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
 
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla MahGS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
GS-4106 The AMD GCN Architecture - A Crash Course, by Layla Mah
 
SEED - Halcyon Architecture
SEED - Halcyon ArchitectureSEED - Halcyon Architecture
SEED - Halcyon Architecture
 
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ESGFX Part 7 - Introduction to Rendering Targets in OpenGL ES
GFX Part 7 - Introduction to Rendering Targets in OpenGL ES
 
Why is EFL used on Tizen?
Why is EFL used on Tizen?Why is EFL used on Tizen?
Why is EFL used on Tizen?
 
Masked Occlusion Culling
Masked Occlusion CullingMasked Occlusion Culling
Masked Occlusion Culling
 
GS-4147, TressFX 2.0, by Bill-Bilodeau
GS-4147, TressFX 2.0, by Bill-BilodeauGS-4147, TressFX 2.0, by Bill-Bilodeau
GS-4147, TressFX 2.0, by Bill-Bilodeau
 
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...Optimization in Unity: simple tips for developing with "no surprises" / Anton...
Optimization in Unity: simple tips for developing with "no surprises" / Anton...
 
IS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
IS-4081, Rabbit: Reinventing Video Chat, by Philippe ClavelIS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
IS-4081, Rabbit: Reinventing Video Chat, by Philippe Clavel
 
HC-4017, HSA Compilers Technology, by Debyendu Das
HC-4017, HSA Compilers Technology, by Debyendu DasHC-4017, HSA Compilers Technology, by Debyendu Das
HC-4017, HSA Compilers Technology, by Debyendu Das
 
MM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary Demos
MM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary DemosMM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary Demos
MM-4105, Realtime 4K HDR Decoding with GPU ACES, by Gary Demos
 
GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...
GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...
GS-4136, Optimizing Game Development using AMD’s GPU PerfStudio 2, by Gordon ...
 

Ähnlich wie [Unite Seoul 2020] Mobile Graphics Best Practices for Artists

Smedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphicsSmedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphicschangehee lee
 
Working with Shader with Unity
Working with Shader with UnityWorking with Shader with Unity
Working with Shader with UnityMinh Nghiem
 
Making a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonMaking a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonJean-Philippe Doiron
 
Unity optimization techniques applied in Catan Universe
Unity optimization techniques applied in Catan UniverseUnity optimization techniques applied in Catan Universe
Unity optimization techniques applied in Catan UniverseExozet Berlin GmbH
 
Look Ma, No Jutter! Optimizing Performance Across Oculus Mobile
Look Ma, No Jutter! Optimizing Performance Across Oculus MobileLook Ma, No Jutter! Optimizing Performance Across Oculus Mobile
Look Ma, No Jutter! Optimizing Performance Across Oculus MobileUnity Technologies
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Alexander Dolbilov
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Johan Andersson
 
Unite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platformsUnite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platformsナム-Nam Nguyễn
 
Optimizing Games for Mobiles
Optimizing Games for MobilesOptimizing Games for Mobiles
Optimizing Games for MobilesSt1X
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Johan Andersson
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Tiago Sousa
 
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unity Technologies
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...Johan Andersson
 
HiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use CasesHiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use CasesTulipp. Eu
 
EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopSamsung Open Source Group
 
Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Jean-Philippe Doiron
 
FGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie TycoonFGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie Tycoonmochimedia
 
Masked Software Occlusion Culling
Masked Software Occlusion CullingMasked Software Occlusion Culling
Masked Software Occlusion CullingIntel® Software
 

Ähnlich wie [Unite Seoul 2020] Mobile Graphics Best Practices for Artists (20)

Smedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphicsSmedberg niklas bringing_aaa_graphics
Smedberg niklas bringing_aaa_graphics
 
Working with Shader with Unity
Working with Shader with UnityWorking with Shader with Unity
Working with Shader with Unity
 
Making a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie TycoonMaking a game with Molehill: Zombie Tycoon
Making a game with Molehill: Zombie Tycoon
 
Unity optimization techniques applied in Catan Universe
Unity optimization techniques applied in Catan UniverseUnity optimization techniques applied in Catan Universe
Unity optimization techniques applied in Catan Universe
 
Look Ma, No Jutter! Optimizing Performance Across Oculus Mobile
Look Ma, No Jutter! Optimizing Performance Across Oculus MobileLook Ma, No Jutter! Optimizing Performance Across Oculus Mobile
Look Ma, No Jutter! Optimizing Performance Across Oculus Mobile
 
Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)Optimizing unity games (Google IO 2014)
Optimizing unity games (Google IO 2014)
 
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
Frostbite Rendering Architecture and Real-time Procedural Shading & Texturing...
 
Unite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platformsUnite 2013 optimizing unity games for mobile platforms
Unite 2013 optimizing unity games for mobile platforms
 
Optimizing Games for Mobiles
Optimizing Games for MobilesOptimizing Games for Mobiles
Optimizing Games for Mobiles
 
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
Terrain Rendering in Frostbite using Procedural Shader Splatting (Siggraph 2007)
 
Deferred shading
Deferred shadingDeferred shading
Deferred shading
 
OpenGL for 2015
OpenGL for 2015OpenGL for 2015
OpenGL for 2015
 
Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)Rendering Technologies from Crysis 3 (GDC 2013)
Rendering Technologies from Crysis 3 (GDC 2013)
 
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
Unite Berlin 2018 - Book of the Dead Optimizing Performance for High End Cons...
 
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
The Intersection of Game Engines & GPUs: Current & Future (Graphics Hardware ...
 
HiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use CasesHiPEAC 2019 Workshop - Use Cases
HiPEAC 2019 Workshop - Use Cases
 
EFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the DesktopEFL: Scaling From the Embedded World to the Desktop
EFL: Scaling From the Embedded World to the Desktop
 
Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill) Developing Next-Generation Games with Stage3D (Molehill)
Developing Next-Generation Games with Stage3D (Molehill)
 
FGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie TycoonFGS 2011: Making A Game With Molehill: Zombie Tycoon
FGS 2011: Making A Game With Molehill: Zombie Tycoon
 
Masked Software Occlusion Culling
Masked Software Occlusion CullingMasked Software Occlusion Culling
Masked Software Occlusion Culling
 

Kürzlich hochgeladen

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.Kamal Acharya
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...soginsider
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptNANDHAKUMARA10
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projectssmsksolar
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...SUHANI PANDEY
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086anil_gaur
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 

Kürzlich hochgeladen (20)

Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
Hazard Identification (HAZID) vs. Hazard and Operability (HAZOP): A Comparati...
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Block diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.pptBlock diagram reduction techniques in control systems.ppt
Block diagram reduction techniques in control systems.ppt
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects2016EF22_0 solar project report rooftop projects
2016EF22_0 solar project report rooftop projects
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
VIP Model Call Girls Kothrud ( Pune ) Call ON 8005736733 Starting From 5K to ...
 
Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086Minimum and Maximum Modes of microprocessor 8086
Minimum and Maximum Modes of microprocessor 8086
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
(INDIRA) Call Girl Bhosari Call Now 8617697112 Bhosari Escorts 24x7
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 

[Unite Seoul 2020] Mobile Graphics Best Practices for Artists

  • 1.
  • 2. Generative Art — Made with Unity Mobile Graphics Best Practices for Artists Unite Seoul 2020 Owen Wu | Developer Relations Engineer, Arm | owen.wu@arm.com
  • 3. Agenda 3 — Introduction — Texturing — Geometry — Shaders — Frame Rendering — Resources
  • 5. Texture Filtering - Trilinear — Trilinear - Like Bilinear but with added blur between mipmap level — Don’t use trilinear without mipmap — This filtering will remove noticeable change between mipmap by adding smooth transition — Trilinear filtering is still expensive on mobile — Use it with caution
  • 6. Texture Filtering - Anisotropic — Anisotropic - Make textures look better when viewed from different angle, which is good for ground level textures — Higher anisotropic level cost higher
  • 7. Texture Filtering — Use bilinear for balance between performance and visual quality — Trilinear will cost more memory bandwidth than bilinear and needs to be used selectively — Bilinear + 2x Anisotropic most of the time will look and perform better than Trilinear + 1x Anisotropic, so this combination can be better solution rather than using Trilinear — Keep the anisotropic level low — Using a level higher than 2 should be done very selectively for critical game assets – This is because higher anisotropic level will cost a lot more bandwidth and affect device battery life
  • 8. Always Use Mipmap If Camera Is Not Still — Using mipmapping will improve GPU performance — Less cache miss — Mipmapping also reduce texture aliasing and improve final image quality — Don’t use it on 2D objects
  • 9. Texture Color Space — Use linear color space rendering if using dynamic lighting — Check sRGB in texture inspector window — Textures that are not processed as color should NOT be used in sRGB color space (such as metallic, roughness, normal map, etc) — Current hardware supports sRGB format and hardware will do Gamma correction automatically for free
  • 10. Texture Compression — ASTC may get better quality with same memory size as ETC or same quality with less memory size than ETC — ASTC may take longer to encode compared to ETC - use it on final packaging of the game — ASTC allows more control in terms of quality by allowing to set block size - 5x5 or 6x6 is good default
  • 11. Texture Channel Packing — Use texture channels to pack multiple textures into one — Commonly used to pack roughness, or smoothness, and metallic into one texture — Can be applied for any texture mask — Make good use of alpha channel
  • 13. Avoid Rendering Small Triangles — The bandwidth and processing cost of a vertex is typically orders of magnitude higher than the cost of processing a fragment — Make sure that you get many pixels worth of fragment work for each primitive — Use dynamic mesh level-of-detail, using simpler meshes when objects are further away from the camera — Make sure each model which create at least 10-20 fragments per primitive
  • 14. Avoid Rendering Long Thin Triangles — More expensive for the GPU to process when compared with normal triangles — GPUs process pixels in quad blocks — Long thin triangle edges will waste more GPU power to rasterize — Adjacent long thin triangles will waste doubly
  • 15. Avoid Duplicating Vertices — Reuse as many vertices as possible — Transformed vertex data can be cached to save computation power — Avoid duplicating vertices unless it’s necessary V0 V1 V2 V3 V4 V0 V1 V2 V3 V5 V4 V7 V6 V8 T1 : (V0, V1, V2) T2 : (V1, V3, V2) T3 : (V2, V3, V4) T1 : (V0, V1, V2) T2 : (V3, V4, V5) T3 : (V6, V7, V8) GOOD BAD
  • 16. Instancing — Render many objects using the same mesh — Each instance can have its own properties — Reduce the number of draw call and memory bandwidth — Check the “Enable GPU Instancing” option in material — Then use UNITY_ACCESS_INSTANCED_PROP() in shader to access the instance properties
  • 18. Shader Floating-point Precision — Use mediump and highp keywords — Full FP32 of vertex attributes is unnecessary for many uses of attribute data — Keep the data at the minimum precision needed to produce an acceptable final output — Use FP32 for computing vertex positions only — Use the lowest possible precision for other attributes — Don’t always use FP32 for everything — Don’t upload FP32 data into a buffer and then read it as a mediump attribute
  • 19. Take Advantage of Early-Z — Many fragments are occluded by other fragments — Running fragment shader of occluded fragment is wasting GPU power — Render opaque object from front to back — Occluded fragment will be rejected before shading — Fragment writing out depth/stencil will go Late-Z path which rejects occluded fragment after fragment shader — Fragment using discard or Alpha-to-coverage will be forced to do Late-Z and may stall the pipeline Early Frag Op Fragment Shader Late Frag Op
  • 20. Avoid Heavy Overdraw — Overdraw means one pixel has been rendered more than once — Alpha blending overdraw is expensive on mobile — Use Unity built-in display feature to check the amount of overdraw — Use Arm Mobile Studio to check the in-game overdraw — Brighter area means more overdraw — Render from front to back order to reduce the overdraw — Optimize arrangement of layer, sorting layer, render queue and camera setting to avoid overdraw
  • 21. Reduce the Amount of Alpha Blending/Tested Fragments — Separate transparent mesh from opaque mesh — Use polygon mesh instead of quad for transparent texture — Both ways can reduce the amount of transparent fragments and improve performance
  • 22. Dynamic Branching — Dynamic branching in shader is not as expensive as most developers think, but… — Both sides of branch will be executed and pick one if the branching area is too small — Shader compiler will optimize it automatically — Use dynamic branching when it can skip enough computation
  • 24. Reduce Render State Switch — Render state switch is very expensive operation — Rendering as many primitives as possible before render state(SetPass) switch — Don’t just check number of draw calls or batches — Number of render state switch is also an important index — Check Tris/SetPass (i.e. 95.2K/34) — Batch as many draw calls as possible – Static batching – GPU Instancing – Dynamic batching
  • 25. Reduce Frame Buffer Switch — Bind each frame buffer only once — Making all required draw calls before switching to the next frame buffer — Avoid unnecessary render buffer switch — Can reduce memory bandwidth requirement and power consumption (~100mW for 1GB/s) — Use Unity frame debugger to check — Use Arm Mobile Studio to do API level check
  • 26. Clear Frame Buffer Before Rendering — Before rendering, GPU will read frame buffer into tile memory from external memory — Minimizing tile loads at renderpass start — Can cheaply initialize the tile memory to a clear color value — Ensure that you clear or invalidate all of your attachments at the start of each render pass — Use Unity frame debugger to check — Use Arm Mobile Studio to do API level check Doesn’t clear before rendering Bad for performance
  • 27. Reduce Frame Buffer Write — After rendering, GPU will write result from tile memory to external memory — Minimizing tile stores at renderpass end — Avoid writing back to external memory whenever is possible — Don’t bind depth/stencil buffer if depth/stencil value is not used — Use RenderTexture.DiscardContents() to invalidate frame buffers if you don’t need the data at next frame — Use Unity frame debugger to check — Use Arm Mobile Studio to do API level check
  • 29. Generative Art — Made with Unity Arm Mobile Studio – Free Tool for Mobile Optimization • https://developer.arm.com/mobile-studio Arm Guide for Unity Developers • https://developer.arm.com/solutions/graphics-and-gaming/gaming- engine/unity/arm-guide-for-unity-developers 모바일 게임 아티스트를 위한 베스트 프랙티스 가이드 • https://blogs.unity3d.com/kr/2020/04/07/artists-best-practices-for- mobile-game-development/ Arm DevRel • developer@arm.com