How to add ray tracing support to mod - w23/xash3d-fwgs GitHub Wiki
To make a raytraced renderer work in mod you will need:
- Build your mod's dll/so in 64bit. For example hlsdk-portable is now easily configured in 64bit with a
-8command, like:
cd hlsdk-portable
waf configure -8 -T debug
waf install --destdir=path_to_gamedir
- Add rad files to maps, for this you should put them in
/modname/maps/, the global rad file should be calledlight.rad, it is loaded by default for all maps, thenmapname.radoverwrites values from it. If rad files are lost, you can take the base light.rad fromref/vk/data/valve/mapsas a basis. You can reload on-the-fly light via thert_debug_reload_patchescommand (you can key in, for examplebind g rt_debug_reload_patches). - 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. - Add materials. You can look at the basic materials in
valve/pbr(download).