Can I do shader compilation calculation on GPU instead of CPU?

Shader compilation time is too long. Can I direct the compilation calculations into the GPU?

Thanks.

2 Likes

Unreal Engine does not have built-in support for compiling shaders on the GPU instead of the CPU. By default, Unreal Engine compiles shaders on the CPU using the DirectX Compiler (DXC) or the HLSL Compiler (HLC) and it’s done as part of the asset pipeline.

However, there are some third-party solutions that can be used to compile shaders on the GPU. These solutions usually require additional setup and configuration, and may not be fully supported by Unreal Engine.

You can use a plugin such as “ShaderCompilerWorker” which can be installed via the Epic Games Marketplace, it allows you to move the shader compilation process to a separate process that can run on a separate machine or even a separate GPU. Before you install the plugin, verify that I am correct about the separate GPU setting. It’s been a while since I checked it out.

Keep in mind that using GPU shader compilation can increase the overall time of the compilation process as it uses a lot of memory and can cause performance issues on low-end GPU.

3 Likes

Unless I’m blind, I haven’t found said plugin on the marketplace and I’m starting to get annoyed by the amount of shaders I have to compile on my CPU, especially with my current AIO cooler that I can’t replace at the moment. It only has one fan and a small radiator and it’s trying to cool down an i9-9900KF, meanwhile it casually reaches 100 degrees celcius if it’s at 100% usage.

3 Likes

There is no “ShaderCompilerWorker” on the Epic Games Marketplace currently. It appears to have been removed.