Maximum number (256) of shader global keywords exceeded, keyword _DISTORTION_ON will be ignored. You will have to delete some shaders or make them use less keywords.

Hi everyone, I am trying to learn about effects and have multiple assets and packages in my project, Amplphy shader, color, bloom, Lightweight and High definition render pipeline, with shader graph and visual effects graph. The problem is I am having this error still shows up.

Maximum number (256) of shader global keywords exceeded, keyword _DISTORTION_ON will be ignored.
You will have to delete some shaders or make them use less keywords.

I have looked around and people are saying I need to restart unity but the problem still continues.

I also think it is effecting my materials because they are all pink and trying to switch to the lightweight render pipeline does nothing to help.

Any advice would be greatly appreciated. Thank you.

For future reference, this is solved in 2019.1 and newer, but not a simple solution.
Go into Visual studios and CTRL+F to search, then use the dropdown menu for replace to find and replace the following.

  1. Replace ALL "multi_compile " with
    "multi_compile_local "
  2. Replace ALL
    "shader_feature " with
    "shader_feature_local "

The reason for this is because unity did not increase the cap of shader keywords with 2019, but instead added a local keyword option for each shader, with a limit of 128 local keywords. For the most part this solves it. HOWEVER It is worth nothing that not prevent global access, ALL lines Shader.Enable/DisableKeyword("keyword") must be replaced with myMaterial.Enable/DisableKeyword"keyword") because the Shader call is a global call and the material call is local.

This should 100% solve the maximum exceeded shader keywords error. It has for me, and I have over 700 shaders in my current project.

I was told to use this tool to delete unused shaders:
https://bitbucket.org/ArtIsDarkGames/shader-keywords-tool-unity3d/src/master/

Replacing all multi_compile to local is risky and prone to break something since many assets use Shader.EnableKeyword and local keywords cannot be used that way.
Use Shader Control from the Asset Store and perform find/replace changes with, well, more control.

Das tool geht nich zu 100% man kann aber die shader selber löschen… shader suchen und alles löschen was nicht standart ist