Commit f5d1a36ff8732e6f49153821580df6371da52717

Authored by seungho baek
1 parent f96b8715

Fix skinning issue

Change-Id: I2de5addc54cb948e653c63106e34f095e0b43376
Signed-off-by: seungho baek <sbsh.baek@samsung.com>
examples/scene3d/scene3d-example.cpp
@@ -197,7 +197,6 @@ Actor LoadScene(std::string sceneName, CameraActor camera, std::vector&lt;Dali::Ani @@ -197,7 +197,6 @@ Actor LoadScene(std::string sceneName, CameraActor camera, std::vector&lt;Dali::Ani
197 { 197 {
198 if(auto actor = scene.CreateNodes(iRoot, resourceChoices, nodeParams)) 198 if(auto actor = scene.CreateNodes(iRoot, resourceChoices, nodeParams))
199 { 199 {
200 - scene.ConfigureSkeletonJoints(iRoot, resources.mSkeletons, actor);  
201 scene.ConfigureSkinningShaders(resources, actor, std::move(nodeParams.mSkinnables)); 200 scene.ConfigureSkinningShaders(resources, actor, std::move(nodeParams.mSkinnables));
202 ConfigureBlendShapeShaders(resources, scene, actor, std::move(nodeParams.mBlendshapeRequests)); 201 ConfigureBlendShapeShaders(resources, scene, actor, std::move(nodeParams.mBlendshapeRequests));
203 202
resources/shaders/dli_pbr.vsh
@@ -128,9 +128,13 @@ void main() @@ -128,9 +128,13 @@ void main()
128 position = bone * position; 128 position = bone * position;
129 normal = (bone * vec4(normal, 0.0)).xyz; 129 normal = (bone * vec4(normal, 0.0)).xyz;
130 tangent = (bone * vec4(tangent, 0.0)).xyz; 130 tangent = (bone * vec4(tangent, 0.0)).xyz;
131 -#endif  
132 131
  132 + normal = normalize(normal);
  133 + tangent = normalize(tangent);
  134 + vec4 vPosition = position;
  135 +#else
133 vec4 vPosition = uModelMatrix * position; 136 vec4 vPosition = uModelMatrix * position;
  137 +#endif
134 138
135 vNormal = normalize(uNormalMatrix * normal); 139 vNormal = normalize(uNormalMatrix * normal);
136 140