diff --git a/Packages/Tracking/CHANGELOG.md b/Packages/Tracking/CHANGELOG.md index be2b881613..fe176e69b3 100644 --- a/Packages/Tracking/CHANGELOG.md +++ b/Packages/Tracking/CHANGELOG.md @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Text on the toggle button in the UI Input example scene now shows On or Off based on the toggled state - Clients were not able to subscribe to the events on the PinchDetector and GrabDetector scripts as the properties were exposed as readonly. - GrabDetector detection logic was inverted, so open hands were interpreted as grabs. Now fixed. +- Fixed issue with scale of outline in GenericHandShader if hand model normals are not a normalized length ### Known Issues - Pose detection scene does not illuminate all poses in green if built for mobile headsets when using URP (2022.3), spotlights don't work as intended on Unity 6. diff --git a/Packages/Tracking/Hands/Runtime/Shaders/BiRP and URP/GenericHandShader.shader b/Packages/Tracking/Hands/Runtime/Shaders/BiRP and URP/GenericHandShader.shader index 53a464f926..f7a4055580 100644 --- a/Packages/Tracking/Hands/Runtime/Shaders/BiRP and URP/GenericHandShader.shader +++ b/Packages/Tracking/Hands/Runtime/Shaders/BiRP and URP/GenericHandShader.shader @@ -1,4 +1,4 @@ -Shader "Ultraleap/GenericHandShader" +Shader "Ultraleap/GenericHandShader" { Properties { @@ -349,7 +349,9 @@ #if _USEOUTLINE_ON float3 norm = mul((float3x3)UNITY_MATRIX_IT_MV, v.normal); - float2 offset = TransformViewToProjection(norm.xy); + // Some hand models may include non normalized (length) normals, so we normalize the length of the normal first + float3 normalizedVector = normalize(norm); + float2 offset = TransformViewToProjection(normalizedVector.xy); o.pos.xy += offset * _Outline; #endif