I’m trying to cut a build, and I’m getting a bunch of “maximum keywords exceeded” and psize0 max registers exceeded errors. I distinctly remember being able to build despite this in previous versions; is there an argument I can change somewhere to allow the build to proceed?
As an aside, we’re up against the keyword limit. Is there a way to remove the keywords from built-in-shaders that we’re not using (ie speedtree etc)
We encountered the same issue and had to reduce our number of keywords. Usually you can save a lot of them just deleting packages or shaders you don’t use. For instance, we didn’t use any of the metallic Uber shaders, so we deleted them all.
As for SpeedTree shaders keyword, I think you could import them using the built-in shaders package and then strip out the keywords from the shader code.
And Unity, needless to say that preventing the user to build because of some keywords limit is stupid Warning would be enough.
It’s funny - I’m seeing the same thing here. No “maximum keywords exceeded” message, but it looks like errors in shaders that aren’t conditionally rigged for d3d9 will tank the build as well.
Agreed, this is a big issue for us as well. Guess there’s nothing for it but to clean up our shaders, but it’s a patch at best since we use ShaderForge.
I got around the d3d9 errors by disabling d3d9 in the player settings; you can unselect “auto-select API” for windows and choose only d3d11 which gets rid of the frustrating 12 register limitation.
As an update: I did manage to get the build working but out of the 128 keywords I identified 70 or so that weren’t in my project, related to things like SpeedTree or the Terrain system that we’re not using at all. Unfortunately there’s no way to remove these.
But I did manage to get by with some changes to our postFX; several available image effects don’t take advantage of the “_” multi-compile option and use keywords for off-states.