What are shaders and why are they needed

The Last Of Us game scene

When we launch Atomic Heart, The Last of Us Part I, or S.T.A.L.K.E.R. 2: Heart of Chornobyl, the game asks us to wait for shader compilation. On some computers, this process takes 5 minutes, while on others, it can take from half an hour to several hours. In most games, there is no shader compilation option in the menu, and this process starts during gameplay, reducing FPS and causing constant freezes and stutters.

So what exactly are shaders? How do they affect performance, and why do gamers have to wait for compilation right in the main menu? Today, we will answer these questions.


Shader technology

What are shaders

Shaders are small programs, short lines of code. They tell the graphics card how to correctly render textures, 3D objects, and special effects in the game.

Shaders are divided into several types:

  • Pixel and ray tracing shaders. Used for correct calculations of lighting, shading, transparency, explosions, fire, and other physical effects.
  • Compute shaders. Used to speed up game rendering and perform complex mathematical calculations.
  • Vertex, geometry, surface, and domain shaders. Used to shape the boundaries of 3D objects.
Shader Technology

How Shaders Affect FPS in Games

Thousands of shaders are used in modern games to create beautiful visuals. Many of them are simple and have little to no impact on performance. For example, shaders that apply textures to 3D models belong to this category. This is why the "texture quality" setting in graphics options hardly affects FPS (only if the game has enough RAM and VRAM from a gaming computer).

However, there are very complex shaders that significantly impact performance, such as ray tracing shaders. They handle a large amount of data and are used for properly rendering ray tracing effects. This is one of the reasons why enabling RTX drastically reduces FPS in games.

Shaders not only lower frame rates but also cause freezes and stutters (short micro-freezes). While FPS drops may still be tolerable, constant stutters severely disrupt the gaming experience.

How Shaders Affect Freezes and Stutters in Games

Shaders are written in a high-level programming language, which graphics cards do not understand. They can only process binary machine code. To translate shaders into a language that GPUs can comprehend, they must be compiled.

This task is handled by the central processor. Compiling one or a few shaders is not an issue, but modern games use thousands of shaders. When they need to be loaded in batches of dozens or even hundreds instantly, even the most powerful processors may struggle. This results in freezes.

How Developers Optimize Shader Compilation

Developers are aware that shaders negatively impact performance. There are three ways to address this issue:

  • Compiling all shaders on the first game launch. In this case, gamers have to wait in the main menu while the game compiles all shaders.
  • Loading and compiling shaders during gameplay. This can cause stuttering, and FPS may drop due to continuous compilations.
  • Compiling some shaders on the first game launch and loading the rest during gameplay. This is the most common approach used by most developers.

The impact of shaders on performance largely depends on the experience, skills, and qualifications of programmers. Skilled developers can predict which shaders will be needed and when. For example, if programmers know that certain shaders are unnecessary in a specific location, they can configure the game to avoid compiling those shaders. This reduces CPU load and helps eliminate freezes and stutters.

Unfortunately, not all programmers have high qualifications, which results in games like The Callisto Protocol or S.T.A.L.K.E.R. 2: Heart of Chornobyl. These projects run poorly even on high-end PCs.

Shader Technology

Why Shaders Cannot Be Compiled During Game Installation

On Xbox and PlayStation consoles, shader compilation is not an issue because they are compiled during game installation. However, this is not possible on PCs. Shaders are compiled specifically for each individual PC configuration. If you change your processor, graphics card, or RAM, the game will need to recompile all shaders. Given the vast variety of PC components, developers simply cannot precompile shaders for all possible configurations.

How to Solve the Freezing Issue Caused by Shader Compilation

The problem of freezing due to shader compilation should be addressed by developers. As gamers who pay for games, we expect polished products. However, the industry is not perfect. There are several ways to reduce the number of freezes caused by shader compilation:

  • Installing the game on an SSD. Avoid using hard drives for modern games. Their speed is insufficient for quickly loading a large number of small files. This helps resolve issues with freezing and long loading times.
  • Using a more powerful processor. Shader compilation is handled by the processor. Upgrading to a more powerful CPU will speed up compilation, reducing freezes and FPS drops.
  • Closing all programs before launching the game. This ensures that all CPU resources are dedicated to the game, freeing up additional power for shader compilation. It is also recommended to optimize Windows.
  • Limiting the frame rate in game settings. If the maximum FPS is capped, the processor will not operate at full load. The freed-up performance can be used for faster shader compilation and eliminating freezes.

These methods will not completely eliminate the problem, but they will significantly help reduce the number of freezes and FPS drops.


Conclusion

To summarize:

  • A shader is a small program that tells the graphics card how to properly render a graphical effect in the game.
  • Modern games use thousands of shaders, which significantly impact performance and cause freezes.
  • Not all developers effectively manage shader libraries, which is why some games run smoothly while others experience freezes even on high-end PCs.

The issue of freezes caused by shader compilation can be partially mitigated by:

  • installing the game on an SSD;
  • upgrading to a more powerful processor in the PC;
  • closing all unnecessary programs before launching the game;
  • limiting the maximum frame rate in the settings.

Shader Compilation on HYPERPC Computers

We understand that shader compilation negatively affects performance in modern games. To solve this problem, we use in our PCs:

  • High-speed SSDs with NVMe data transfer protocol;
  • High-frequency DDR4 and DDR5 RAM modules;
  • Multi-core Intel and AMD processors of the latest generations.

These components significantly reduce the number of freezes and FPS drops in games due to shader compilation, ensuring smooth and stable gameplay.

Select your monitor resolution
  • Black
  • White
Your perfect start in the world of gaming: smooth gameplay, stylish design, and everything you need to win.
from AED 4,270
or from AED 159 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
286
193
133
PUBG
PUBG
102
77
65
GTA 5
GTA 5
116
96
47
Fortnite
Fortnite
126
85
51
Apex Legends
Apex Legends
132
102
65
CoD: Warzone
CoD: Warzone
150
107
61
Red Dead Redemption 2
Red Dead Redemption 2
51
45
34
Cyberpunk 2077
Cyberpunk 2077
53
42
33
Battlefield 2042
Battlefield 2042
95
63
41
Far Cry 6
Far Cry 6
105
65
67
Forza Horizon 5
Forza Horizon 5
65
58
46
God of War
God of War
70
57
38
Dying Light 2
Dying Light 2
98
57
34
Atomic Heart
Atomic Heart
82
63
36
Overwatch 2
Overwatch 2
124
106
80
The Callisto Protocol
The Callisto Protocol
66
55
34
Baldur's Gate III
Baldur's Gate III
92
57
34
CoD: Modern Warfare 3
CoD: Modern Warfare 3
77
58
40
Hogwarts Legacy
Hogwarts Legacy
61
43
26
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
50
35
18
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details
  • Black
  • White
The optimal choice for FullHD gaming in an impressive case without unnecessary details.
from AED 4,965
or from AED 185 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
339
228
162
PUBG
PUBG
136
103
87
GTA 5
GTA 5
154
128
62
Fortnite
Fortnite
168
113
68
Apex Legends
Apex Legends
176
136
86
CoD: Warzone
CoD: Warzone
200
143
81
Red Dead Redemption 2
Red Dead Redemption 2
68
60
45
Minecraft RTX
Minecraft RTX
68
60
45
Cyberpunk 2077
Cyberpunk 2077
70
55
43
Battlefield 2042
Battlefield 2042
126
83
54
Far Cry 6
Far Cry 6
110
86
50
Forza Horizon 5
Forza Horizon 5
87
77
62
God of War
God of War
94
76
50
Dying Light 2
Dying Light 2
130
76
45
Atomic Heart
Atomic Heart
103
79
44
Overwatch 2
Overwatch 2
165
141
107
The Callisto Protocol
The Callisto Protocol
88
73
45
Baldur's Gate III
Baldur's Gate III
118
79
41
CoD: Modern Warfare 3
CoD: Modern Warfare 3
101
72
43
Hogwarts Legacy
Hogwarts Legacy
81
57
35
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
61
44
23
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details
  • Black
  • White
The best gaming PC with an optimal configuration for FullHD and 2K.
from AED 5,905
or from AED 220 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
339
228
162
PUBG
PUBG
136
103
87
GTA 5
GTA 5
154
128
62
Fortnite
Fortnite
168
113
68
Apex Legends
Apex Legends
176
136
86
CoD: Warzone
CoD: Warzone
200
143
81
Red Dead Redemption 2
Red Dead Redemption 2
68
60
45
Minecraft RTX
Minecraft RTX
68
60
45
Cyberpunk 2077
Cyberpunk 2077
70
55
43
Battlefield 2042
Battlefield 2042
126
83
54
Far Cry 6
Far Cry 6
110
86
50
Forza Horizon 5
Forza Horizon 5
87
77
62
God of War
God of War
94
76
50
Dying Light 2
Dying Light 2
130
76
45
Atomic Heart
Atomic Heart
103
79
44
Overwatch 2
Overwatch 2
165
141
107
The Callisto Protocol
The Callisto Protocol
88
73
45
Baldur's Gate III
Baldur's Gate III
118
79
41
CoD: Modern Warfare 3
CoD: Modern Warfare 3
101
72
43
Hogwarts Legacy
Hogwarts Legacy
81
57
35
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
61
44
23
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details
  • Black
  • White
Your new gaming champion in a minimalist case.
from AED 7,515
or from AED 280 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
468
329
256
PUBG
PUBG
185
140
119
GTA 5
GTA 5
210
158
84
Fortnite
Fortnite
229
155
94
Apex Legends
Apex Legends
245
189
119
CoD: Warzone
CoD: Warzone
269
195
109
Red Dead Redemption 2
Red Dead Redemption 2
94
83
60
Cyberpunk 2077
Cyberpunk 2077
97
77
58
Battlefield 2042
Battlefield 2042
175
115
73
Far Cry 6
Far Cry 6
110
110
69
Forza Horizon 5
Forza Horizon 5
120
107
86
God of War
God of War
131
106
70
Dying Light 2
Dying Light 2
181
105
62
Atomic Heart
Atomic Heart
144
109
60
Overwatch 2
Overwatch 2
229
196
148
The Callisto Protocol
The Callisto Protocol
123
102
63
Baldur's Gate III
Baldur's Gate III
186
133
64
CoD: Modern Warfare 3
CoD: Modern Warfare 3
153
120
70
Hogwarts Legacy
Hogwarts Legacy
123
102
63
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
88
64
36
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details
  • Black
  • White
Compactness, style, and power – all in one device.
from AED 10,380
or from AED 386 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
468
329
256
PUBG
PUBG
185
140
119
GTA 5
GTA 5
210
158
84
Fortnite
Fortnite
229
155
94
Apex Legends
Apex Legends
245
189
119
CoD: Warzone
CoD: Warzone
269
195
109
Red Dead Redemption 2
Red Dead Redemption 2
94
83
60
Cyberpunk 2077
Cyberpunk 2077
97
77
58
Battlefield 2042
Battlefield 2042
175
115
73
Far Cry 6
Far Cry 6
110
110
69
Forza Horizon 5
Forza Horizon 5
120
107
86
God of War
God of War
131
106
70
Dying Light 2
Dying Light 2
181
105
62
Atomic Heart
Atomic Heart
144
109
60
Overwatch 2
Overwatch 2
229
196
148
The Callisto Protocol
The Callisto Protocol
123
102
63
Baldur's Gate III
Baldur's Gate III
186
133
64
CoD: Modern Warfare 3
CoD: Modern Warfare 3
153
120
70
Hogwarts Legacy
Hogwarts Legacy
123
102
63
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
88
64
36
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details
  • Black
  • White
Built for 4K gaming. Power, style, and flawless graphics in every detail.
from AED 13,510
or from AED 503 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
569
487
308
PUBG
PUBG
249
217
158
GTA 5
GTA 5
280
189
113
Fortnite
Fortnite
309
206
125
Apex Legends
Apex Legends
323
250
157
CoD: Warzone
CoD: Warzone
366
262
149
Red Dead Redemption 2
Red Dead Redemption 2
120
112
85
Cyberpunk 2077
Cyberpunk 2077
140
125
88
Battlefield 2042
Battlefield 2042
230
152
98
Far Cry 6
Far Cry 6
110
110
91
Forza Horizon 5
Forza Horizon 5
157
141
113
God of War
God of War
172
140
92
Dying Light 2
Dying Light 2
256
140
82
Atomic Heart
Atomic Heart
191
154
85
Overwatch 2
Overwatch 2
300
257
196
The Callisto Protocol
The Callisto Protocol
160
134
82
Baldur's Gate III
Baldur's Gate III
235
167
88
CoD: Modern Warfare 3
CoD: Modern Warfare 3
174
137
94
Hogwarts Legacy
Hogwarts Legacy
146
104
65
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
111
84
50
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details
  • White
Ready for the future. Aggressive futuristic design, made for true cyber warriors.
from AED 24,520
or from AED 912 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
587
513
327
PUBG
PUBG
274
239
174
GTA 5
GTA 5
308
208
124
Fortnite
Fortnite
340
227
138
Apex Legends
Apex Legends
355
275
173
CoD: Warzone
CoD: Warzone
403
288
164
Red Dead Redemption 2
Red Dead Redemption 2
132
123
94
Cyberpunk 2077
Cyberpunk 2077
154
138
97
Battlefield 2042
Battlefield 2042
253
167
108
Far Cry 6
Far Cry 6
121
121
100
Forza Horizon 5
Forza Horizon 5
173
155
124
God of War
God of War
189
154
101
Dying Light 2
Dying Light 2
195
154
90
Atomic Heart
Atomic Heart
210
169
94
Overwatch 2
Overwatch 2
330
283
216
The Callisto Protocol
The Callisto Protocol
176
147
90
Baldur's Gate III
Baldur's Gate III
259
184
97
CoD: Modern Warfare 3
CoD: Modern Warfare 3
191
151
103
Hogwarts Legacy
Hogwarts Legacy
161
114
72
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
122
92
55
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details
  • Black
  • White
Design aesthetics. A technological breakthrough in premium 8K gaming.
from AED 47,950
or from AED 1,782 per month
FPS in games
Ultra settings
Gaming performance
1920x1080 (FullHD)
2560x1440 (QuadHD)
3840x2160 (4K)
Counter Strike 2
Counter Strike 2
764
555
407
PUBG
PUBG
424
327
271
GTA 5
GTA 5
470
331
186
Fortnite
Fortnite
521
345
207
Apex Legends
Apex Legends
536
411
255
CoD: Warzone
CoD: Warzone
603
446
276
Red Dead Redemption 2
Red Dead Redemption 2
190
177
136
Cyberpunk 2077
Cyberpunk 2077
213
199
131
Battlefield 2042
Battlefield 2042
372
247
158
Far Cry 6
Far Cry 6
145
145
132
Forza Horizon 5
Forza Horizon 5
264
227
176
God of War
God of War
261
224
174
Dying Light 2
Dying Light 2
290
216
132
Atomic Heart
Atomic Heart
275
238
150
Overwatch 2
Overwatch 2
486
417
314
The Callisto Protocol
The Callisto Protocol
286
251
169
Baldur's Gate III
Baldur's Gate III
314
294
177
CoD: Modern Warfare 3
CoD: Modern Warfare 3
284
216
153
Hogwarts Legacy
Hogwarts Legacy
193
170
107
S.T.A.L.K.E.R. 2
S.T.A.L.K.E.R. 2
169
129
82
0
50
100
150
FPS
Obtained FPS scores are averaged to show the relative performance of the systems at maximum graphics settings. Details

Need something special? Build your own PC or choose from stock.

In Stock

PCs with delivery today
 

Configurator

Build a high-performance computer
 

Selection

Select by parameters
 
Contact Us
Contact Us
Every HYPERPC computer is the result of 15 years of experience and expertise. Our experts know exactly what a gaming PC, workstation, or server should be like.
To get started, we just need to talk. Tell us about your tasks, timelines, and budget, and we will offer the best solution.
Call us or request a callback:
Message us:
Send an email:
sales@hyperpc.ae
Need to quickly know the cost?
Working hours: Daily from 10 AM to 7 PM.
English
+971 4 526 3600
Dayly from AM 10:00 to 7:00 PM