SlideShare a Scribd company logo
WHO WE ARE:
PLARIUM GLOBAL
We’re one of the world’s fastest growing developers of mobile, social
and web-based games with over 250M registrations and 3M DAU.
● Founded in 2009
● HQ in Israel
● 8 Offices & Studios
We’re home to some of the best talent in the social and mobile gaming industry.
Over 1200 professionals in 8 offices and development studios across Europe
and the United States.
OPTIMIZING
GPU PERFORMANCE OF
RAID: SHADOW LEGENDS
Without Graphics Programmers
Stanislav
Herasymenko
Lead Technical Artist
Copyright Plarium Global LTD. 2019
Do not distribute
INTRODUCTION
What Is Raid: Shadow Legends
...And Who Is This Guy?
Copyright Plarium Global LTD. 2019
Do not distribute
Copyright Plarium Global LTD. 2019
Do not distribute
6Graphical Tricks in Raid: Shadow Legends
RAID: SHADOW LEGENDS
INTRODUCTION
■ Hero collector RPG
■ Realistic “Dark fantasy”
graphic style
■ 7 million downloads
■ 500k active players
■ Users spend 30 mins/day
in Raid
■ Featured in Google Play
and Apple App Store
Copyright Plarium Global LTD. 2019
Do not distribute
7Graphical Tricks in Raid: Shadow Legends
TECHNICAL ART TEAM
INTRODUCTION
Copyright Plarium Global LTD. 2019
Do not distribute
8Graphical Tricks in Raid: Shadow Legends
RENDERING OVERVIEW
INTRODUCTION
■ Characters
■ Environment
■ Shadows
■ Particles
■ Reflections
■ Effects
■ Bloom
Copyright Plarium Global LTD. 2019
Do not distribute
9Graphical Tricks in Raid: Shadow Legends
XCODE FRAME CAPTURE
INTRODUCTION
Copyright Plarium Global LTD. 2019
Do not distribute
10Graphical Tricks in Raid: Shadow Legends
UNITY FRAME DEBUGGER
INTRODUCTION
Copyright Plarium Global LTD. 2019
Do not distribute
ENVIRONMENT
RENDERING
Tiles | Shadows | Lightmaps | ShaderGUI
Copyright Plarium Global LTD. 2019
Do not distribute
12Graphical Tricks in Raid: Shadow Legends
ENVIRONMENT SHADER
ENVIRONMENT RENDERING
■ Fills a large screen area
■ Supports texture blending
■ Highest priority
for optimization
■ Can be used in different
variations: with or without
lightmaps, with or without
texture blending, etc.
Copyright Plarium Global LTD. 2019
Do not distribute
13Graphical Tricks in Raid: Shadow Legends
ENVIRONMENT SHADER
ENVIRONMENT RENDERING
Total frame time:
5.8 ms
Total environment
time: 1.87 ms (32%)
Copyright Plarium Global LTD. 2019
Do not distribute
14Graphical Tricks in Raid: Shadow Legends
BENEFITS OF SHADERGUI
ENVIRONMENT RENDERING
var tilesHaveAlpha = false;
if (secondTex || thirdTex)
{
var textureProps = new[] {_mainTex, _secondTex, _thirdTex};
foreach (var tex in textureProps)
{
if (tex.textureValue == null)
continue;
var path = AssetDatabase.GetAssetPath(tex.textureValue);
var textureImporter = (TextureImporter) AssetImporter.GetAtPath(path);
if (!textureImporter.DoesSourceTextureHaveAlpha())
continue;
tilesHaveAlpha = true;
break;
}
if (tilesHaveAlpha)
{
_depthBlend.floatValue = 1;
material.EnableKeyword("DEPTHBLEND");
_materialEditor.ShaderProperty(_depth, _depth.displayName);
}
else
{
_depthBlend.floatValue = 0;
material.DisableKeyword("DEPTHBLEND");
}
Copyright Plarium Global LTD. 2019
Do not distribute
15Graphical Tricks in Raid: Shadow Legends
SHADOW FILTERING
ENVIRONMENT RENDERING
■ Soft shadows
■ Rendering cost of depth test
■ Limited number
of shadowcasters
■ Low shadow resolution
■ Controlled environment
OFF ON
Copyright Plarium Global LTD. 2019
Do not distribute
16Graphical Tricks in Raid: Shadow Legends
SHADOW MASKS
ENVIRONMENT RENDERING
■ We position the shadow mask camera
not according to camera position, but
based on average character position.
■ No need to do any shadow related
computations in environment shader,
we just multiply it by shadow mask
texture, and that’s it.
■ Blur is applied to low res shadow pass.
Copyright Plarium Global LTD. 2019
Do not distribute
17Graphical Tricks in Raid: Shadow Legends
SHADOWS IN XCODE
ENVIRONMENT RENDERING
Shadow mask rendering took
1.94 ms, or 9.2% of frame
time on iPad Air.
Copyright Plarium Global LTD. 2019
Do not distribute
CHARACTER
RENDERING
A Song Of PBR Ice & Fire
Copyright Plarium Global LTD. 2019
Do not distribute
19Graphical Tricks in Raid: Shadow Legends
CHARACTER SHADER
CHARACTER RENDERING
■ About surface shaders
■ PBR
■ Shader Forge
■ Channels
■ “Freeze”
■ Other Effects
Copyright Plarium Global LTD. 2019
Do not distribute
20Graphical Tricks in Raid: Shadow Legends
CHARACTER EFFECTS
CHARACTER RENDERING
Copyright Plarium Global LTD. 2019
Do not distribute
21Graphical Tricks in Raid: Shadow Legends
CHARACTERS IN XCODE
CHARACTER RENDERING
Copyright Plarium Global LTD. 2019
Do not distribute
22Graphical Tricks in Raid: Shadow Legends
DEVICE-BASED SETTINGS ADJUSTMENT
CHARACTER RENDERING
Copyright Plarium Global LTD. 2019
Do not distribute
23Graphical Tricks in Raid: Shadow Legends
PROFILING ON DIFFERENT DEVICES
CHARACTER RENDERING
Copyright Plarium Global LTD. 2019
Do not distribute
24Graphical Tricks in Raid: Shadow Legends
SHADOW MAPS?
CHARACTER RENDERING
Copyright Plarium Global LTD. 2019
Do not distribute
25Graphical Tricks in Raid: Shadow Legends
MULTI COMPILE ISSUES
CHARACTER RENDERING
#pragma shader_feature __ VERTEX_ANIMATION
#pragma shader_feature __ EMISSION
#pragma multi_compile __ CHARACTERSHADOWS
#pragma multi_compile __ MATCAP
#pragma multi_compile __ FREEZE
#pragma multi_compile __ INVISIBILITY
#pragma multi_compile_shadowcaster
#pragma multi_compile_instancing
#pragma multi_compile_fwdbase_fullshadows
#define LIGHTPROBE_SH 1
Copyright Plarium Global LTD. 2019
Do not distribute
VISUAL EFFECTS
Artistic Freedom VS Hardware
Copyright Plarium Global LTD. 2019
Do not distribute
27Graphical Tricks in Raid: Shadow Legends
OVERDRAW :(
VISUAL EFFECTS
iPad Air 2 (2014)
Lava particles rendering
took 3.26 ms,
Other particles and
transparent effect parts
took 5.82 ms.
As a result, total frame
time went up to
20.6 ms, which is
substantially more than
target 16 ms.
Copyright Plarium Global LTD. 2019
Do not distribute
28Graphical Tricks in Raid: Shadow Legends
OVERDRAW
VISUAL EFFECTS
iPad Air 2 (2014)
Blades effect rendering
took 0.05 ms,
Other particles and
transparent effect parts
took 3.6 ms.
Total frame time in this
case is 12.8 ms, which is
good.
Copyright Plarium Global LTD. 2019
Do not distribute
29Graphical Tricks in Raid: Shadow Legends
RAIN EFFECT
VISUAL EFFECTS
iPad Air 2 (2014)
Rain took 0.504 ms
to render.
Vertex shader took
0.405 ms.
Copyright Plarium Global LTD. 2019
Do not distribute
30Graphical Tricks in Raid: Shadow Legends
RAIN EFFECT
VISUAL EFFECTS
float random = v.uv2.y;
float secondRandom = v.uv3.x;
float thirdRandom = v.uv3.y;
float startTime = lerp(0.0f, _BurstTime, random);
float particleLifetime = _Lifetime - startTime;
float maxLifetime = lerp(_MinLifetime, _MaxLifetime, secondRandom);
particleLifetime = fmod(particleLifetime, maxLifetime);
particleLifetime = max(0, particleLifetime);
float timeRatio = particleLifetime/maxLifetime;
float4 particlePos = float4(v.uv1.x, v.uv1.y, v.uv2.x, 1.0f);
float particleSpeed = lerp(_MaxSpeed, _MinSpeed, thirdRandom);
particleSpeed = lerp(particleSpeed, particleSpeed * _SpeedDamp, timeRatio);
_Force *= particleLifetime * particleSpeed;
float4 movement = float4(_Force.x, _Force.y, _Force.z, 0.0);
float4 worldCoord = mul(unity_ObjectToWorld, particlePos) + mul(unity_ObjectToWorld, movement);
float4 viewPos = mul(UNITY_MATRIX_V, worldCoord) + float4(v.vertex.xyz, 1) - particlePos;
float4 outPos = mul(UNITY_MATRIX_P, viewPos);
o.vertex = outPos;
Copyright Plarium Global LTD. 2019
Do not distribute
31Graphical Tricks in Raid: Shadow Legends
Copyright Plarium Global LTD. 2019
Do not distribute
32Graphical Tricks in Raid: Shadow Legends
BLOOM
VISUAL EFFECTS
OFF ON
Copyright Plarium Global LTD. 2019
Do not distribute
33Graphical Tricks in Raid: Shadow Legends
BLOOM
VISUAL EFFECTS
● We really want it
● Low Resolution Buffer
● We only need it for VFX
● We can manage without depth
testing for bloom
● Post effects are normally drawn
on full screen and cause a lot of
overdraw
Copyright Plarium Global LTD. 2019
Do not distribute
34Graphical Tricks in Raid: Shadow Legends
BLOOM OPTIMIZATION
VISUAL EFFECTS
Copyright Plarium Global LTD. 2019
Do not distribute
35Graphical Tricks in Raid: Shadow Legends
BLOOM OPTIMIZATION
VISUAL EFFECTS
Copyright Plarium Global LTD. 2019
Do not distribute
36Graphical Tricks in Raid: Shadow Legends
BLOOM OPTIMIZATION
VISUAL EFFECTS
o.vertex = float4(v.vertex.xy * 2, 0, 1);
o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
float2 sampleMiddle = float2(0.5f / _NumberOfQuads.x, 0.5f / _NumberOfQuads.y) + v.texcoord1;
float2 sampleLowLeft = v.texcoord1;
float2 sampleLowRight = float2(1.0f / _NumberOfQuads.x, 0.0f) + v.texcoord1;
float2 sampleUpLeft = float2(0.0f, 1.0f / _NumberOfQuads.y) + v.texcoord1;
float2 sampleUpRight = float2(1.0f / _NumberOfQuads.x, 1.0f / _NumberOfQuads.y) + v.texcoord1;
float4 texSample = tex2Dlod(_MainTex, float4(sampleMiddle, 0.0f, 0.0f));
texSample += tex2Dlod(_MainTex, float4(sampleLowLeft, 0.0f, 0.0f));
texSample += tex2Dlod(_MainTex, float4(sampleLowRight, 0.0f, 0.0f));
texSample += tex2Dlod(_MainTex, float4(sampleUpLeft, 0.0f, 0.0f));
texSample += tex2Dlod(_MainTex, float4(sampleUpRight, 0.0f, 0.0f));
if(texSample.r + texSample.g + texSample.b < 0.0001f)
{
o.vertex = float4(0.0f, 0.0f, 0.0f, 0.0f);
}
Copyright Plarium Global LTD. 2019
Do not distribute
37Graphical Tricks in Raid: Shadow Legends
Copyright Plarium Global LTD. 2019
Do not distribute
38Graphical Tricks in Raid: Shadow Legends
LIGHT SHAFTS
VISUAL EFFECTS
Scene View Game View
Copyright Plarium Global LTD. 2019
Do not distribute
39Graphical Tricks in Raid: Shadow Legends
SIMPLE VS MEGA SHADERS
VISUAL EFFECTS
Copyright Plarium Global LTD. 2019
Do not distribute
40Graphical Tricks in Raid: Shadow Legends
ANDROID PROFILING
VISUAL EFFECTS
■ GAPID – good for general frame
overview, but any profiling information
is missing (you don’t get your FPS
or frame time metrics).
■ Snapdragon Profiler – better, you can
get many useful performance metrics.
Has a snapshot feature, though
I couldn't get it to work with our game.
Copyright Plarium Global LTD. 2019
Do not distribute
CONCLUSIONS
We Are Definitely Not Perfect
Copyright Plarium Global LTD. 2019
Do not distribute
42Graphical Tricks in Raid: Shadow Legends
SOME THINGS WENT WRONG
CONCLUSIONS
■ Frame drops occur on some devices
■ Some effects need optimization
■ There are many places in our game
with noticeable lags
■ Our VFX shader workflow can be optimized
■ Character shader can be optimized
Copyright Plarium Global LTD. 2019
Do not distribute
43Graphical Tricks in Raid: Shadow Legends
SOME THINGS WENT RIGHT
CONCLUSIONS
■ Most people think that the game looks good
■ It runs on most modern phones
■ Graphical performance is acceptable
■ Some parts are decently optimized (environment shader)
■ There is a lot of content (including VFX), this was crucial
for game’s success
■ The game is overall successful
■ 120 fps on iPad Pros with 120Hz screens
Copyright Plarium Global LTD. 2019
Do not distribute
JOIN US
talents@plarium.com
linkedin.com/company/plarium
instagram.com/plarium
company.plarium.com
Copyright Plarium Global LTD. 2019
Do not distribute
QUESTIONS?
https://docs.google.com/presentation/d/1
pZt8k1EjMFuxdRLekwpze8nzcyEW0u4E
HVeko6u0BKs/edit?usp=sharing
Copyright Plarium Global LTD. 2019
Do not distribute
THANK YOU
Optimizing GPU Performance of Raid: Shadow Legends – Unite Copenhagen 2019

More Related Content

More from Unity Technologies

Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity Technologies
 
Turn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesTurn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiences
Unity Technologies
 
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
Unity Technologies
 
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
Unity Technologies
 
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
Unity Technologies
 
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Unity Technologies
 
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Unity Technologies
 
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
Unity Technologies
 
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Unity Technologies
 
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Unity Technologies
 
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
Unity Technologies
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
Unity Technologies
 
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Unity Technologies
 
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
Unity Technologies
 
Visualizing the engineering project lifecycle - Unite Copenhagen
Visualizing the engineering project lifecycle - Unite CopenhagenVisualizing the engineering project lifecycle - Unite Copenhagen
Visualizing the engineering project lifecycle - Unite Copenhagen
Unity Technologies
 
Driving AEC into a new age - Unite Copenhagen 2019
Driving AEC into a new age - Unite Copenhagen 2019Driving AEC into a new age - Unite Copenhagen 2019
Driving AEC into a new age - Unite Copenhagen 2019
Unity Technologies
 
A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019
Unity Technologies
 
Mesh sculpting for realistic terrain features - Unite Copenhagen 2019
Mesh sculpting for realistic terrain features - Unite Copenhagen 2019 Mesh sculpting for realistic terrain features - Unite Copenhagen 2019
Mesh sculpting for realistic terrain features - Unite Copenhagen 2019
Unity Technologies
 
Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019
Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019
Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019
Unity Technologies
 
The benefits of running simulations in the cloud vs. on-premise – Unite Copen...
The benefits of running simulations in the cloud vs. on-premise – Unite Copen...The benefits of running simulations in the cloud vs. on-premise – Unite Copen...
The benefits of running simulations in the cloud vs. on-premise – Unite Copen...
Unity Technologies
 

More from Unity Technologies (20)

Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019Unity XR platform has a new architecture – Unite Copenhagen 2019
Unity XR platform has a new architecture – Unite Copenhagen 2019
 
Turn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiencesTurn Revit Models into real-time 3D experiences
Turn Revit Models into real-time 3D experiences
 
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
How Daimler uses mobile mixed realities for training and sales - Unite Copenh...
 
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
How Volvo embraced real-time 3D and shook up the auto industry- Unite Copenha...
 
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019QA your code: The new Unity Test Framework – Unite Copenhagen 2019
QA your code: The new Unity Test Framework – Unite Copenhagen 2019
 
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
Engineering.com webinar: Real-time 3D and digital twins: The power of a virtu...
 
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...Supplying scalable VR training applications with Innoactive - Unite Copenhage...
Supplying scalable VR training applications with Innoactive - Unite Copenhage...
 
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
XR and real-time 3D in automotive digital marketing strategies | Visionaries ...
 
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
Real-time CG animation in Unity: unpacking the Sherman project - Unite Copenh...
 
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
Creating next-gen VR and MR experiences using Varjo VR-1 and XR-1 - Unite Cop...
 
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
What's ahead for film and animation with Unity 2020 - Unite Copenhagen 2019
 
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
How to Improve Visual Rendering Quality in VR - Unite Copenhagen 2019
 
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
Digital twins: the power of a virtual visual copy - Unite Copenhagen 2019
 
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
Virtual or real? AR Foundation best practices from Krikey - Unite Copenhagen ...
 
Visualizing the engineering project lifecycle - Unite Copenhagen
Visualizing the engineering project lifecycle - Unite CopenhagenVisualizing the engineering project lifecycle - Unite Copenhagen
Visualizing the engineering project lifecycle - Unite Copenhagen
 
Driving AEC into a new age - Unite Copenhagen 2019
Driving AEC into a new age - Unite Copenhagen 2019Driving AEC into a new age - Unite Copenhagen 2019
Driving AEC into a new age - Unite Copenhagen 2019
 
A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019A split screen-viable UI event system - Unite Copenhagen 2019
A split screen-viable UI event system - Unite Copenhagen 2019
 
Mesh sculpting for realistic terrain features - Unite Copenhagen 2019
Mesh sculpting for realistic terrain features - Unite Copenhagen 2019 Mesh sculpting for realistic terrain features - Unite Copenhagen 2019
Mesh sculpting for realistic terrain features - Unite Copenhagen 2019
 
Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019
Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019
Bringing 2D characters to life with sprite rigging - Unite Copenhagen 2019
 
The benefits of running simulations in the cloud vs. on-premise – Unite Copen...
The benefits of running simulations in the cloud vs. on-premise – Unite Copen...The benefits of running simulations in the cloud vs. on-premise – Unite Copen...
The benefits of running simulations in the cloud vs. on-premise – Unite Copen...
 

Recently uploaded

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Optimizing GPU Performance of Raid: Shadow Legends – Unite Copenhagen 2019

  • 1.
  • 2. WHO WE ARE: PLARIUM GLOBAL We’re one of the world’s fastest growing developers of mobile, social and web-based games with over 250M registrations and 3M DAU. ● Founded in 2009 ● HQ in Israel ● 8 Offices & Studios We’re home to some of the best talent in the social and mobile gaming industry. Over 1200 professionals in 8 offices and development studios across Europe and the United States.
  • 3. OPTIMIZING GPU PERFORMANCE OF RAID: SHADOW LEGENDS Without Graphics Programmers Stanislav Herasymenko Lead Technical Artist
  • 4. Copyright Plarium Global LTD. 2019 Do not distribute INTRODUCTION What Is Raid: Shadow Legends ...And Who Is This Guy?
  • 5. Copyright Plarium Global LTD. 2019 Do not distribute
  • 6. Copyright Plarium Global LTD. 2019 Do not distribute 6Graphical Tricks in Raid: Shadow Legends RAID: SHADOW LEGENDS INTRODUCTION ■ Hero collector RPG ■ Realistic “Dark fantasy” graphic style ■ 7 million downloads ■ 500k active players ■ Users spend 30 mins/day in Raid ■ Featured in Google Play and Apple App Store
  • 7. Copyright Plarium Global LTD. 2019 Do not distribute 7Graphical Tricks in Raid: Shadow Legends TECHNICAL ART TEAM INTRODUCTION
  • 8. Copyright Plarium Global LTD. 2019 Do not distribute 8Graphical Tricks in Raid: Shadow Legends RENDERING OVERVIEW INTRODUCTION ■ Characters ■ Environment ■ Shadows ■ Particles ■ Reflections ■ Effects ■ Bloom
  • 9. Copyright Plarium Global LTD. 2019 Do not distribute 9Graphical Tricks in Raid: Shadow Legends XCODE FRAME CAPTURE INTRODUCTION
  • 10. Copyright Plarium Global LTD. 2019 Do not distribute 10Graphical Tricks in Raid: Shadow Legends UNITY FRAME DEBUGGER INTRODUCTION
  • 11. Copyright Plarium Global LTD. 2019 Do not distribute ENVIRONMENT RENDERING Tiles | Shadows | Lightmaps | ShaderGUI
  • 12. Copyright Plarium Global LTD. 2019 Do not distribute 12Graphical Tricks in Raid: Shadow Legends ENVIRONMENT SHADER ENVIRONMENT RENDERING ■ Fills a large screen area ■ Supports texture blending ■ Highest priority for optimization ■ Can be used in different variations: with or without lightmaps, with or without texture blending, etc.
  • 13. Copyright Plarium Global LTD. 2019 Do not distribute 13Graphical Tricks in Raid: Shadow Legends ENVIRONMENT SHADER ENVIRONMENT RENDERING Total frame time: 5.8 ms Total environment time: 1.87 ms (32%)
  • 14. Copyright Plarium Global LTD. 2019 Do not distribute 14Graphical Tricks in Raid: Shadow Legends BENEFITS OF SHADERGUI ENVIRONMENT RENDERING var tilesHaveAlpha = false; if (secondTex || thirdTex) { var textureProps = new[] {_mainTex, _secondTex, _thirdTex}; foreach (var tex in textureProps) { if (tex.textureValue == null) continue; var path = AssetDatabase.GetAssetPath(tex.textureValue); var textureImporter = (TextureImporter) AssetImporter.GetAtPath(path); if (!textureImporter.DoesSourceTextureHaveAlpha()) continue; tilesHaveAlpha = true; break; } if (tilesHaveAlpha) { _depthBlend.floatValue = 1; material.EnableKeyword("DEPTHBLEND"); _materialEditor.ShaderProperty(_depth, _depth.displayName); } else { _depthBlend.floatValue = 0; material.DisableKeyword("DEPTHBLEND"); }
  • 15. Copyright Plarium Global LTD. 2019 Do not distribute 15Graphical Tricks in Raid: Shadow Legends SHADOW FILTERING ENVIRONMENT RENDERING ■ Soft shadows ■ Rendering cost of depth test ■ Limited number of shadowcasters ■ Low shadow resolution ■ Controlled environment OFF ON
  • 16. Copyright Plarium Global LTD. 2019 Do not distribute 16Graphical Tricks in Raid: Shadow Legends SHADOW MASKS ENVIRONMENT RENDERING ■ We position the shadow mask camera not according to camera position, but based on average character position. ■ No need to do any shadow related computations in environment shader, we just multiply it by shadow mask texture, and that’s it. ■ Blur is applied to low res shadow pass.
  • 17. Copyright Plarium Global LTD. 2019 Do not distribute 17Graphical Tricks in Raid: Shadow Legends SHADOWS IN XCODE ENVIRONMENT RENDERING Shadow mask rendering took 1.94 ms, or 9.2% of frame time on iPad Air.
  • 18. Copyright Plarium Global LTD. 2019 Do not distribute CHARACTER RENDERING A Song Of PBR Ice & Fire
  • 19. Copyright Plarium Global LTD. 2019 Do not distribute 19Graphical Tricks in Raid: Shadow Legends CHARACTER SHADER CHARACTER RENDERING ■ About surface shaders ■ PBR ■ Shader Forge ■ Channels ■ “Freeze” ■ Other Effects
  • 20. Copyright Plarium Global LTD. 2019 Do not distribute 20Graphical Tricks in Raid: Shadow Legends CHARACTER EFFECTS CHARACTER RENDERING
  • 21. Copyright Plarium Global LTD. 2019 Do not distribute 21Graphical Tricks in Raid: Shadow Legends CHARACTERS IN XCODE CHARACTER RENDERING
  • 22. Copyright Plarium Global LTD. 2019 Do not distribute 22Graphical Tricks in Raid: Shadow Legends DEVICE-BASED SETTINGS ADJUSTMENT CHARACTER RENDERING
  • 23. Copyright Plarium Global LTD. 2019 Do not distribute 23Graphical Tricks in Raid: Shadow Legends PROFILING ON DIFFERENT DEVICES CHARACTER RENDERING
  • 24. Copyright Plarium Global LTD. 2019 Do not distribute 24Graphical Tricks in Raid: Shadow Legends SHADOW MAPS? CHARACTER RENDERING
  • 25. Copyright Plarium Global LTD. 2019 Do not distribute 25Graphical Tricks in Raid: Shadow Legends MULTI COMPILE ISSUES CHARACTER RENDERING #pragma shader_feature __ VERTEX_ANIMATION #pragma shader_feature __ EMISSION #pragma multi_compile __ CHARACTERSHADOWS #pragma multi_compile __ MATCAP #pragma multi_compile __ FREEZE #pragma multi_compile __ INVISIBILITY #pragma multi_compile_shadowcaster #pragma multi_compile_instancing #pragma multi_compile_fwdbase_fullshadows #define LIGHTPROBE_SH 1
  • 26. Copyright Plarium Global LTD. 2019 Do not distribute VISUAL EFFECTS Artistic Freedom VS Hardware
  • 27. Copyright Plarium Global LTD. 2019 Do not distribute 27Graphical Tricks in Raid: Shadow Legends OVERDRAW :( VISUAL EFFECTS iPad Air 2 (2014) Lava particles rendering took 3.26 ms, Other particles and transparent effect parts took 5.82 ms. As a result, total frame time went up to 20.6 ms, which is substantially more than target 16 ms.
  • 28. Copyright Plarium Global LTD. 2019 Do not distribute 28Graphical Tricks in Raid: Shadow Legends OVERDRAW VISUAL EFFECTS iPad Air 2 (2014) Blades effect rendering took 0.05 ms, Other particles and transparent effect parts took 3.6 ms. Total frame time in this case is 12.8 ms, which is good.
  • 29. Copyright Plarium Global LTD. 2019 Do not distribute 29Graphical Tricks in Raid: Shadow Legends RAIN EFFECT VISUAL EFFECTS iPad Air 2 (2014) Rain took 0.504 ms to render. Vertex shader took 0.405 ms.
  • 30. Copyright Plarium Global LTD. 2019 Do not distribute 30Graphical Tricks in Raid: Shadow Legends RAIN EFFECT VISUAL EFFECTS float random = v.uv2.y; float secondRandom = v.uv3.x; float thirdRandom = v.uv3.y; float startTime = lerp(0.0f, _BurstTime, random); float particleLifetime = _Lifetime - startTime; float maxLifetime = lerp(_MinLifetime, _MaxLifetime, secondRandom); particleLifetime = fmod(particleLifetime, maxLifetime); particleLifetime = max(0, particleLifetime); float timeRatio = particleLifetime/maxLifetime; float4 particlePos = float4(v.uv1.x, v.uv1.y, v.uv2.x, 1.0f); float particleSpeed = lerp(_MaxSpeed, _MinSpeed, thirdRandom); particleSpeed = lerp(particleSpeed, particleSpeed * _SpeedDamp, timeRatio); _Force *= particleLifetime * particleSpeed; float4 movement = float4(_Force.x, _Force.y, _Force.z, 0.0); float4 worldCoord = mul(unity_ObjectToWorld, particlePos) + mul(unity_ObjectToWorld, movement); float4 viewPos = mul(UNITY_MATRIX_V, worldCoord) + float4(v.vertex.xyz, 1) - particlePos; float4 outPos = mul(UNITY_MATRIX_P, viewPos); o.vertex = outPos;
  • 31. Copyright Plarium Global LTD. 2019 Do not distribute 31Graphical Tricks in Raid: Shadow Legends
  • 32. Copyright Plarium Global LTD. 2019 Do not distribute 32Graphical Tricks in Raid: Shadow Legends BLOOM VISUAL EFFECTS OFF ON
  • 33. Copyright Plarium Global LTD. 2019 Do not distribute 33Graphical Tricks in Raid: Shadow Legends BLOOM VISUAL EFFECTS ● We really want it ● Low Resolution Buffer ● We only need it for VFX ● We can manage without depth testing for bloom ● Post effects are normally drawn on full screen and cause a lot of overdraw
  • 34. Copyright Plarium Global LTD. 2019 Do not distribute 34Graphical Tricks in Raid: Shadow Legends BLOOM OPTIMIZATION VISUAL EFFECTS
  • 35. Copyright Plarium Global LTD. 2019 Do not distribute 35Graphical Tricks in Raid: Shadow Legends BLOOM OPTIMIZATION VISUAL EFFECTS
  • 36. Copyright Plarium Global LTD. 2019 Do not distribute 36Graphical Tricks in Raid: Shadow Legends BLOOM OPTIMIZATION VISUAL EFFECTS o.vertex = float4(v.vertex.xy * 2, 0, 1); o.uv = TRANSFORM_TEX(v.texcoord, _MainTex); float2 sampleMiddle = float2(0.5f / _NumberOfQuads.x, 0.5f / _NumberOfQuads.y) + v.texcoord1; float2 sampleLowLeft = v.texcoord1; float2 sampleLowRight = float2(1.0f / _NumberOfQuads.x, 0.0f) + v.texcoord1; float2 sampleUpLeft = float2(0.0f, 1.0f / _NumberOfQuads.y) + v.texcoord1; float2 sampleUpRight = float2(1.0f / _NumberOfQuads.x, 1.0f / _NumberOfQuads.y) + v.texcoord1; float4 texSample = tex2Dlod(_MainTex, float4(sampleMiddle, 0.0f, 0.0f)); texSample += tex2Dlod(_MainTex, float4(sampleLowLeft, 0.0f, 0.0f)); texSample += tex2Dlod(_MainTex, float4(sampleLowRight, 0.0f, 0.0f)); texSample += tex2Dlod(_MainTex, float4(sampleUpLeft, 0.0f, 0.0f)); texSample += tex2Dlod(_MainTex, float4(sampleUpRight, 0.0f, 0.0f)); if(texSample.r + texSample.g + texSample.b < 0.0001f) { o.vertex = float4(0.0f, 0.0f, 0.0f, 0.0f); }
  • 37. Copyright Plarium Global LTD. 2019 Do not distribute 37Graphical Tricks in Raid: Shadow Legends
  • 38. Copyright Plarium Global LTD. 2019 Do not distribute 38Graphical Tricks in Raid: Shadow Legends LIGHT SHAFTS VISUAL EFFECTS Scene View Game View
  • 39. Copyright Plarium Global LTD. 2019 Do not distribute 39Graphical Tricks in Raid: Shadow Legends SIMPLE VS MEGA SHADERS VISUAL EFFECTS
  • 40. Copyright Plarium Global LTD. 2019 Do not distribute 40Graphical Tricks in Raid: Shadow Legends ANDROID PROFILING VISUAL EFFECTS ■ GAPID – good for general frame overview, but any profiling information is missing (you don’t get your FPS or frame time metrics). ■ Snapdragon Profiler – better, you can get many useful performance metrics. Has a snapshot feature, though I couldn't get it to work with our game.
  • 41. Copyright Plarium Global LTD. 2019 Do not distribute CONCLUSIONS We Are Definitely Not Perfect
  • 42. Copyright Plarium Global LTD. 2019 Do not distribute 42Graphical Tricks in Raid: Shadow Legends SOME THINGS WENT WRONG CONCLUSIONS ■ Frame drops occur on some devices ■ Some effects need optimization ■ There are many places in our game with noticeable lags ■ Our VFX shader workflow can be optimized ■ Character shader can be optimized
  • 43. Copyright Plarium Global LTD. 2019 Do not distribute 43Graphical Tricks in Raid: Shadow Legends SOME THINGS WENT RIGHT CONCLUSIONS ■ Most people think that the game looks good ■ It runs on most modern phones ■ Graphical performance is acceptable ■ Some parts are decently optimized (environment shader) ■ There is a lot of content (including VFX), this was crucial for game’s success ■ The game is overall successful ■ 120 fps on iPad Pros with 120Hz screens
  • 44. Copyright Plarium Global LTD. 2019 Do not distribute JOIN US talents@plarium.com linkedin.com/company/plarium instagram.com/plarium company.plarium.com
  • 45. Copyright Plarium Global LTD. 2019 Do not distribute QUESTIONS? https://docs.google.com/presentation/d/1 pZt8k1EjMFuxdRLekwpze8nzcyEW0u4E HVeko6u0BKs/edit?usp=sharing
  • 46. Copyright Plarium Global LTD. 2019 Do not distribute THANK YOU