Created by: CrossVR
Includes a python script to compile them from scratch. The script searches shaders for macros and compiles all permutations of those macros in parallel. Afterwards it prefixes the data with a CRC32 checksum which is required by the engine. The engine itself is already equipped to load these shaders from gamedata.
The advantage of these pre-compiled shaders are faster load times, but it also has significant advantages for the cross-platform port as there are significantly more cross-compilers available for DX bytecode than for HLSL shaders.
The script is a bit ugly, as it was written just to get the job done. But when we're going to do significant work on the HLSL shaders, then the script can be cleaned up and expanded to cover more renderers.
Note: As can be seen in the script, there are currently two assumptions:
- Every supported GPU supports
USE_HWSMAP
so this option is force-enabled, this means we don't support GPUs that don't support pixel shader model 3.0 (DX9c) - The
SKIN_COLOR
command-line parameter is never used so this option is disabled, it looks like this option never worked in the first place.