1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- // Do not edit.
- import { ShaderStore } from "../../Engines/shaderStore.js";
- const name = "bonesVertex";
- const shader = `#ifndef BAKED_VERTEX_ANIMATION_TEXTURE
- #if NUM_BONE_INFLUENCERS>0
- mat4 influence;
- #ifdef BONETEXTURE
- influence=readMatrixFromRawSampler(boneSampler,matricesIndices[0])*matricesWeights[0];
- #if NUM_BONE_INFLUENCERS>1
- influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[1])*matricesWeights[1];
- #endif
- #if NUM_BONE_INFLUENCERS>2
- influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[2])*matricesWeights[2];
- #endif
- #if NUM_BONE_INFLUENCERS>3
- influence+=readMatrixFromRawSampler(boneSampler,matricesIndices[3])*matricesWeights[3];
- #endif
- #if NUM_BONE_INFLUENCERS>4
- influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[0])*matricesWeightsExtra[0];
- #endif
- #if NUM_BONE_INFLUENCERS>5
- influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[1])*matricesWeightsExtra[1];
- #endif
- #if NUM_BONE_INFLUENCERS>6
- influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[2])*matricesWeightsExtra[2];
- #endif
- #if NUM_BONE_INFLUENCERS>7
- influence+=readMatrixFromRawSampler(boneSampler,matricesIndicesExtra[3])*matricesWeightsExtra[3];
- #endif
- #else
- influence=mBones[int(matricesIndices[0])]*matricesWeights[0];
- #if NUM_BONE_INFLUENCERS>1
- influence+=mBones[int(matricesIndices[1])]*matricesWeights[1];
- #endif
- #if NUM_BONE_INFLUENCERS>2
- influence+=mBones[int(matricesIndices[2])]*matricesWeights[2];
- #endif
- #if NUM_BONE_INFLUENCERS>3
- influence+=mBones[int(matricesIndices[3])]*matricesWeights[3];
- #endif
- #if NUM_BONE_INFLUENCERS>4
- influence+=mBones[int(matricesIndicesExtra[0])]*matricesWeightsExtra[0];
- #endif
- #if NUM_BONE_INFLUENCERS>5
- influence+=mBones[int(matricesIndicesExtra[1])]*matricesWeightsExtra[1];
- #endif
- #if NUM_BONE_INFLUENCERS>6
- influence+=mBones[int(matricesIndicesExtra[2])]*matricesWeightsExtra[2];
- #endif
- #if NUM_BONE_INFLUENCERS>7
- influence+=mBones[int(matricesIndicesExtra[3])]*matricesWeightsExtra[3];
- #endif
- #endif
- finalWorld=finalWorld*influence;
- #endif
- #endif
- `;
- // Sideeffect
- ShaderStore.IncludesShadersStore[name] = shader;
- /** @internal */
- export const bonesVertex = { name, shader };
- //# sourceMappingURL=bonesVertex.js.map
|