This page has been translated automatically.
The Language
Core Library
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Unigine Material Library
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

How to Generate Shaders Cache

There are four scripts located in the <SDK>/source/tools/Interpreter/scripts/render directory that can generate cache files for shaders:

  • shader_cache_d3d9_default.usc - for DirectX 9 shaders
  • shader_cache_d3d11_default.usc - for DirectX 11 shaders
  • shader_cache_d3d11_simple.usc - for simple mobile shaders

Inside these scripts text files you can modify definitions (such as quality, MSAA, used effects etc.) and materials list (for example, if you are not interested in generating shader cache for some of them).

Shader cache generation is available only for full source Microsoft DirectX SDK versions. Also, fxc.exe should be included to the PATH system variable for Windows OS.

To generate shaders cache you need to perform the following steps:

  1. Copy the usc_x64.exe (or usc_x86.exe) file to the <SDK>/source/tools/Interpreter/scripts/render directory.
  2. Execute the following command inside this folder (while pressing Shift button press the right mouse button and choose the Open command window here option):
    Source code
    usc_x64 (usc_x86) needed_shader_script.usc
  3. Output shaders cache will be generated inside the <SDK>/data folder.

Generally, the size of generated cache files will exceed 400 MB and generation process itself will take more than 20 hours for each of the default scripts (they can be executed in parallel).

Last update: 2017-07-03
Build: ()