Search Unity

Maximum number (128) of shader keywords exceeded

Discussion in 'Editor & General Support' started by ksam2, Apr 21, 2015.

  1. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    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.
     
  2. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Please help
     
  3. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
  4. blizzy

    blizzy

    Joined:
    Apr 27, 2014
    Posts:
    775
  5. Aurore

    Aurore

    Director of Real-Time Learning

    Joined:
    Aug 1, 2012
    Posts:
    3,106
  6. akiraddd

    akiraddd

    Joined:
    Jan 9, 2015
    Posts:
    8
    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).
     
    ksam2 likes this.