Recompiles the shader database for WATCH_DOGS 1 from the game's own HLSL sources.
The scripts drive fxc.exe over each shader family and write the compiled objects
with the header stub the engine loads.
The .fx sources belong to the game and are not in this repository. Unpack your own copy.
- Windows SDK for
fxc.exe - Python 3
- Unpack
[WATCH_DOGS Install Directory]\data_win64\shaders.datwith Gibbed.Disrupt. - Copy the unpacked
enginefolder into this repository's root, next toCompileShaders.py.
The scripts read engine\shaders\... from the repository root. Shader family names
live in engine\shaders\meta\filelist.meta.xml.txt.
- Add the Windows SDK x64 directory to
PATH, for exampleF:\Windows Kits\10\bin\10.0.26100.0\x64\. - Run
CompileShaders.py. - Enter a shader family, for example
Mesh_DriverGeneric. Enter.fxto build the whole database.
Build the whole database once before you build a single family. Families share input and output signatures, so a family built on its own disagrees with the rest and the game stops drawing.
Compiled objects land in COMPILED, and the script resumes where it stopped if you
run it again.
- Unpack
[WATCH_DOGS Install Directory]\data_win64\shadersobj.fatwith Gibbed.Disrupt. - Rename
shadersobj.fattoshadersobj.fat.bak, andshadersobj.dattoshadersobj.dat.bak. - Move the unpacked
shadersobj_unpack\enginefolder into[WATCH_DOGS Install Directory]\data_win64\.
The engine then reads shader files from disk.
compile_shaders_linux.py is the Linux port. It calls DXC instead of fxc.exe, keeps
paths in forward-slash form, and resolves the source filename case that the Windows
command list gets wrong. Install the DirectX Shader Compiler, then either put dxc on
PATH or set DXC to its full path and run:
python3 compile_shaders_linux.py Mesh_DriverGenericPublic domain. See LICENSE.