Build in URP failed due to PhysicalMaterial3DsMax

Hey there, I’m trying to build our project for URP version 12.12 using Unity 2021.2.7f1 to the Nintendo Switch platform but I’m getting 2 errors:

maximum ps_5_0 sampler register index (16) exceeded at {}(294) (on switch)```

![](https://i.imgur.com/jB361Iv.png) 

This **errors only appear when I'm trying to build for the Nintendo Switch**. The shader appears to be native of URP since it's inside the URP Package (Packages/Universal RP/Runtime/Materials/PhysicalMaterial3DsMax) so we are quite confused about this since we thought that Unity supported URP-Nintendo Switch.

The shaders of course shouldn't be used in production since they come with the default model when we import something from 3DsMax, but sometimes some assets *slip away* or are placeholders until they are touched up, but we really can't find said assets this time, I even wrote a tool to find all prefabs using this shader and 0 results showed up. Perhaps there is an .fbx thrown into a scene that we haven't caught yet but it's quite time consuming, so I'm here to ask for **help with this if there is a better way** of fixing the shader (which is quite difficult to do since it's inside a package and you can't modify packages), finding the assets or just __excluding the shader to be built entirely__.
Or maybe the issue is a Unity bug! That could be a possibility.

Thanks! Cheers!

Are you sure it’s actually the shaders that are preventing you from building to Switch? Look under the Build failed log, maybe the problem is elsewhere.
We never had an error in a shader preventing us from building to Switch.

Looks like it wasn’t? But it was? Meaning, I reimported the entire project + right click - import on the shader and it worked. So weird.

Glad it’s fixed. :slight_smile:
Look under the build log and it shows you the exact problem. In our experience, we never had a console build fail for a shader. The shader won’t work, but the game compiles fine. :slight_smile: