Fix transform issue of skinned mesh
[platform/core/uifw/dali-toolkit.git] / automated-tests / resources / dli_pbr.vsh
index d1be304..fa6b480 100644 (file)
@@ -128,9 +128,13 @@ void main()
   position = bone * position;\r
   normal = (bone * vec4(normal, 0.0)).xyz;\r
   tangent = (bone * vec4(tangent, 0.0)).xyz;\r
-#endif\r
 \r
+  normal = normalize(normal);\r
+  tangent = normalize(tangent);\r
+  vec4 vPosition = position;\r
+#else\r
   vec4 vPosition = uModelMatrix * position;\r
+#endif\r
 \r
   vNormal = normalize(uNormalMatrix * normal);\r
 \r