{"id":512959,"date":"2022-11-20T16:00:00","date_gmt":"2022-11-20T13:00:00","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/"},"modified":"2022-11-20T16:00:00","modified_gmt":"2022-11-20T13:00:00","slug":"what-is-shader-compilation-and-why-does-it-make-pc-games-stutter","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/","title":{"rendered":"#What Is Shader Compilation and Why Does It Make PC Games Stutter?"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_84 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a26bb743db10\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a26bb743db10\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-1'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/#%E2%80%9CWhat_Is_Shader_Compilation_and_Why_Does_It_Make_PC_Games_Stutter%E2%80%9D\" >&#8220;What Is Shader Compilation and Why Does It Make PC Games Stutter?&#8221;<\/a><ul class='ez-toc-list-level-2' ><li class='ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/#What_Are_Shaders\" >What Are Shaders?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/#What_Is_Shader_Compilation\" >What Is Shader Compilation?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/#Why_Do_Some_PC_Games_Have_Shader_Compilation_Stutter\" >Why Do Some PC Games Have Shader Compilation Stutter?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/#Why_Dont_Consoles_Have_Shader_Compilation_Stutter\" >Why Don\u2019t Consoles Have Shader Compilation Stutter?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/buradabiliyorum.com\/en\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/#What_Can_You_Do_About_Compilation_Stutter\" >What Can You Do About Compilation Stutter?<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h1><span class=\"ez-toc-section\" id=\"%E2%80%9CWhat_Is_Shader_Compilation_and_Why_Does_It_Make_PC_Games_Stutter%E2%80%9D\"><\/span>&#8220;What Is Shader Compilation and Why Does It Make PC Games Stutter?&#8221;<span class=\"ez-toc-section-end\"><\/span><\/h1>\n<div>\n<figure style=\"width: 1200px\" class=\"wp-caption alignnone\"><img loading=\"lazy\" decoding=\"async\" class=\"type:primaryImage size-full wp-image-848484\" data-pagespeed-no-defer=\"\" src=\"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/Elden-Ring.jpeg?width=1198&amp;trim=1,1&amp;bg-color=000&amp;pad=1,1\" alt=\"Elden Ring image of a Battle Scene with a knight on horseback fighting a dragon.\" width=\"1200\" height=\"675\"\/><figcaption class=\"wp-caption-text\"><span class=\"type:primaryImage imagecredit\">FROM Software \u2013 Elden Ring was notorious for shader compilation stutter at launch<\/span><\/figcaption><\/figure>\n<p>Because every PC&#8217;s GPU is different, shader compilation is necessary for <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/game\/\" data-internallinksmanager029f6b8e52c=\"7\" title=\"Game\" target=\"_blank\" rel=\"noopener\">game<\/a>s to run on different brands and models of graphics card. Unfortunately, that compilation process can cause annoying stutter.<\/p>\n<p>Some games have a type of stutter that h<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">app<\/a>ens no matter how powerful your computer is, or which settings you choose. This is caused by a process known as \u201cshader compilation,\u201d and it\u2019s a growing issue in PC gaming.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"What_Are_Shaders\"><\/span>What Are Shaders?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Shaders are computer programs that help determine various aspects of rendered graphics. Pixel shaders, for example, calculate the attributes of a pixel. This includes the color, brightness, reflectivity, or transparency of that pixel. If you want something in your game to look wet, you use a special shader to achieve that look rather than do it painstakingly by hand.<\/p>\n<p>Shaders are what make modern GPUs so flexible since these GPUs are designed to run anything that can be expressed in <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/click.linksynergy.com\/deeplink?id=2QzUaswX1as&amp;mid=24542&amp;u1=htg\/846514|xid:{xid}&amp;murl=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fwindows%2Fwin32%2Fdirect3dhlsl%2Fdx-graphics-hlsl&amp;___trxnet=ls\">shader programming language<\/a>. They replace the old \u201cfixed-function pipeline\u201d GPU <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/technology\/\" data-internallinksmanager029f6b8e52c=\"4\" title=\"Technology\" target=\"_blank\" rel=\"noopener\">technology<\/a> where the types of graphical math a GPU could do were hard-wired into its silicon.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"What_Is_Shader_Compilation\"><\/span>What Is Shader Compilation?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u201cCompilation\u201d is a computer term that refers to taking the code as written by a human programmer and translating it to machine code that the specific processor that\u2019s meant to run the software in question can understand. So, for example, you might compile your code to run on an Intel CPU or Apple Silicon.<\/p>\n<p>The same thing is necessary for a GPU. The shader code must be compiled to run on the specific GPU brand and model in question. If you change the GPU, update its drivers, or the game receives an update, the shaders must be compiled again.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Why_Do_Some_PC_Games_Have_Shader_Compilation_Stutter\"><\/span>Why Do Some PC Games Have Shader Compilation Stutter?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>In some games, compiling shaders in the background interferes with the game itself, causing a visible stutter. The computer is working too hard at compiling the shaders to run the game smoothly. Some developers labor to optimize compilation so that it has little or no impact on game performance, while others spread shader compilation out throughout the game, hoping that the hitching will be short-lived. In that case, you\u2019d only encounter the stutters at the start of a new level or when you enter a new environment that uses shaders that haven\u2019t been necessary up to that point.<\/p>\n<p>Compilation stutters have been particularly egregious in Unreal Engine 4 games, which is a widespread and popular game engine. Specifically, these stutters become an issue when running a game under DirectX 12. This is partly because DirectX 12 changes how shader compilation works, putting more control in the hands of developers. However, this also means that developers may not have the best way to optimize shader compilation nailed down using the latest and greatest version of DirectX.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"Why_Dont_Consoles_Have_Shader_Compilation_Stutter\"><\/span>Why Don\u2019t Consoles Have Shader Compilation Stutter?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Shader compilation stutter is a problem that\u2019s completely absent from consoles like the PS5 and Xbox <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/watch-movies-tv-seriess\/\" data-internallinksmanager029f6b8e52c=\"8\" title=\"Watch Movies &amp; TV Series\" target=\"_blank\" rel=\"noopener\">Series<\/a> X|S. This is simply because developers know exactly what hardware is inside each console so that they can pre-compile all the shaders; there\u2019s no need to compile them on the local system because you already know which GPU you\u2019re targeting.<\/p>\n<p>It is possible to do this on PC, but since there are so many GPUs and system configurations, it wouldn\u2019t be practical. However, in the case of the Valve Steam Deck, Valve includes a pre-compiled shader cache with some games because, of course, all Steam Decks have the same GPU.<\/p>\n<h2 role=\"heading\" aria-level=\"2\"><span class=\"ez-toc-section\" id=\"What_Can_You_Do_About_Compilation_Stutter\"><\/span>What Can You Do About Compilation Stutter?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Unfortunately, most of the time, the developers have to fix shader compilation problems. The good <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/news\/\" data-internallinksmanager029f6b8e52c=\"2\" title=\"News\" target=\"_blank\" rel=\"noopener\">news<\/a> is that they\u2019ll eventually get a handle on the process. Unreal Engine 5.1 may include an <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/wccftech.com\/unreal-engine-5-1-attempts-to-fix-those-dreadful-stuttering-hitches\/\">automated feature<\/a>\u00a0that will help developers with caching without the impact on performance being so severe.<\/p>\n<p>The list of things you can do to mitigate stutter isn\u2019t long, but some of these options may help:<\/p>\n<ul>\n<li>If a game lets you pre-compile shaders, let it. This may take a while, but the game experience will be stutter-free.<\/li>\n<li>Unless a game update includes a shader stutter fix, hold off until you have finished playing, or shaders may compile again.<\/li>\n<li>Hold off on GPU driver updates until you have finished your current game in case it triggers compilation again.<\/li>\n<li>When compilation stutter starts in a game, hit the pause button and wait until it is finished before playing further.<\/li>\n<li>Use the DirectX 11 instead of the DirectX 12 version of a game. Often shader stutter is reduced or absent, although you\u2019ll give up DX12 features in the bargain.<\/li>\n<li>Play the game on a console instead.<\/li>\n<\/ul>\n<p>Over time this problem will likely go away or become much less intrusive. For example, developers may offload shader compilation onto CPU cores the game doesn\u2019t need, which is a common situation on modern PCs with many cores. Until then, the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/twitter.com\/hashtag\/Stutterstruggle?src=hashtag_click&amp;f=live\">#stutterstruggle<\/a>\u00a0will remain an irritating issue in PC gaming.<\/p>\n<p><strong>RELATED:<\/strong> <strong><em>Why Do My Games Look Worse With VRR?<\/em><\/strong><\/p>\n<\/div>\n<p><script async src=\"\/\/platform.twitter.com\/widgets.js\" charset=\"utf-8\"><\/script><\/p>\n<p><script>\n setTimeout(function(){\n  !function(f,b,e,v,n,t,s)\n  {if(f.fbq)return;n=f.fbq=function(){n.callMethod?\n  n.callMethod.apply(n,arguments):n.queue.push(arguments)};\n  if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';\n  n.queue=[];t=b.createElement(e);t.async=!0;\n  t.src=v;s=b.getElementsByTagName(e)[0];\n  s.parentNode.insertBefore(t,s) } (window, document,'script',\n  'https:\/\/connect.facebook.net\/en_US\/fbevents.js');\n   fbq('init', '335401813750447');\n   fbq('track', 'PageView');\n  },3000);\n<\/script><\/p>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.howtogeek.com\/846514\/what-is-shader-compilation-and-why-does-it-make-pc-games-stutter\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;What Is Shader Compilation and Why Does It Make PC Games Stutter?&#8221; FROM Software \u2013 Elden Ring was notorious for shader compilation stutter at launch Because every PC&#8217;s GPU is different, shader compilation is necessary for games to run on different brands and models of graphics card. Unfortunately, that compilation process can cause annoying stutter&#8230;.<\/p>\n","protected":false},"author":1,"featured_media":512960,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.howtogeek.com\/wp-content\/uploads\/2022\/11\/Elden-Ring.jpeg?height=200p&trim=2,2,2,2","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-512959","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/512959","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=512959"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/512959\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/512960"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=512959"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=512959"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=512959"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}