# Fallback block in ShaderLab reference

> Reference for the Fallback block in Shaderlab.

> **Important:**
>
> The Built-In Render Pipeline is deprecated and will be made obsolete in a future release.
>
> It remains supported, including bug fixes and maintenance, through the full Unity 6.7 LTS lifecycle.
>
> For more information on migration, refer to [Migrating from the Built-In Render Pipeline to the Universal Render Pipeline](/engine/6000.7/manual/render-pipelines/universal-render-pipeline/introduction/installing-and-configuring-urp/upgrading-from-birp.md.md) and [Render pipeline feature comparison](/engine/6000.7/manual/render-pipelines/choose-a-render-pipeline/feature-comparison.md.md).

This page contains information on using a `Fallback` block in your ShaderLab code to assign a fallback Shader object. For information on how a Shader object works, and how Unity chooses when to use a fallback, see [Shader objects introduction](/engine/6000.7/manual/materials-and-shaders/shaders/writing-custom/shader-writing/shader-objects.md).

## Render pipeline compatibility

| **Feature name**              | **Universal Render Pipeline (URP)** | **High Definition Render Pipeline (HDRP)** | **Custom SRP** | **Built-in Render Pipeline** |
| ----------------------------- | ----------------------------------- | ------------------------------------------ | -------------- | ---------------------------- |
| **ShaderLab: Fallback block** | Yes                                 | Yes                                        | Yes            | Yes                          |

## Syntax

To assign a fallback, you place a `Fallback` block inside a `Shader` block.

| **Signature**       | **Function**                                                                                                                                                                                                             |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Fallback "<name>"` | If no compatible SubShaders are found, use the named Shader object.                                                                                                                                                      |
| `Fallback Off`      | Do not use a fallback Shader object in place of this one. If no compatible SubShaders are found, display the [error shader](/engine/6000.7/manual/materials-and-shaders/shaders/shader-troubleshooting/shader-error.md). |

## Example

This example code demonstrates the syntax for creating a Shader object that has a named fallback.

```lang-hlsl
Shader "Examples/ExampleFallback"
{
    SubShader
    {
        // Code that defines the SubShader goes here.

        Pass
        {                
              // Code that defines the Pass goes here.
        }
    }

    Fallback "ExampleOtherShader"
}
```
