Maximum number (128) of shader keywords exceeded

Hi, I get this error how can I solve that without deleting any of my shaders?

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

Please help

Up

Instead of constantly bumping, you should have tried using Google: [SOLVED] 64 Keyword Limit questions - Unity Engine - Unity Discussions

Check the bottom of this page for Keyword limit Unity - Manual: Declaring and using shader keywords in HLSL

In 5.0, is there anyway to display all shader keywords presently in use? I once hit the 128 shader keyword limit and the error message actually listed all of the keywords that were in use…including many I had deprecated…but I strongly suspect I don’t always receive this error when I exceed the limit.

I managed to get back below the limit (and get my shaders working again) by going through all of my .mat files with a text editor to remove any reference to keywords that no longer have any meaning. I also double checked my C# scripts to make sure I wasn’t attempting to enable deprecated shader keywords.

It would be extremely convenient if Unity logged every shader keyword request to a file (CryEngine did this…so I always knew if when I was approaching their 64 keyword limit…plus I usually could tell which features fell off the list when I exceeded the limit).

1 Like