# Working With Layers in OpenXR

**URL:** <https://forum.magicleap.cloud/t/working-with-layers-in-openxr/3623>\
**Category:** OpenXR\
**Tags:** segmented-dimming\
**Created:** [June 10, 2024, 9:07pm UTC](https://forum.magicleap.cloud/t/working-with-layers-in-openxr/3623 "2024-06-10T21:07:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg.francis](https://avatars.discourse-cdn.com/v4/letter/g/e9c0ed/32.png) [@greg.francis](https://forum.magicleap.cloud/u/greg.francis)\
**Post date:** [June 10, 2024, 9:07pm UTC](https://forum.magicleap.cloud/t/working-with-layers-in-openxr/3623/1 "2024-06-10T21:07:45Z")

</div>

I'm currently modifying some OpenXR code we are currently using to render to a Meta Quest 2 using OpenGL for rendering. I'm running ML2 OS 1.7.0 and the remote render service. We are having some trouble rendering text to the Quad Composition Layer. When rendering to the eyes, I see the recommendation setting the layer flag to XR\_ENVIRONMENT\_BLEND\_MODE\_ALPHA\_BLEND. I'm wondering whether there are other similar flags to be set when rendering to the quad composition layer and/or different protocols when rendering to multiple layers with your device.

---

<div class="post-metadata">

**Author:** ![aheaney](https://avatars.discourse-cdn.com/v4/letter/a/f08c70/32.png) [@aheaney](https://forum.magicleap.cloud/u/aheaney)\
**Post date:** [June 11, 2024, 6:19pm UTC](https://forum.magicleap.cloud/t/working-with-layers-in-openxr/3623/2 "2024-06-11T18:19:02Z")

</div>

Hello,

What sort of issues do you observe when trying to render text using a quad layer on your ML2 compared to Quest?

For clarity, using the ALPHA\_BLEND environment blending mode allows you to control the behavior of the dimmer panel in your ML2 on a per pixel basis. (based on the content of the alpha channel in frames submit by your application)

> **[Global/Segmented Dimmer | MagicLeap Developer Documentation](https://developer-docs.magicleap.cloud/docs/guides/features/dimmer-feature/index.html)**
>
> Magic Leap devices have additive displays, which take the light within a user’s environment and add photons to the display, making it possible to render content. The Magic Leap 2 introduces a new low resolution panel which selectively subtracts...

As a quick test, you can effectively disable the dimmer panel by setting the blend mode to XR\_ENVIRONMENT\_BLEND\_MODE\_ADDITIVE instead.

Best,  
Adam

---

<div class="post-metadata">

**Author:** ![kbabilinski](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.magicleap.cloud/kbabilinski/32/19_2.png) [@kbabilinski](https://forum.magicleap.cloud/u/kbabilinski)\
**Post date:** [July 17, 2024, 8:19pm UTC](https://forum.magicleap.cloud/t/working-with-layers-in-openxr/3623/3 "2024-07-17T20:19:17Z")

</div>


