RobertBeckebans / RBDOOM-3-BFG

Doom 3 BFG Edition source port with updated DX12 / Vulkan renderer and modern game engine features
https://www.moddb.com/mods/rbdoom-3-bfg
GNU General Public License v3.0
1.37k stars 244 forks source link

Remove redundant cmake code for finding dxc, now handled by ShaderMake #870

Closed SRSaunders closed 1 month ago

SRSaunders commented 1 month ago

I initially missed this when doing the nvrhi rebase: ShaderMake now finds all shader compiler executable paths by itself for all platforms and makes them available to the application. In addition it has some good fallback and error reporting.

In this PR I have removed the redundant work in RBDoom3BFG's CMakeLists and aligned compileshaders.cmake with the new path variables. The only external difference is the dxc for SPIRV override path is now called DXC_CUSTOM_PATH instead of DXC_SPIRV_EXECUTABLE. This is not needed on Windows and macOS due to their use of the Vulkan SDK. However, on linux it is useful if the distro does not have a dxc package, and you need to install your own copy at a non-standard path.

Tested on Windows 10, macOS Ventura, and Manjaro Linux. Note that Manjaro has a dxc package available and with it installed you don't need to do anything special or even define DXC_CUSTOM_PATH. ShaderMake finds dxc and populates the required path variable automatically.