Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
MetaDevXR's avatar
MetaDevXR
Protege
2 years ago

Unity URP wrist menu hand shader interfering with UI scroll masking?

I am working on a training app testing wrist menu ideas.  I am noticing that any UI masking such as used with Unity canvas Scroll View components when near the ghosted hands seems to cause the scroll masking to fail.  I suspect this is because there are two transparency shaders involved when rendering the screen one for the ghosted hand and one for the UI scroll bar.  It is likely a draw conflict of some kind in the render pipe.

The hand is using Interaction/OcculusHand shader from the Meta XR Interaction SDK v64 and the Scroll View component is using the standard Unity UI/Default shader.

Has anyone come across this issue or have suggestions?

SPECS:

Unity 2020.3.19f1 - using URP rendering.

Meta AIO SDK v64

3 Replies

Replies have been turned off for this discussion
  • jukibom's avatar
    jukibom
    Honored Guest

    Hey,

    This sounds like a stencil buffer ID conflict. You can (likely!) resolve this by making making a new material which uses UI/Default as the base and tweaking the stencil ID used in the clipping mask for the UI element.

    • MetaDevXR's avatar
      MetaDevXR
      Protege

      Thanks for the suggestion.  I'll try your idea soon since the client has signed off on using this type of menu.  I'll have to deal with it shortly.  If I your idea works, I'll post back. 

  • Here's an Interim update before I investigate the hand / scroll menu shader issue.  Just wanted to add another interesting discovery regarding hand menus.  The Quest hand tracking gets wonky when one hand is placed over another when the menu is close to the palm.  This one is not too surprising and to be expected but I didn't notice until I adjusted the menu position where I had to overlap my hands. 

    I got around this by having the menu sort of "hang" from the fingers.   It turns out that in my project having your hand at ~45 degrees with the menu hanging somewhat vertical is comfortable for the user.  This also allowed me to avoid hand over lapping when interacting and avoid the issue with the shaders.  Since this is a training app, it's satisfactory.  But for games with slick wrist/palm menus, etc, I am interested to solve menus that require overlapping hands for game development.  Might just have to put a palm menu higher offset from the palm or further back on the arm for wrist menus to avoid overlapping hands.