O'Reilly logo

CryENGINE Game Programming with C++, C#, and Lua by Ruan Pearce-Authers, Carl-Filip Lundgren

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Shaders

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 Illum.ext from Engine/Shaders and name it MyShader.ext. Then copy Engine/Shaders/HWScripts/CryFX/Illum.cfx and rename it to MyShader.cfx.

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.

Note

As stated earlier in the chapter, custom shader authoring was not enabled in the CryENGINE Free SDK at the time this book was written.

The shader description

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required