leapmotion / LeapMotionCoreAssets

Unity Assets for Leap Motion v2 Skeletal Tracking
Apache License 2.0
166 stars 81 forks source link

Feature passthrough upgrade #63

Closed Amarcolina closed 9 years ago

Amarcolina commented 9 years ago

Upgrade to the passthrough system for unity, as well as the underlying shaders. This allows multi-layered effects to be more easily applied, and a new LeapCG include makes it easy to write a single shader that will work for any Leap device.

New workflow for getting passthrough into an oculus scene:

Place LeapImageRetriever onto the both the Left and Right eye anchors. Place a LeapImageBasedMaterial onto any renderer that will receive images from the Leap, and then assign a material that uses a Leap compatible shader onto that object. Check out the LightweightPassthrough, and LightweightPassthroughNoOculus scenes for an example of the new system. You can freely switch devices at runtime and the proper shader variant will be chosen.