@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.
32 lines • 1.23 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../../Engines/shaderStore.js";
const name = "bonesDeclaration";
const shader = `
attribute matricesIndices : vec4<f32>;attribute matricesWeights : vec4<f32>;
attribute matricesIndicesExtra : vec4<f32>;attribute matricesWeightsExtra : vec4<f32>;
var boneSampler : texture_2d<f32>;uniform boneTextureWidth : f32;
uniform mBones : array<mat4x4f,BonesPerMesh>;
uniform mPreviousBones : array<mat4x4f,BonesPerMesh>;
fn readMatrixFromRawSampler(smp : texture_2d<f32>,index : f32)->mat4x4f
{let offset=i32(index) *4;
let m0=textureLoad(smp,vec2<i32>(offset+0,0),0);let m1=textureLoad(smp,vec2<i32>(offset+1,0),0);let m2=textureLoad(smp,vec2<i32>(offset+2,0),0);let m3=textureLoad(smp,vec2<i32>(offset+3,0),0);return mat4x4f(m0,m1,m2,m3);}
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
export const bonesDeclarationWGSL = { name, shader };
//# sourceMappingURL=bonesDeclaration.js.map