declare const _default: "\nattribute vec4 vertex_boneWeights;\nattribute vec4 vertex_boneIndices;\n\nuniform vec4 matrix_pose[BONE_LIMIT * 3];\n\nvoid getBoneMatrix(const in float i, out vec4 v1, out vec4 v2, out vec4 v3) {\n // read 4x3 matrix\n v1 = matrix_pose[int(3.0 * i)];\n v2 = matrix_pose[int(3.0 * i + 1.0)];\n v3 = matrix_pose[int(3.0 * i + 2.0)];\n}\n\nmat4 getSkinMatrix(const in vec4 indices, const in vec4 weights) {\n // get 4 bone matrices\n vec4 a1, a2, a3;\n getBoneMatrix(indices.x, a1, a2, a3);\n\n vec4 b1, b2, b3;\n getBoneMatrix(indices.y, b1, b2, b3);\n\n vec4 c1, c2, c3;\n getBoneMatrix(indices.z, c1, c2, c3);\n\n vec4 d1, d2, d3;\n getBoneMatrix(indices.w, d1, d2, d3);\n\n // multiply them by weights and add up to get final 4x3 matrix\n vec4 v1 = a1 * weights.x + b1 * weights.y + c1 * weights.z + d1 * weights.w;\n vec4 v2 = a2 * weights.x + b2 * weights.y + c2 * weights.z + d2 * weights.w;\n vec4 v3 = a3 * weights.x + b3 * weights.y + c3 * weights.z + d3 * weights.w;\n\n // add up weights\n float one = dot(weights, vec4(1.0));\n\n // transpose to 4x4 matrix\n return mat4(\n v1.x, v2.x, v3.x, 0,\n v1.y, v2.y, v3.y, 0,\n v1.z, v2.z, v3.z, 0,\n v1.w, v2.w, v3.w, one\n );\n}\n"; export default _default;