# Question About Applying Segmented Dimmer to UI Elements

**URL:** <https://forum.magicleap.cloud/t/question-about-applying-segmented-dimmer-to-ui-elements/5881>\
**Category:** Unity Development\
**Tags:** development, unity, segmented-dimming, global-dimmer\
**Created:** [June 13, 2025, 12:22pm UTC](https://forum.magicleap.cloud/t/question-about-applying-segmented-dimmer-to-ui-elements/5881 "2025-06-13T12:22:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cfeist](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/cfeist/32/1768_2.png) [@cfeist](https://forum.magicleap.cloud/u/cfeist)\
**Post date:** [June 13, 2025, 3:26pm UTC](https://forum.magicleap.cloud/t/question-about-applying-segmented-dimmer-to-ui-elements/5881/2 "2025-06-13T15:26:49Z")

</div>

Hey @JunsuSong ,

Are you using OpenXR or MagicLeap as your XR Plugin Provider?

If you are using OpenXR, `MLSegmentedDimmer.Activiate()` and `Deactivate()` will not work.

You will need to do something similar to this:

```csharp
// Get the MagicLeapRenderingExtensionsFeature from the OpenXR settings
MagicLeapRenderingExtensionsFeature renderFeature = OpenXRSettings.Instance.GetFeature<MagicLeapRenderingExtensionsFeature>();
// Apply the new blend mode to the render feature
renderFeature.BlendMode = XrEnvironmentBlendMode.Additive;

```

Please use this guide as a reference and for more detailed information

> **[Segmented Dimming | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/unity-openxr/rendering-extensions/segmented-dimming/#set-default-blend-mode)**
>
> The Magic Leap 2 is a powerful augmented reality (AR) device capable of enhancing user experiences through various features, including Dynamic Dimming. This technology uses the Alpha buffer to automatically generate a dimmer mask, making the content...

Let me know if you get this working or if you have any more questions!

Best,  
Corey

---

_[View the full topic](https://forum.magicleap.cloud/t/question-about-applying-segmented-dimmer-to-ui-elements/5881)._
