July 14 2020
There are many shaders in Unity.
When choosing your next shader, you need to strike the balance between your dream visuals and the performance you take away.
But how much performance do your shaders steal?
Well, in my previous post I showed you a simple process to measure the performance cost of your shaders.
But today I’m doing something different.
Today, I’ll give you handy tables so you can see the performance cost of the commonly used Unity shaders.
Yes, now you can make informed decisions in your game 🙂
Here’s a few notes regarding these numbers:
And here’s the legend:
By the way, I suggest reading this on desktop…
Reading this on mobile will only hurt your eyesight.
I know because I tried. And my eyes still hurt after two days.
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | NONE | 1.4 | 13.0 | 0.0 | 0.0 | 0.3 | 0.0 | 0.5 | 0.5 |
NONE | UNITY UI ALPHACLIP | 1.4 | 13.0 | 0.0 | 0.0 | 0.4 | 0.0 | 0.5 | 0.5 |
NONE | UNITY UI CLIP RECT | 1.4 | 13.0 | 0.0 | 0.0 | 0.5 | 0.0 | 0.8 | 0.5 |
NONE | UNITY UI ALPHACLIP UNITY UI CLIP RECT | 1.4 | 13.0 | 0.0 | 0.0 | 0.7 | 0.0 | 0.8 | 0.5 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | NONE | 1.4 | 9.0 | 0.0 | 0.0 | 0.3 | 0.0 | 0.5 | 0.5 |
NONE | PIXELSNAP ON | 1.5 | 9.0 | 0.0 | 0.0 | 0.3 | 0.0 | 0.5 | 0.5 |
ETC1 EXTERNAL ALPHA | NONE | 1.4 | 9.0 | 0.0 | 0.0 | 0.4 | 0.0 | 0.5 | 1.0 |
ETC1 EXTERNAL ALPHA | PIXELSNAP ON | 1.5 | 9.0 | 0.0 | 0.0 | 0.4 | 0.0 | 0.5 | 1.0 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | SUNDISK NONE | 8.3 | 9.0 | 0.0 | 0.0 | 0.3 | 0.0 | 0.6 | 0.0 |
NONE | SUNDISK SIMPLE | 8.5 | 11.0 | 0.0 | 0.0 | 0.8 | 0.0 | 1.0 | 0.0 |
NONE | SUNDISK HIGH QUALITY | 8.4 | 11.0 | 0.0 | 0.0 | 1.7 | 0.0 | 1.1 | 0.0 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | NONE | 1.3 | 5.0 | 0.0 | 0.0 | 0.6 | 0.0 | 0.4 | 0.5 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | NONE (6x) | 1.2 | 6.0 | 0.0 | 0.0 | 0.5 | 0.0 | 0.3 | 0.5 |
Clearly, the procedural skybox shader is more expensive than its two alternatives.
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | NONE | 1.1 | 9.0 | 0.0 | 0.0 | 0.2 | 0.0 | 0.5 | 0.5 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
DIRECTIONAL | NONE | 1.8 | 13.0 | 0.0 | 0.0 | 1.5 | 0.0 | 1.0 | 1.0 |
DIRECTIONAL LIGHTPROBE SH | NONE | 3.6 | 15.0 | 0.0 | 0.0 | 1.5 | 0.0 | 1.3 | 1.0 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.2 | 15.0 | 0.0 | 0.0 | 2.0 | 0.0 | 1.5 | 1.5 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN | NONE | 2.7 | 17.0 | 0.0 | 0.0 | 4.6 | 0.0 | 1.8 | 3.0 |
DIRECTIONAL VERTEXLIGHT ON | NONE | 1.8 | 13.0 | 0.0 | 0.0 | 1.5 | 0.0 | 1.0 | 1.0 |
DIRECTIONAL LIGHTPROBE SH VERTEXLIGHT ON | NONE | 5.5 | 15.0 | 0.0 | 0.0 | 1.5 | 0.0 | 1.3 | 1.0 |
DIRECTIONAL SHADOWS SCREEN VERTEXLIGHT ON | NONE | 2.2 | 15.0 | 0.0 | 0.0 | 2.0 | 0.0 | 1.5 | 1.5 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN VERTEXLIGHT ON | NONE | 5.0 | 17.0 | 0.0 | 0.0 | 4.6 | 0.0 | 1.8 | 3.0 |
NONE | NONE | 1.8 | 8.0 | 0.0 | 0.0 | 0.3 | 0.0 | 0.4 | 0.0 |
NONE | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.9 | 0.0 | 1.1 | 1.0 |
LIGHTPROBE SH | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.9 | 0.0 | 1.1 | 1.0 |
UNITY HDR ON | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.5 | 0.0 | 1.1 | 1.0 |
LIGHTPROBE SH UNITY HDR ON | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.5 | 0.0 | 1.1 | 1.0 |
NONE | NONE | 1.8 | 13.0 | 0.0 | 0.0 | 0.6 | 0.0 | 0.6 | 0.5 |
LIGHTPROBE SH | NONE | 3.6 | 15.0 | 0.0 | 0.0 | 0.9 | 0.0 | 0.9 | 0.5 |
UNITY HDR ON | NONE | 1.8 | 13.0 | 0.0 | 0.0 | 0.6 | 0.0 | 0.6 | 0.5 |
LIGHTPROBE SH UNITY HDR ON | NONE | 3.6 | 15.0 | 0.0 | 0.0 | 0.7 | 0.0 | 0.9 | 0.5 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
DIRECTIONAL | NONE | 2.8 | 16.0 | 0.0 | 0.0 | 2.2 | 0.0 | 1.8 | 1.5 |
DIRECTIONAL LIGHTPROBE SH | NONE | 4.5 | 18.0 | 0.0 | 0.0 | 2.3 | 0.0 | 2.0 | 1.5 |
DIRECTIONAL SHADOWS SCREEN | NONE | 3.0 | 18.0 | 0.0 | 0.0 | 2.8 | 0.0 | 2.3 | 2.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN | NONE | 3.6 | 20.0 | 0.0 | 0.0 | 5.2 | 0.0 | 2.5 | 3.5 |
DIRECTIONAL VERTEXLIGHT ON | NONE | 2.8 | 16.0 | 0.0 | 0.0 | 2.2 | 0.0 | 1.8 | 1.5 |
DIRECTIONAL LIGHTPROBE SH VERTEXLIGHT ON | NONE | 6.3 | 18.0 | 0.0 | 0.0 | 2.3 | 0.0 | 2.0 | 1.5 |
DIRECTIONAL SHADOWS SCREEN VERTEXLIGHT ON | NONE | 3.0 | 18.0 | 0.0 | 0.0 | 2.8 | 0.0 | 2.3 | 2.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN VERTEXLIGHT ON | NONE | 6.0 | 20.0 | 0.0 | 0.0 | 5.2 | 0.0 | 2.5 | 3.5 |
NONE | NONE | 2.9 | 14.0 | 0.0 | 0.0 | 0.8 | 0.0 | 1.4 | 0.5 |
NONE | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.9 | 0.0 | 1.1 | 1.0 |
LIGHTPROBE SH | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.9 | 0.0 | 1.1 | 1.0 |
UNITY HDR ON | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.5 | 0.0 | 1.1 | 1.0 |
LIGHTPROBE SH UNITY HDR ON | NONE | 3.8 | 15.0 | 0.0 | 0.0 | 0.5 | 0.0 | 1.1 | 1.0 |
NONE | NONE | 2.8 | 16.0 | 0.0 | 0.0 | 1.3 | 0.0 | 1.4 | 1.0 |
LIGHTPROBE SH | NONE | 4.5 | 18.0 | 0.0 | 0.0 | 1.4 | 0.0 | 1.6 | 1.0 |
UNITY HDR ON | NONE | 2.8 | 16.0 | 0.0 | 0.0 | 1.3 | 0.0 | 1.4 | 1.0 |
LIGHTPROBE SH UNITY HDR ON | NONE | 4.5 | 18.0 | 0.0 | 0.0 | 1.3 | 0.0 | 1.6 | 1.0 |
As you can see, the bumped diffuse shader is considerably more expensive than the plain diffuse shader.
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | NONE | 1.2 | 3.0 | 0.0 | 0.0 | 0.2 | 0.0 | 0.0 | 0.0 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
NONE | NONE | 1.1 | 6.0 | 0.0 | 0.0 | 0.1 | 0.0 | 0.3 | 0.5 |
The unlit shaders are one of the cheapest shaders. The unlit texture variant more than doubles its performance cost.
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
DIRECTIONAL | NONE | 2.2 | 22.0 | 0.0 | 0.0 | 7.9 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 10.4 | 0.0 | 1.6 | 4.0 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.4 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 11.2 | 0.0 | 2.1 | 4.5 |
DIRECTIONAL VERTEXLIGHT ON | NONE | 2.2 | 22.0 | 0.0 | 0.0 | 7.9 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH VERTEXLIGHT ON | NONE | 4.9 | 22.0 | 0.0 | 0.0 | 10.4 | 0.0 | 1.6 | 4.0 |
DIRECTIONAL SHADOWS SCREEN VERTEXLIGHT ON | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.4 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN VERTEXLIGHT ON | NONE | 5.4 | 22.0 | 0.0 | 0.0 | 11.2 | 0.0 | 2.1 | 4.5 |
POINT | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 5.0 | 0.0 | 2.5 | 1.5 |
DIRECTIONAL | NONE | 2.3 | 20.0 | 0.0 | 0.0 | 4.4 | 0.0 | 2.5 | 1.0 |
SPOT | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 5.3 | 0.0 | 2.5 | 2.0 |
POINT COOKIE | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 5.3 | 0.0 | 2.5 | 2.0 |
DIRECTIONAL COOKIE | NONE | 2.9 | 22.0 | 0.0 | 0.0 | 4.5 | 0.0 | 2.5 | 1.5 |
SHADOWS DEPTH SPOT | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 6.3 | 0.0 | 2.5 | 2.5 |
SHADOWS DEPTH SHADOWS SOFT SPOT | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 6.7 | 0.0 | 2.5 | 4.0 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.5 | 20.0 | 0.0 | 0.0 | 4.9 | 0.0 | 3.0 | 1.5 |
DIRECTIONAL COOKIE SHADOWS SCREEN | NONE | 2.9 | 22.0 | 0.0 | 0.0 | 4.9 | 0.0 | 3.0 | 2.0 |
POINT SHADOWS CUBE | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 5.8 | 0.0 | 2.5 | 2.0 |
POINT SHADOWS CUBE SHADOWS SOFT | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 6.8 | 0.0 | 2.5 | 3.5 |
POINT COOKIE SHADOWS CUBE | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 6.1 | 0.0 | 2.5 | 2.5 |
POINT COOKIE SHADOWS CUBE SHADOWS SOFT | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 7.1 | 0.0 | 2.5 | 4.0 |
NONE | NONE | 2.3 | 20.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.6 | 1.0 |
LIGHTPROBE SH | NONE | 2.8 | 20.0 | 0.0 | 0.0 | 4.0 | 0.0 | 1.3 | 2.5 |
UNITY HDR ON | NONE | 2.3 | 20.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.6 | 1.0 |
LIGHTPROBE SH UNITY HDR ON | NONE | 2.8 | 20.0 | 0.0 | 0.0 | 3.6 | 0.0 | 1.3 | 2.5 |
DIRECTIONAL | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 3.4 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH | NONE | 4.3 | 22.0 | 0.0 | 0.0 | 3.8 | 0.0 | 1.6 | 2.5 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.4 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 11.2 | 0.0 | 2.1 | 4.5 |
DIRECTIONAL VERTEXLIGHT ON | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 3.4 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH VERTEXLIGHT ON | NONE | 6.3 | 22.0 | 0.0 | 0.0 | 3.8 | 0.0 | 1.6 | 2.5 |
DIRECTIONAL SHADOWS SCREEN VERTEXLIGHT ON | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.4 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN VERTEXLIGHT ON | NONE | 5.4 | 22.0 | 0.0 | 0.0 | 11.2 | 0.0 | 2.1 | 4.5 |
POINT | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 3.0 | 0.0 | 2.5 | 2.0 |
DIRECTIONAL | NONE | 2.5 | 20.0 | 0.0 | 0.0 | 2.5 | 0.0 | 2.5 | 1.5 |
SPOT | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 3.2 | 0.0 | 2.5 | 2.5 |
POINT COOKIE | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 3.2 | 0.0 | 2.5 | 2.5 |
DIRECTIONAL COOKIE | NONE | 3.1 | 22.0 | 0.0 | 0.0 | 2.8 | 0.0 | 2.5 | 2.0 |
SHADOWS DEPTH SPOT | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 2.9 | 0.0 | 2.5 | 2.5 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.5 | 20.0 | 0.0 | 0.0 | 4.9 | 0.0 | 3.0 | 1.5 |
DIRECTIONAL COOKIE SHADOWS SCREEN | NONE | 2.9 | 22.0 | 0.0 | 0.0 | 4.9 | 0.0 | 3.0 | 2.0 |
POINT SHADOWS CUBE | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 2.5 | 0.0 | 2.5 | 2.0 |
POINT COOKIE SHADOWS CUBE | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 2.7 | 0.0 | 2.5 | 2.5 |
Vertex Shader | Fragment Shader | |||||||
---|---|---|---|---|---|---|---|---|
Variant | A | LS | V | T | A | LS | V | T |
DIRECTIONAL | NONE | 2.2 | 22.0 | 0.0 | 0.0 | 7.5 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 10.3 | 0.0 | 1.6 | 4.0 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.2 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 11.0 | 0.0 | 2.1 | 4.5 |
DIRECTIONAL VERTEXLIGHT ON | NONE | 2.2 | 22.0 | 0.0 | 0.0 | 7.5 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH VERTEXLIGHT ON | NONE | 4.9 | 22.0 | 0.0 | 0.0 | 10.3 | 0.0 | 1.6 | 4.0 |
DIRECTIONAL SHADOWS SCREEN VERTEXLIGHT ON | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.2 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN VERTEXLIGHT ON | NONE | 5.4 | 22.0 | 0.0 | 0.0 | 11.0 | 0.0 | 2.1 | 4.5 |
POINT | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 4.8 | 0.0 | 2.5 | 1.5 |
DIRECTIONAL | NONE | 2.3 | 20.0 | 0.0 | 0.0 | 4.3 | 0.0 | 2.5 | 1.0 |
SPOT | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 4.9 | 0.0 | 2.5 | 2.0 |
POINT COOKIE | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 5.0 | 0.0 | 2.5 | 2.0 |
DIRECTIONAL COOKIE | NONE | 2.9 | 22.0 | 0.0 | 0.0 | 4.5 | 0.0 | 2.5 | 1.5 |
SHADOWS DEPTH SPOT | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 6.0 | 0.0 | 2.5 | 2.5 |
SHADOWS DEPTH SHADOWS SOFT SPOT | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 6.4 | 0.0 | 2.5 | 4.0 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.5 | 20.0 | 0.0 | 0.0 | 4.7 | 0.0 | 3.0 | 1.5 |
DIRECTIONAL COOKIE SHADOWS SCREEN | NONE | 2.9 | 22.0 | 0.0 | 0.0 | 4.7 | 0.0 | 3.0 | 2.0 |
POINT SHADOWS CUBE | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 5.6 | 0.0 | 2.5 | 2.0 |
POINT SHADOWS CUBE SHADOWS SOFT | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 6.9 | 0.0 | 2.5 | 3.5 |
POINT COOKIE SHADOWS CUBE | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 5.9 | 0.0 | 2.5 | 2.5 |
POINT COOKIE SHADOWS CUBE SHADOWS SOFT | NONE | 2.8 | 22.0 | 0.0 | 0.0 | 7.0 | 0.0 | 2.5 | 4.0 |
NONE | NONE | 2.3 | 20.0 | 0.0 | 0.0 | 0.9 | 0.0 | 0.6 | 1.0 |
LIGHTPROBE SH | NONE | 2.8 | 20.0 | 0.0 | 0.0 | 3.8 | 0.0 | 1.3 | 2.5 |
UNITY HDR ON | NONE | 2.3 | 20.0 | 0.0 | 0.0 | 0.9 | 0.0 | 0.6 | 1.0 |
LIGHTPROBE SH UNITY HDR ON | NONE | 2.8 | 20.0 | 0.0 | 0.0 | 3.4 | 0.0 | 1.3 | 2.5 |
DIRECTIONAL | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 3.2 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH | NONE | 4.3 | 22.0 | 0.0 | 0.0 | 3.4 | 0.0 | 1.6 | 2.5 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.2 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN | NONE | 3.0 | 22.0 | 0.0 | 0.0 | 11.0 | 0.0 | 2.1 | 4.5 |
DIRECTIONAL VERTEXLIGHT ON | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 3.2 | 0.0 | 1.4 | 2.5 |
DIRECTIONAL LIGHTPROBE SH VERTEXLIGHT ON | NONE | 6.3 | 22.0 | 0.0 | 0.0 | 3.4 | 0.0 | 1.6 | 2.5 |
DIRECTIONAL SHADOWS SCREEN VERTEXLIGHT ON | NONE | 2.4 | 22.0 | 0.0 | 0.0 | 8.2 | 0.0 | 1.9 | 3.0 |
DIRECTIONAL LIGHTPROBE SH SHADOWS SCREEN VERTEXLIGHT ON | NONE | 5.4 | 22.0 | 0.0 | 0.0 | 11.0 | 0.0 | 2.1 | 4.5 |
POINT | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 2.8 | 0.0 | 2.5 | 2.0 |
DIRECTIONAL | NONE | 2.5 | 20.0 | 0.0 | 0.0 | 2.4 | 0.0 | 2.5 | 1.5 |
SPOT | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 3.0 | 0.0 | 2.5 | 2.5 |
POINT COOKIE | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 3.1 | 0.0 | 2.5 | 2.5 |
DIRECTIONAL COOKIE | NONE | 3.1 | 22.0 | 0.0 | 0.0 | 2.6 | 0.0 | 2.5 | 2.0 |
SHADOWS DEPTH SPOT | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 2.8 | 0.0 | 2.5 | 2.5 |
DIRECTIONAL SHADOWS SCREEN | NONE | 2.5 | 20.0 | 0.0 | 0.0 | 4.7 | 0.0 | 3.0 | 1.5 |
DIRECTIONAL COOKIE SHADOWS SCREEN | NONE | 2.9 | 22.0 | 0.0 | 0.0 | 4.7 | 0.0 | 3.0 | 2.0 |
POINT SHADOWS CUBE | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 2.3 | 0.0 | 2.5 | 2.0 |
POINT COOKIE SHADOWS\_CUBE | NONE | 3.3 | 22.0 | 0.0 | 0.0 | 2.5 | 0.0 | 2.5 | 2.5 |
We all knew standard shaders are extremely expensive.
From the numbers, it looks as if the specular setup is slightly cheaper than the metallic version.
That was a ton of numbers!
These metrics will help you balance the visual quality you want to achieve in your game with your performance requirements.
The lower the GPU cycles your shader takes, the faster it will run.
(I wish we could always run the standard shader… but as you see, its cost is prohibitive for mobile platforms)
To get a free sortable spreadsheet that you can save and keep at hand for quick reference in your projects, just subscribe to the performance newsletter with your e-mail below.
It’s super handy because you can filter the list by the shaders you want to compare.
Take care,
~Ruben (The Gamedev Guru)