jammerware / x2mods-dev-scripts

Powershell scripts to assist with development of XCOM 2 mods and to liberate the masses from ModBuddy.
The Unlicense
1 stars 2 forks source link

Shader precompiler #2

Closed robojumper closed 7 years ago

robojumper commented 7 years ago

You said you didn't make content mods, here's a step that's required for custom shaders to work without issues (not tested, should be added after compiling mod scripts).

# build the mod's shader cache
Write-Host "Precompiling Shaders..."
&"$sdkPath/binaries/Win64/XComGame.com" precompileshaders -nopause platform=pc_sm4 DLC=$modNameCanonical
Write-Host "Generated Shader Cache."

This is only needed if the mod contains *.upk or *.umap files.

jammerware commented 7 years ago

I added this with a check that will cause it to fire only if the Content folder contains upks or umaps. Like I said, I haven't done any mods that use content, so I don't feel comfortable testing it myself, but if anyone has trouble with it, hopefully they'll open an issue. I did check that the logic fires when a UPK is present.

Thanks for the contribution!