Changing a single shader (PathTracing.usf) takes a hour to build

UnrealEditor.exe was already built before, then I changed a single shader. Now it takes a hour to build. Is it expected? Is something wrong with my UE5.sln? It seems to be a rebuild instead of an incremental build.

hi @dnayzue ,
1, Have you deleted/cleared DerivedCache.
2. Have you accidentally changed the Shader Material from SM5 to SM6
3. Is the RHI still set to the same DX11 and not moved to SM6

Sometimes you have to have an overnight total rebuild that’s right-clicked UE5.sln select “Clear”
right-click UE5.sln select “Build” and wait 8 hours. Leave overnight build.

Path Tracing is a big chunk of UE5 and I am not surprised at the time. there are a lot of dependencies

Thanks @Jimbohalo10 !
I am pretty new to UE development (just started yesterday). I will try my best to answer your questions.

  1. Have you deleted/cleared DerivedCache

Is that a shader cache to avoid recompilation? No idea what it is, so I guess it is probably left unchanged.

  1. Have you accidentally changed the Shader Material from SM5 to SM6

Pathtracing is based on HW ray tracing, so I assume I am using SM6? I am targeting to only run my project on Dx12, but I did not notice anything related to RHI in Building Unreal Engine from Source | Unreal Engine 5.4 Documentation | Epic Developer Community (epicgames.com)

hi @dnayzue ,

Here is a link to my version 5.4.3 version of the code.
UnrealEngine-5/README.md at lgpu542 · jimshalo10/UnrealEngine-5 (github.com)

This has been refined and tested over many version of UE5

You are welcome to download , which is for Luoshuang’s GPULightmass Unreal Engine 5.4.3 a Nvidia GTX/RTX Lighting Bake much faster than CPU.