Version: 2020.3
计算着色器
内置着色器

Error and loading shaders

Sometimes, Unity can’t render objects with regular shaders. When this happens, Unity renders the objects with special shaders:

The special shader that Unity uses depends on the reason that Unity can’t use the original shader.

The default error shader

Unity renders an object with the default error shader when there’s a problem with that object’s material or shader; for example, if no material is assigned, if the shader doesn’t compile, or if the shader isn’t supported.

Unity uses the default error shader in the Unity Editor, and in builds.

The default error shader is magenta (bright pink).

The magenta error shader.
The magenta error shader.

When you use the BatchRendererGroup API, Unity doesn’t display the default error shader.

The loading shader

Unity renders an object with the loading shader to indicate that Unity is compiling the shader variant needed to display that object.

Unity shows the loading shader in the Unity Editor when asynchronous shader compilation is enabled, or in a development build when Shader Live Link support is enabled.

The loading shader is cyan (bright blue).

The cyan loading shader.
The cyan loading shader.

When you use the BatchRendererGroup API, Unity doesn’t display the loading shader.

The Virtual Texturing error material

If your project uses Streaming Virtual Texturing (SVT), Unity uses a special material to indicate problems in your SVT setup. For more information, see Virtual Texturing error material.

计算着色器
内置着色器