export const sdefVertex = /* glsl */ "\n#ifndef SDEFVERTEX\n#define SDEFVERTEX\n#if !defined(BAKED_VERTEX_ANIMATION_TEXTURE) && defined(SDEF)\n#if NUM_BONE_INFLUENCERS>0\n{float weight0=matricesWeights[0];float weight1=matricesWeights[1];\n#ifdef BONETEXTURE\nmat4 transformMatrix0=readMatrixFromRawSampler(boneSampler,matricesIndices[0]);mat4 transformMatrix1=readMatrixFromRawSampler(boneSampler,matricesIndices[1]);\n#else\nmat4 transformMatrix0=mBones[int(matricesIndices[0])];mat4 transformMatrix1=mBones[int(matricesIndices[1])];\n#endif\nmat3 slerpedRotationMatrix=quaternionToRotationMatrix(slerp(\nrotationMatrixToQuaternion(mat3(transformMatrix0)),\nrotationMatrixToQuaternion(mat3(transformMatrix1)),\nweight1\n));mat4 sdefInflunce=mat4(\nvec4(1.0,0.0,0.0,0.0),\nvec4(0.0,1.0,0.0,0.0),\nvec4(0.0,0.0,1.0,0.0),\nvec4(-matricesSdefC,1.0)\n);mat4 rotationMatrix=mat4(\nvec4(slerpedRotationMatrix[0],0.0),\nvec4(slerpedRotationMatrix[1],0.0),\nvec4(slerpedRotationMatrix[2],0.0),\nvec4(0.0,0.0,0.0,1.0)\n);sdefInflunce=rotationMatrix*sdefInflunce;vec3 positionOffset =\nvec3(transformMatrix0*vec4(matricesSdefR0,1))*weight0 +\nvec3(transformMatrix1*vec4(matricesSdefR1,1))*weight1;sdefInflunce[3]+=vec4(positionOffset,0.0);float useLinearDeform=step(0.0,-abs(matricesSdefR0.x));influence=mat4(\nmix(sdefInflunce[0],influence[0],useLinearDeform),\nmix(sdefInflunce[1],influence[1],useLinearDeform),\nmix(sdefInflunce[2],influence[2],useLinearDeform),\nmix(sdefInflunce[3],influence[3],useLinearDeform)\n);}\n#endif\n#endif\n#endif\n";
