Introduced in Scaleform 4.1, GFxShaderMaker is a utility that constructs and compiles shaders that Scaleform uses. When rebuilding the renderer projects (e.g. Render_D3D9), it is run as a custom build step on ShaderData.xml. This produces several files, which the renderer uses to compile and/or link the renderer. These vary from platform to platform. For example, on D3D9, it creates:
Src/Render/D3D9_ShaderDescs.h Src/Render/D3D9_ShaderDescs.cpp Src/Render/D3D9_ShaderBinary.cpp
On other platforms, the tool chain may be used to directly create a library containing the shaders, which will be linked with the executable.
D3D9
The D3D9 HAL supports both ShaderModel 2.0, and ShaderModel 3.0. By default, support for all these features levels is included in the HAL. You can explicitly remove support for either of these. This will save the extra size for creating the shader descriptors and binary shaders. This can be done by using an option to GFxShaderMaker ‘-shadermodel’, and providing a comma separated list of shader models. For example:
GFxShaderMaker.exe –platform D3D1x –shadermodel SM30
This will remove support for ShaderModel 2.0. If you attempt to call InitHAL with a device that only supports ShaderModel 2.0, it will fail.
D3D1x
The D3D1x HAL supports three feature levels, corresponding to the different levels of shader support that devices can be created with. These are (add required prefix for D3D11 and D3D10.1):
FEATURE_LEVEL_10_0 FEATURE_LEVEL_9_3 FEATURE_LEVEL_9_1
By default, support for all these features levels is included in the HAL. You can explicitly remove support for any of these. This will save the extra size for creating the shader descriptors and binary shaders. This can be done by using an option to GFxShaderMaker ‘-featurelevel’, and providing a comma separated list of required levels. For example:
GFxShaderMaker.exe –platform D3D1x –featurelevel FEATURE_LEVEL_10_0,FEATURE_LEVEL_9_1
This will remove support for FEATURE_LEVEL9_3. If you attempt to call InitHAL with a device that uses FEATURE_LEVEL_9_3, it will use next lowest supported level (FEATURE_LEVEL_9_1 in this case).