Left hand transparent in Build but visible in Editor
albrrt opened this issue · 1 comments
I tried building the Interaction Objects scene with the Desktop Leap Rig in Desktop Mode A. Both hands look good in the Editor Game View but in the build, the left hand renders transparent.
Interestingly, the left hand does not render transparent in the build, if I use the XR Leap Rig.
It only seems to happen with the Desktop Leap Rig. Which is odd, because both left hands use the same material with the same shader (LeapMotion/VertexOffsetShader).
If I untick the "Is Left Hand ?" boolean in the LeftHand material, the left hand renders correctly in the build.
Does anyone know why this is happening?
Steps to reproduce:
- Create a new 3D project with the default render pipeline in Unity 2019.4.31f1 (LTS)
- Import the Core, Hands and Interaction Engine packages.
- Open the Interaction Objects scene from Assets > Leap Motion > Modules > Interaction Engine > Examples > 1. Interaction Objects
- Disable the XR Leap Rig game object
- Enable the Desktop Leap Rig game object
- Set the Desktop Leap Rig game object to Desktop Mode A
- Play the scene in the editor: the left hand renders correctly
- Build the scene for Windows Standalone x86_x64
- Play the build: the left hand renders transparent
Thank you for your help
Thank you for your bug report.
The simplest fix is to not use the VertexOffsetShader. The LeapXRProvider late latches the most recent hand transforms in OnPreCull to reduce latency in XR. The normal service provider does not, leaving uninitialized memory where there should be an identity matrix.