Creating a custom shader in CryENGINE is relatively easy, and can be done simply by copying an existing shader (
.cfx) and its extension file (
.ext). For the sake of this example, copy
Engine/Shaders and name it
MyShader.ext. Then copy
Engine/Shaders/HWScripts/CryFX/Illum.cfx and rename it to
Note that creating custom shaders should be thought out properly; if it is possible to simply use an existing shader, that would be the best option. This is due to the fact that CryENGINE is already reaching the viable limit of the number of shader permutations.
As stated earlier in the chapter, custom shader authoring was not enabled in the CryENGINE Free SDK at the time this book was written.