Shader Loading

CRYENGINE Community Edition 1.0 introduces support for loading custom full-screen .hlsl shaders directly into the engine. A prime example is the included Comics Shader, showcasing how this feature can be used to achieve unique visual styles. Currently, the engine supports one shader file at a time, making this functionality ideal for projects aiming to create a distinct, stylized look.

Use-case example – comics The Walking Dead like visuals:

Shader placement

The engine only supports loading shaders from your project’s asset folder. To use a custom .hlsl shader, place the file inside this folder. For organizational clarity, we’ve created a dedicated subfolder named Shaders.

Shader Placement Example Path:

Shader Skeleton

Below is a shader skeleton you can use as a starting point for creating your own .hlsl shader file. Maintaining this structure is essential, as the compiler relies on it to properly recognize and compile the shader.

Shader Loading

  1. Open the Environment Editor via Tools → Environment Editor.
  2. Create a new environment preset or select an existing one.
  3. In the Constants section, navigate to Shader Loading.
  4. Enable Shader Loading by checking Enable Shader Loading.
  5. Load your desired shader file.

Once enabled, the shader will automatically be applied every time you use that environment preset.

Shader Loading in the environment editor: