• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
2
Question by mo123mo · Sep 28, 2019 at 10:53 AM · effect

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.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

4 Replies

· Add your reply
  • Sort: 
avatar image
4

Answer by RobAnthem · Mar 06, 2020 at 11:33 PM

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.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Levr01 · Apr 29, 2020 at 11:10 AM 0
Share

After done (Replace ALL "multi_compile " with "multi_compile_local ") part of my shaders been crashed and works wrong. Becareful

avatar image
1

Answer by zero4444 · Jan 04, 2020 at 11:26 AM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
1

Answer by Thrawn75 · May 02, 2020 at 03:44 PM

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image FiveFingerStudios · May 08, 2020 at 10:59 AM 0
Share

Does Shader Control work with Unity 2017.4? I'm stuck on that version for now.

avatar image Thrawn75 FiveFingerStudios · May 08, 2020 at 11:09 AM 0
Share

It requires 2018.2 or later. However you can download an older version that runs on 2017.4 from kronnect.com website.

avatar image
0

Answer by JeffreyStrate · Aug 13, 2020 at 10:22 AM

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

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Follow this Question

Answers Answers and Comments

187 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Does any one knows how to replicate this effect in unity 3d ? 0 Answers

Animate Line Renderer using Shader unity5 0 Answers

Want to do an on-hit effect for a trail renderer in 2D 0 Answers

Shader blurs only one shader 0 Answers

How can i disable/enable slowly the blur effect using the blur script ? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges