Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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,069
    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,069
    Please help
     
  3. ksam2

    ksam2

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

    blizzy

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

    Aurore

    Director of Real-Time Learning Unity Technologies

    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.