# Configure shader optimizations for Meta Quest

> Configure additional shader optimizations to improve graphics performance on Meta Quest.

Configure additional shader optimizations to improve graphics performance on Meta Quest.

Unity automatically enables some shader optimizations for Meta Quest build targets to reduce GPU frame time, shader instruction count, and memory bandwidth, and to improve GPU occupancy. Unity also provides additional shader optimizations that you can configure in your project, as described in the following section.

Unity applies enabled optimizations to the Universal Render Pipeline’s (URP) prebuilt shaders (Lit, Simple Lit, Shader Graph nodes) and Scriptable Render Pipeline (SRP) library functions. If your project uses custom shaders that rely on SRP library functions, your custom shaders also inherit these optimization techniques for the Meta Quest platform.

## Configurable shader optimizations

When you [Configure the Meta Quest build profile](/engine/6000.5/manual/xr/configuring-project-for/meta-quest-develop/build-profile.md), Unity automatically applies some shader optimizations to reduce GPU frame time. You can also configure the following additional shader optimizations in your project:

| **Optimization**                                     | **Description**                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| ---------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Skip shadow map lookups for backfacing surfaces**  | Skips shadow map lookups on surfaces that face away from the shadow-casting light.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| **Skip lighting calculations for backfacing pixels** | Skips lighting calculations for pixel surfaces that face away from the shadow-casting light.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| **Light evaluations**                                | When attenuation is `<=0`, the Forward and Forward+ renderers skip lighting calculations when a light doesn't affect the current pixel. This reduces unnecessary light evaluations to improve GPU performance.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| **Forward light loop optimization**                  | Enables a point-light-only forward light loop variant on Meta Quest for batches with no affecting spotlights. This reduces per-light shader work and improves GPU efficiency.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| **Light loop unroll**                                | When a URP Asset has one additional light per object, shaders automatically unroll the light loop. This improves runtime performance but increases shader variant count and build times.**Note**: To enable this optimization, set the [URP asset](/engine/6000.5/manual/render-pipelines/universal-render-pipeline/urp-reference/universalrp-asset.md#lighting)’s **Per Object Limit** to `1`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| **Camera projection query**                          | Optimizes camera projection query to streamline checks for whether the active [camera](/engine/6000.5/manual/cameras/birp/class-camera.md) uses perspective or orthographic projection. With this optimization, the camera projection type always resolves as perspective projection.**Important**: If your shaders use [orthographic cameras](/engine/6000.5/script-reference/unityengine/camera/orthographic.md), you must enable the `_ META_QUEST_ORTHO_PROJ` shader keyword to restore correct orthographic detection. This optimization increases shader variant count and build times.To enable the `_ META_QUEST_ORTHO_PROJ` keyword, go to the **Keyword Declaration Overrides** in the **Shader Build Settings** (menu > **Edit** > **Project Settings** > **Graphics** tab). Expand the `_ META_QUEST_ORTHO_PROJ` keyword, and check the boxes next to `_` and `META_QUEST_ORTHO_PROJ` and **Apply** your changes. |

## Additional resources

* [Configure the Meta Quest build profile](/engine/6000.5/manual/xr/configuring-project-for/meta-quest-develop/build-profile.md)
* [Meta Quest build profile settings reference](/engine/6000.5/manual/xr/configuring-project-for/meta-quest-develop/build-profile-settings.md)
* [Optimize for untethered XR devices in URP](/engine/6000.5/manual/xr/graphics/untethered-device-optimization.md)
* [Choose a prebuilt shader in URP](/engine/6000.5/manual/materials-and-shaders/built-in/shaders-in-universalrp/choose.md)
