Skip to content

Commit 2bf88a0

Browse files
stephengoldAli-RS
authored andcommitted
solve issue #1879 (compile-time error in Skinning.glsllib) (#1942)
1 parent 40e2b48 commit 2bf88a0

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

jme3-core/src/main/resources/Common/ShaderLib/Skinning.glsllib

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ void Skinning_Compute(inout vec4 position, inout vec3 normal, inout vec3 tangent
5050
if (inHWBoneWeight.x != 0.0) {
5151
#if NUM_WEIGHTS_PER_VERT == 1
5252
position = m_BoneMatrices[int(inHWBoneIndex.x)] * position;
53-
tangent = m_BoneMatrices[int(inHWBoneIndex.x)] * tangent;
54-
normal = (mat3(m_BoneMatrices[int(inHWBoneIndex.x)][0].xyz,
53+
54+
mat3 rotMat = mat3(m_BoneMatrices[int(inHWBoneIndex.x)][0].xyz,
5555
m_BoneMatrices[int(inHWBoneIndex.x)][1].xyz,
56-
m_BoneMatrices[int(inHWBoneIndex.x)][2].xyz) * normal);
56+
m_BoneMatrices[int(inHWBoneIndex.x)][2].xyz);
57+
tangent = rotMat * tangent;
58+
normal = rotMat * normal;
5759
#else
5860
mat4 mat = mat4(0.0);
5961
mat += m_BoneMatrices[int(inHWBoneIndex.x)] * inHWBoneWeight.x;

0 commit comments

Comments
 (0)