Why do precompiled shaders run faster than loading the game in general?



  • I've noticed when emulating the 3DS and Wii U that precompiled shaders run faster than just generally playing the game. Moreso on the Wii U than 3DS.

    When playing something like Breath of the Wild, it generally runs slower, especially while it's configuring the shaders while I'm playing. However, if I come back to an area that uses the same shaders, it runs perfectly smooth.

    3DS is less noticeable since it's a weaker system, but I can easily tell the difference. In general, my emulation settings overclock the 3DS CPU to make it run faster, generally because the more power I give it the better it runs. However, if I have all of the shaders there, I can revert the clock speed to normal, and it runs perfectly.

    Does anyone know why precompiled shaders work faster than normal gameplay?

    EDIT: In case you were wondering, this is all done legally.



  • Precompiled shaders are compiled before gameplay. This means that they don’t change much (or at all) during gameplay. But, live shaders that are compiled every second during gameplay are much slower because the processor and GPU are rendering very complex images and numbers that second, instead of rendering beforehand. Although the GPU is always processing images, shaders are very performance demanding.

    Source: I have studied this and am a game developer myself.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2