# 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:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JunsuSong](https://avatars.discourse-cdn.com/v4/letter/j/6a8cbe/32.png) [@JunsuSong](https://forum.magicleap.cloud/u/JunsuSong)\
**Post date:** [June 13, 2025, 12:22pm UTC](https://forum.magicleap.cloud/t/question-about-applying-segmented-dimmer-to-ui-elements/5881/1 "2025-06-13T12:22:52Z")

</div>

Give us as much detail as possible regarding the issue you’re experiencing:

**Unity Editor version** : Unity 2022.3  
**ML2 OS version** : v1.12.0  
**Unity SDK version** : 2.6.0  
**Host OS** : Windows, MacOS

**Error messages from logs** (syntax-highlighting is supported via Markdown):

I’m reaching out with a question regarding the Segmented Dimmer feature.

I followed this video demonstration:

[![](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/e/e8f9ff774200abfe31de3edf372e415bb62840a7.jpeg "Transitioning Between Realities: ML2 Dynamic Dimmer And Unity") ](https://www.youtube.com/watch?v=5PcN13KvN8g)

and tested the Magic Leap 2 Dimmer functionality as shown. I created multiple objects in the scene to observe how the Segmented Dimmer operates. In the video, using the `MLSegmentedDimmer.Activate()` and `Deactivate()` methods allows switching the Blend Mode between Additive and Alpha Blend.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/a/a55b62691624570118a7548be37c7950aa86ca14.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/3/35e0eced6dbd009d0678c073c1ab2b89a66a97e7.png)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/2X/1/1a6189039f3c9a5de1c65dabd0f3e9320c77c240.png)

However, during my tests, I noticed that certain elements—like my Logger, Text, and Canvas buttons—do **not** respond to the Segmented Dimmer.  
I would like to know:  
**Is there a way to enable Segmented Dimmer effects for UI elements such as logger panels, text overlays, or buttons?**  
I would especially like the text elements to be affected.

According to the documentation here:

> **[Design Guidelines | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/features/dimmer-feature/dimmer-design-guidelines/)**
>
> In this article, we discuss how you can use the global and segmented dimmer in your applications to experiment with improving the contrast and opacity of your content. resulting in text that is more legible, menus with greater contrast to the...

multi-line text (whether floating or with a backplate) is supported by Segmented Dimmer. I’m trying to apply it similarly.

Any guidance on how to ensure the Segmented Dimmer affects these kinds of objects would be greatly appreciated.

Thank you in advance for your help!

---

<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

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/magicleap1/original/1X/bd9b737a4d45ea243aa7eb177d60a773b806899a.svg) [@system](https://forum.magicleap.cloud/u/system)\
**Post date:** [June 27, 2025, 3:27pm UTC](https://forum.magicleap.cloud/t/question-about-applying-segmented-dimmer-to-ui-elements/5881/3 "2025-06-27T15:27:43Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
