leapmotion / LeapMotionCoreAssets

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

Fix dragonfly undefined correction #128

Closed Amarcolina closed 9 years ago

Amarcolina commented 9 years ago

The correction for the IR channel occasionally resulted in negative values. When taking the square root of these values it resulted in undefined and usually glitchy artifacts. The ir value is now saturated before it goes into the square root function.

Check out the first commit to see the changes made, the second commit is just tabs to spaces.

@RandomOutput @protodeep

testmasterbright commented 9 years ago

Hey Alex, can you give me access to this branch? I can't seem to access it.

testmasterbright commented 9 years ago

I don't see a difference on the machine that got the robust issue. Are there particular GPU settings that can expose the issue so I can replicate it and verify the fix?

Amarcolina commented 9 years ago

Unfortunately the behavior this is fixing is not defined at all (raising a negative number to a power), so I haven't been able to find a good way to test it accurately. On my computer at least, switching between directX9 and directX11 seems to help cause the problem to come and go.