How to add ray tracing support to mod - w23/xash3d-fwgs GitHub Wiki

To make a raytraced renderer work in mod you will need:

  1. Build your mod's dll/so in 64bit. For example hlsdk-portable is now easily configured in 64bit with a -8 command, like:
cd hlsdk-portable
waf configure -8 -T debug
waf install --destdir=path_to_gamedir
  1. Add rad files to maps, for this you should put them in /modname/maps/, the global rad file should be called light.rad, it is loaded by default for all maps, then mapname.rad overwrites values from it. If rad files are lost, you can take the base light.rad from ref/vk/data/valve/maps as a basis. You can reload on-the-fly light via the rt_debug_reload_patches command (you can key in, for example bind g rt_debug_reload_patches).
  2. If necessary use the map patches. For example you can redefine light for specific surfaces, remove light sources used to bypass qrad/hlrad limitations. All this without recompiling the maps! Examples are in ref/vk/data/valve/luchiki.
  3. Add materials. You can look at the basic materials in valve/pbr (download).