Difference between revisions of "Replacing Shaders"

From Nexus Mods Wiki
Jump to: navigation, search
 
Line 1: Line 1:
 +
 
Shaders are located in Engine/shaders.pak. Thanks to that, you cannot create a “standard” mod that modifies shaders, as mods only work within the Data/ folder. Instead you will need to provide your own shaders.pak and shadercache.pak, which the users will have to manually place in their Engine/ folder.
 
Shaders are located in Engine/shaders.pak. Thanks to that, you cannot create a “standard” mod that modifies shaders, as mods only work within the Data/ folder. Instead you will need to provide your own shaders.pak and shadercache.pak, which the users will have to manually place in their Engine/ folder.
  
 
Modifying shaders.pak is trivial, just change whatever shaders you want within that archive. Then you need to generate shader cache:
 
Modifying shaders.pak is trivial, just change whatever shaders you want within that archive. Then you need to generate shader cache:
  
*Backup ''system.cfg'' from root of KCD  
+
#Backup system.cfg from root of KCD  
*Copy ''Tools/shadercachegen/system.cfg'' to root  
+
#Copy Tools/shadercachegen/system.cfg to root  
*Delete ''Engine/shadercache.pak'', ''Engine/shadercachestartup.pak'' and''Engine/shadersbin.pak'' (or just change their extension to something else than .pak)  
+
#Delete Engine/shadercache.pak, Engine/shadercachestartup.pak and Engine/shadersbin.pak (or just change their extension to something else than .pak)  
*Run ''Tools/shadercachegen/ShaderCacheGen.cmd''. This will approximatelly half an hour complete (you can check shadercachegen.log for progress, it will have around 110 000 lines by the time the process ends).  
+
#Run Tools/shadercachegen/ShaderCacheGen.cmd. This will approximatelly half an hour complete (you can check shadercachegen.log for progress, it will have around 110 000 lines by the time the process ends).  
*Run ''Tools/PakShaders.bat'' from root directory. This will create new shadercache, shadercachestartup and shadersbin PAKs in '''Engine/''' folder, containing your new shaders.  
+
#Run Tools/PakShaders.bat from root directory. This will create new shadercache, shadercachestartup and shadersbin PAKs in Engine/ folder, containing your new shaders.  
*Restore ''system.cfg'' from backup  
+
#Restore system.cfg from backup
  
 
 
 
 
 +
 +
 +
{{KCDNavigation}}
 +
 +
[[Category:Kingdom Come Deliverance]] [[Category:Tutorials]]

Latest revision as of 12:49, 4 November 2019

Shaders are located in Engine/shaders.pak. Thanks to that, you cannot create a “standard” mod that modifies shaders, as mods only work within the Data/ folder. Instead you will need to provide your own shaders.pak and shadercache.pak, which the users will have to manually place in their Engine/ folder.

Modifying shaders.pak is trivial, just change whatever shaders you want within that archive. Then you need to generate shader cache:

  1. Backup system.cfg from root of KCD
  2. Copy Tools/shadercachegen/system.cfg to root
  3. Delete Engine/shadercache.pak, Engine/shadercachestartup.pak and Engine/shadersbin.pak (or just change their extension to something else than .pak)
  4. Run Tools/shadercachegen/ShaderCacheGen.cmd. This will approximatelly half an hour complete (you can check shadercachegen.log for progress, it will have around 110 000 lines by the time the process ends).
  5. Run Tools/PakShaders.bat from root directory. This will create new shadercache, shadercachestartup and shadersbin PAKs in Engine/ folder, containing your new shaders.
  6. Restore system.cfg from backup

 


Kingdom Come: Deliverance: Forum | Before you start | Tutorials & Instructions | Basic Mods | Tools | Documentation | Glossary | EULA