forked from FWGS/xash3d-fwgs
-
Notifications
You must be signed in to change notification settings - Fork 16
How to add ray tracing support to mod
NightFox edited this page Nov 7, 2023
·
10 revisions
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
-8
command, 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.rad
overwrites values from it. If rad files are lost, you can take the base light.rad fromref/vk/data/valve/maps
as a basis. You can reload on-the-fly light via thert_debug_reload_patches
command (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).