# LOD directive in ShaderLab reference

> Reference for the LOD directive 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.5/manual/render-pipelines/universal-render-pipeline/introduction/installing-and-configuring-urp/upgrading-from-birp.md.md) and [Render pipeline feature comparison](/engine/6000.5/manual/render-pipelines/choose-a-render-pipeline/feature-comparison.md.md).

This page contains information on using a `LOD` block in your ShaderLab code to assign a LOD (level of detail) value to a SubShader.

## Render pipeline compatibility

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

## Syntax

In ShaderLab, you assign a LOD value to a SubShader by placing a `LOD` block inside a `SubShader` block.

| **Signature** | **Function**                                  |
| ------------- | --------------------------------------------- |
| LOD \[value]  | Assigns the given LOD value to the SubShader. |

## LOD values for Unity's built-in shaders

In the Built-in Render Pipeline, Unity’s built-in shaders have the following LOD values:

| **LOD value** | **Shader name**                                                   |
| ------------- | ----------------------------------------------------------------- |
| 100           | Unlit/TextureUnlit/ColorUnlit/TransparentUnlit/Transparent Cutout |
| 300           | StandardStandard (Specular Setup)Autodesk Interactive             |

## LOD values for legacy shaders

In the Built-in Render Pipeline, Unity's built-in [legacy shaders](/engine/6000.5/manual/materials-and-shaders/built-in/built-in-shader-guide.md) have the following LOD values:

| **LOD value** | **Shader name**                                                  |
| ------------- | ---------------------------------------------------------------- |
| 100           | VertexLit                                                        |
| 150           | DecalReflective VertexLit                                        |
| 200           | Diffuse                                                          |
| 250           | Diffuse DetailReflective Bumped UnlitReflective Bumped VertexLit |
| 300           | BumpedSpecular                                                   |
| 400           | Bumped Specular                                                  |
| 500           | Parallax                                                         |
| 600           | Parallax Specular                                                |

## Additional resources

* [Optimize shaders](/engine/6000.5/manual/materials-and-shaders/shaders/sl-shader-performance.md)
