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

Unity should increase shader keywords to 256 ...

Discussion in 'Shaders' started by ksam2, Sep 14, 2015.

  1. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,069
    Hi guys, did you ever work on a real AAA and big game with Unity? If so you should know this keywords limitation to 128 is an awful limitation, is there anyway for increase it to 256 ? because still I'm on my first level (with some assets and shaders that are really necessary) but I have this keywords limitation error!
     
  2. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    855
    You should've tried doing PBR with Unity 4 and its 64 keyword limitation :) 128 is heaps compared to that.
     
  3. Dolkar

    Dolkar

    Joined:
    Jun 8, 2013
    Posts:
    576
    I noticed a lot of assets are using keywords needlessly. If you're not actually using the shader in the pipeline, but rather calling mat.SetPass(x), you can just have more passes instead in your shader. That holds for pretty much all of the image effects.
     
  4. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,069
    They should increase that to 256! We working on a huge project with some asset we need but in the first level we get keywords limitation error and we start deleting lots of shaders and assets but still we have this error! it's a big fail for big games.
     
  5. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,069
    I was so careful and my project is really clean but I hit that keywords limitation! so what can I do now? there is still asset and shaders I need to add my project...

    Isn't there any way to solve this limitation?
     
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Yes, by editing the shaders to comment out some keywords. For example if you know you will be using a feature that the keyword manages, you should be able to just edit it out. It's easier if you contact each author so they can assist you. I'm not sure why the limitation is 128 and not 256, but I'm sure if it was 256 someone would ask for 512.
     
  7. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,069
    Did you ever manage to work on a big project? I'm working on a company with 12 people and we working on a AAAAAAA game can be compare with big titles. our project is big and I'm pretty sure 128 keywords limitation is ridiculous for big games.

    Who should we speak with about this problem? cuz seems no one care about this limitation
     
  8. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,069
    Up.........
    It's really need to be 256 keywords
    Where and with who can I speak about that?
     
  9. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,069
    Up.........
    It's really need to be 256 keywords
    Where and with who should I speak about that?
     
  10. Dolkar

    Dolkar

    Joined:
    Jun 8, 2013
    Posts:
    576
    You're making it a much bigger deal than it is. It's not that hard to remove the keywords you don't need. 128 is already generous enough, considering that raising it even further could hurt performance.
     
    zombiegorilla likes this.
  11. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,984
    It's because if your project is optimized it's not likely to go over that limit. Go back and make sure that you really need that many keywords, and aren't just using them arbitrarily or inefficiently. If you are using third party shader do the same.