作業環境
- Windows 10
- Visual Studio 2022
- Ryzen 9 5900X (12コア 24スレッド)
- Unreal Engine 5.2 ~ 5.3
具体的にどうすれば!!!
Engine/Config/BaseEngine.ini
を差分のとおりに書き換えます。
Engine/Config/BaseEngine.ini
の場所
PercentageUnusedShaderCompilingThreads
ShaderCompilerCoreCountThreshold
... CPUのコア数がShaderCompilerCoreCountThreshold
以上ある場合には、シェーダーコンパイルに使用する論理コア数をPercentageUnusedShaderCompilingThreads
に基づいて決定します。
PercentageUnusedShaderCompilingThreads
... シェーダーコンパイルに使用する論理コア数を割合で決めます。全ての論理コアを使用したい場合には0を指定します。
各初期値がShaderCompilerCoreCountThreshold=12
, PercentageUnusedShaderCompilingThreads=50
なため、12コア以上の場合には半力半開になっているのです。
; Core count threshold. Below this amount will use NumUnusedShaderCompilingThreads. Above this threshold will use PercentageUnusedShaderCompilingThreads when determining the number of cores to reserve. ShaderCompilerCoreCountThreshold=12 ; Percentage of your available logical cores that will be reserved and NOT used for shader compilation ; 0 means use all your cores to compile Shaders ; 100 means use none of your cores to compile shaders (it will still use 1 core). PercentageUnusedShaderCompilingThreads=0
WorkerProcessPriority
ShaderCompileWorker.exe
のプロセス優先度を-1から0に変更しています。
プロセス優先度はコア数関係なく適用されます。
; Set process priority for ShaderCompileWorker (0 is normal) WorkerProcessPriority=0