     normalMatrix[1] * aJointWeight.y +
     normalMatrix[2] * aJointWeight.z +
     normalMatrix[3] * aJointWeight.w;
+
+  vec4 weightedRotQuats = rotQuaternion[0] * aJointWeight.x +
+    rotQuaternion[1] * aJointWeight.y +
+    rotQuaternion[2] * aJointWeight.z +
+    rotQuaternion[3] * aJointWeight.w;
+
+  vec4 weightedTransQuats = rotQuaternion[0] * aJointWeight.x +
+    rotQuaternion[1] * aJointWeight.y +
+    rotQuaternion[2] * aJointWeight.z +
+    rotQuaternion[3] * aJointWeight.w;
+
+  // Normalize function
+  vec4 normalizedRot;
+  float xRot = weightedRotQuats[0];
+  float yRot = weightedRotQuats[1];
+  float zRot = weightedRotQuats[2];
+  float wRot = weightedRotQuats[3];
+  float lenRot = xRot * xRot + yRot * yRot + zRot * zRot + wRot * wRot;
+  if (lenRot > 0.0) {
+    lenRot = 1.0 / sqrt(lenRot);
+    normalizedRot[0] = xRot * lenRot;
+    normalizedRot[1] = yRot * lenRot;
+    normalizedRot[2] = zRot * lenRot;
+    normalizedRot[3] = wRot * lenRot;
+  }
+
+  // Normalize our dual quaternion
+  //  equation: https://www.cs.utah.edu/~ladislav/kavan07skinning/kavan07skinning.pdf
+  weightedRotQuats = weightedRotQuats / normalizedRot;
+  weightedTransQuats = weightedTransQuats / normalizedRot;
+
+  vec4 rotQuatConjugate = vec4(-weightedRotQuats[0], -weightedRotQuats[1], -weightedRotQuats[2], weightedRotQuats[3]);
+
+  float xR = weightedRotQuats[0];
+  float yR = weightedRotQuats[1];
+  float zR = weightedRotQuats[2];
+  float wR = weightedRotQuats[3];
+
+  float xT = weightedTransQuats[0];
+  float yT = weightedTransQuats[1];
+  float zT = weightedTransQuats[2];
+  float wT = weightedTransQuats[3];
+
+  float t0 = 2.0 * (-wT * xR + xT * wR - yT * zR + zT * yR);
+  float t1 = 2.0 * (-wT * yR + xT * zR + yT * wR - zT * xR);
+  float t2 = 2.0 * (-wT * zR - xT * yR + yT * xR + zT * wR);
+
+  mat4 convertedMatrix = mat4(
+      1.0 - (2.0 * yR * yR) - (2.0 * zR * zR),
+      (2.0 * xR * yR) + (2.0 * wR * zR),
+      (2.0 * xR * zR) - (2.0 * wR * yR),
+      0,
+      (2.0 * xR * yR) - (2.0 * wR * zR),
+      1.0 - (2.0 * xR * xR) - (2.0 * zR * zR),
+      (2.0 * yR * zR) + (2.0 * wR * xR),
+      0,
+      (2.0 * xR * zR) + (2.0 * wR * yR),
+      (2.0 * yR * zR) - (2.0 * wR * xR),
+      1.0 - (2.0 * xR * xR) - (2.0 * yR * yR),
+      0,
+      t0,
+      t1,
+      t2,
+      1
+      );
 
   // Lighting
   vec3 transformedNormal = weightedNormalMatrix * aVertexNormal;

    if (aJointIndex.x == float(i)) {
      jointMatrix[0] = boneMatrices[i];
      normalMatrix[0] = boneNormals[i];
      rotQuaternion[0] = float(i);
      transQuaternion[0] = float(i);
    }
    if (aJointIndex.y == float(i)) {
      jointMatrix[1] = boneMatrices[i];
      normalMatrix[1] = boneNormals[i];
      rotQuaternion[1] = float(i);
      transQuaternion[1] = float(i);
    }
    if (aJointIndex.z == float(i)) {
      jointMatrix[2] = boneMatrices[i];
      normalMatrix[2] = boneNormals[i];
      // boneDualQuaternions[2] = boneDualQuaternions[i];
      rotQuaternion[2] = float(i);
      transQuaternion[2] = float(i);
    }
    if (aJointIndex.w == float(i)) {
      jointMatrix[3] = boneMatrices[i];
      normalMatrix[3] = boneNormals[i];
      rotQuaternion[3] = float(i);
      transQuaternion[3] = float(i);
    }
  }


  //  i.e. float array of indices instead of matrices
  mat4 jointMatrix[4];
  mat3 normalMatrix[4];
  vec4 rotQuaternion[4];
  vec4 transQuaternion[4];

  mat4 weightedJointMatrix;
  mat3 weightedNormalMatrix;
