@babylonjs/core
Version:
Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.
64 lines • 2.26 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "bonesVertex";
const shader = `
mat4 influence;
influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];
influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];
influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];
influence=mBones[int(matricesIndices[0])]*matricesWeights[0];
influence+=mBones[int(matricesIndices[1])]*matricesWeights[1];
influence+=mBones[int(matricesIndices[2])]*matricesWeights[2];
influence+=mBones[int(matricesIndices[3])]*matricesWeights[3];
influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
finalWorld=finalWorld*influence;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStore[name]) {
ShaderStore.IncludesShadersStore[name] = shader;
}
/** @internal */
export const bonesVertex = { name, shader };
//# sourceMappingURL=bonesVertex.js.map