Version: Unity 6.1 Alpha (6000.1)
Language : English
Troubleshooting shaders
Fixing hitches or stalls

Error and loading shaders

Sometimes, Unity can’t render objects with regular shadersA program that runs on the GPU. More info
See in Glossary
. 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. Use BatchRendererGroup.SetErrorMaterial to set a material to use instead.

If your project uses the Universal Rendering Pipeline (URP), Unity might render an object using the default error shader if the object uses a shader from the Built-In Render PipelineA series of operations that take the contents of a Scene, and displays them on a screen. Unity lets you choose from pre-built render pipelines, or write your own. More info
See in Glossary
. Refer to Converting your shaders for more information.

The loading shader

Unity renders an object with the loading shader to indicate that Unity is compiling the shader variantA verion of a shader program that Unity generates according to a specific combination of shader keywords and their status. A Shader object can contain multiple shader variants. More info
See in Glossary
needed to display that object.

Unity shows the loading shader in the Unity Editor when asynchronous shader compilation is enabled, or in a development buildA development build includes debug symbols and enables the Profiler. More info
See in Glossary
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. Use BatchRendererGroup.SetLoadingMaterial to set a material to use instead.

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.

Troubleshooting shaders
Fixing hitches or stalls