Community Tutorial: Create Shader Permutations - UE5 C++ Tutorial

Create variations of your shader without having to declare a new global shader for each version with shader permutations. Once you’ve set up the permutations, you can then just pass in the necessary variables you need during runtime and the engine picks the correct shader for you!

https://dev.epicgames.com/community/learning/tutorials/RxLK/unreal-engine-create-shader-permutations-ue5-c-tutorial