# Lighting Optimization in Unity URP

*Practical techniques to cut lighting costs while preserving quality in multiplayer projects*

![Lighting Optimization in Unity URP](https://pub-07fb5e4955ba485b822d6b388be96d9a.r2.dev/627e11da-a23a-494d-9964-843e8f31c507/lighting-optimization-in-unity-urp/hero-21b0738a-1baf-4947-9db3-4cc4907bd2b2.jpg)

**TL;DR:**

- Baked lighting is significantly cheaper to render than dynamic real-time lighting.
- Disabling shadows on additional lights and lowering shadow atlas resolutions drastically reduces GPU overhead.
- Light probes offer an efficient way to illuminate dynamic objects within baked environments.
- Optimizing URP asset settings is essential for maintaining high frame rates in multiplayer games.

Every game developer wants beautiful, immersive worlds, but dynamic lighting can quickly drag your frame rates down into the single digits, especially in demanding multiplayer environments. In Unity's Universal Render Pipeline (URP), finding the sweet spot between stunning visuals and smooth performance is one of the most critical optimization challenges you will face. When every millisecond on the CPU and GPU counts, default lighting settings simply will not cut it.

To keep your game running smoothly across target devices, you need to understand where your rendering budget is going. By shifting static geometry to baked lighting and aggressively managing your shadow rendering—such as by reducing the Main Light shadow resolution and lowering the Additional Lights shadow atlas resolution—you can dramatically reclaim lost performance without sacrificing your game's atmosphere.

In this guide, we will break down the exact settings, workflows, and best practices needed to master URP lighting optimization. Let us start by looking at the fundamental choice that shapes your entire rendering pipeline: choosing between real-time and baked lighting.

## Stop Calculating, Start Baking: Optimizing Static Geometry

This choice is the single most impactful decision you will make for your game's performance. Every object in your scene that does not move—such as walls, terrain, and structural assets—should be marked as static. By doing this, you instruct Unity to precompute all light bounces, ambient occlusion, and soft shadows during build time, saving them directly into lightmap textures. Instead of burning precious GPU cycles calculating complex light math every single frame, your hardware simply samples a 2D texture.

Of course, a static world needs dynamic elements like players and enemies to feel alive. Rather than introducing expensive real-time lights to illuminate these moving assets, you can bridge the gap using **Light Probes**. Light Probes capture the baked light passing through empty space and project it onto moving objects as they traverse the scene. This gives you the illusion of complex, unified lighting at a fraction of the performance cost.

However, even with a heavily baked scene, you will occasionally need real-time sources for dynamic effects. Knowing how to handle these extra sources is where your next optimization wins lie.

## Keep Your Shadows Lean: Optimizing Additional Lights

When you absolutely must use real-time lights, you have to be ruthless with their settings. Every additional real-time light in URP is a potential performance killer, particularly when it comes to rendering shadows. To keep your frame rates high, your main directional light should be the only source allowed to cast real-time shadows in most scenarios.

Quick Wins for Additional Lights

**Disable additional shadows:** Under your URP Asset settings, disabling shadows on extra lights is one of the fastest ways to reclaim GPU performance. Simply toggle **Additional Lights > Cast Shadows** to **Disable**.**Shift to per-vertex lighting:** For secondary lights that don't require pixel-perfect accuracy, configure them to use per-vertex mode in Forward rendering. This moves the calculation burden from the pixel shader to the vertex shader, which is significantly cheaper.**Rely on Light Probes:** Instead of dotting your scene with real-time point lights to illuminate moving objects, let Light Probes do the work. They provide realistic ambient and direct light simulation without the per-frame overhead of active light sources.

But what if your game's design absolutely demands real-time shadows on more than just your primary light? If you cannot avoid extra shadow-casting lights, your next line of defense is tightly controlling how those shadows are rendered.

## Squeezing Performance from Shadows: Resolution and Atlas Tuning

That defense begins directly within your URP Asset settings, where shadow resolution dictates exactly how hard your hardware has to work. Real-time shadows are notorious performance killers, but you can claw back significant frame time by aggressively managing your shadow maps.

Start by lowering the **Main Light Shadow Resolution**. While a 4096px shadow map looks crisp, it heavily taxes both your GPU bandwidth and VRAM. Dropping this to 2048px or even 1024px often yields a massive performance boost with negligible visual loss on typical player screens. Next, tackle your **Additional Lights Shadow Atlas Resolution**. In URP, all additional real-time shadow-casting lights are packed into a single texture atlas. If this atlas is set too high, your rendering pipeline will choke. Reducing this atlas resolution ensures your secondary lights don't drag down your frame rate.

Of course, you shouldn't tune these settings blindly. Always profile your game using Unity's Profile Analyzer and Frame Debugger to test the direct impact of these adjustments on your CPU and GPU load. Look for reductions in draw calls and GPU render times. Finding that sweet spot between sharp edges and smooth frame rates is key to a polished player experience.

But what if your project isn't a 3D environment at all? If you are building a flat, stylized world, the rules of lighting change entirely.

## Going Flat: High-Performance 2D Lighting in URP

When you transition to 2D, URP's 2D Lighting system takes over, introducing its own unique set of performance bottlenecks. The most common culprit is the abuse of **Blend Styles**. Every active Blend Style you define in your 2D Renderer Asset requires an additional render pass. To keep performance high, you should use as few Blend Styles as possible.

If you must use multiple styles, you can claw back performance by reducing the render texture scale of your Blend Styles. This lowers the resolution of the lighting buffer and eases the GPU's fill-rate burden.

Streamlining 2D Shadow Casters

Just like in 3D, 2D shadows are expensive. Each ShadowCaster2D component adds to the CPU overhead. Instead of attaching a caster to every individual prop, combine your static colliders using a CompositeCollider2D or manually place simplified, single-shape shadow casters over groups of background objects.

By keeping your blend styles lean, scaling down your render textures, and merging shadow geometry, you can deliver crisp, atmospheric 2D worlds that run beautifully on any hardware.

## Conclusion

- Bake static lighting — Replacing real-time calculations with baked lightmaps drastically reduces rendering costs for static environments.
- Leverage light probes — Use light probes to seamlessly illuminate dynamic objects within baked scenes without relying on expensive real-time sources.
- Streamline real-time shadows — Disable shadows on additional lights and lower shadow resolution or atlas sizes to free up valuable CPU and GPU cycles.
- Optimize 2D light setups — Keep 2D performance high by limiting blend styles, scaling down render textures, and merging shadow caster components.
- Profile your changes — Always measure performance improvements using Unity profiling tools to ensure your lighting adjustments translate to actual frame rate gains.

Check out our range of Unity URP optimization tools at bigfatgames.com to streamline your game's performance even further.

## Frequently Asked Questions

### Why is baked lighting preferred over real-time lighting in Unity URP?

Baked lighting pre-computes light and shadow data into textures called lightmaps. As noted in Unity's official guides, **the rendering cost of a lightmap texture is always much cheaper than dynamic lighting** because it eliminates expensive per-frame CPU and GPU calculations at runtime.

### How can I optimize shadows for additional lights in URP?

To save performance, you should navigate to your URP Asset and under **Additional Lights > Cast Shadows**, disable this option. Additionally, reducing the shadow atlas resolution for additional lights helps lower the overall rendering load.

### What is the best way to handle lighting for dynamic objects in a baked scene?

Use Light Probes to capture lighting information in empty spaces. Dynamic objects can then sample these probes at runtime, providing realistic lighting transitions without the high performance cost of real-time lights.

### How do I optimize 2D lights in URP?

For 2D projects, Unity recommends that you **use as few Blend Styles as possible** and try reducing the render texture scale of your Blend Styles to optimize light rendering performance.

## Sources

- [https://developer.android.com/games/optimize/lighting-for-mobile-games-with-unity](https://developer.android.com/games/optimize/lighting-for-mobile-games-with-unity)
- [https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@14.0/manual/optimize-for-better-performance.html](https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@14.0/manual/optimize-for-better-performance.html)
- [https://docs.unity3d.com/6000.2/Documentation/Manual/urp/configure-for-better-performance.html](https://docs.unity3d.com/6000.2/Documentation/Manual/urp/configure-for-better-performance.html)
- [https://discussions.unity.com/t/how-to-optimise-2d-lights/782072](https://discussions.unity.com/t/how-to-optimise-2d-lights/782072)
