Skip to content

Commit 9a83ec3

Browse files
authored
Merge pull request #1690 from ultraleap/mjp/make_outline_hands_outline_independent_of_normal_scale
Mjp/make outline hands outline independent of normal scale
2 parents a26bc7e + a7da7f6 commit 9a83ec3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Packages/Tracking/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3232
- Text on the toggle button in the UI Input example scene now shows On or Off based on the toggled state
3333
- Clients were not able to subscribe to the events on the PinchDetector and GrabDetector scripts as the properties were exposed as readonly.
3434
- GrabDetector detection logic was inverted, so open hands were interpreted as grabs. Now fixed.
35+
- Fixed issue with scale of outline in GenericHandShader if hand model normals are not a normalized length
3536
- Fixed issue with attachment hands red/green/blue materials meta file IDs clashing with the IDs of the files in the original examples, since being moved
3637

3738
### Known Issues

Packages/Tracking/Hands/Runtime/Shaders/BiRP and URP/GenericHandShader.shader

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Shader "Ultraleap/GenericHandShader"
1+
Shader "Ultraleap/GenericHandShader"
22
{
33
Properties
44
{
@@ -349,7 +349,9 @@
349349

350350
#if _USEOUTLINE_ON
351351
float3 norm = mul((float3x3)UNITY_MATRIX_IT_MV, v.normal);
352-
float2 offset = TransformViewToProjection(norm.xy);
352+
// Some hand models may include non normalized (length) normals, so we normalize the length of the normal first
353+
float3 normalizedVector = normalize(norm);
354+
float2 offset = TransformViewToProjection(normalizedVector.xy);
353355
o.pos.xy += offset * _Outline;
354356
#endif
355357

0 commit comments

Comments
 (0)