@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
61 lines (57 loc) • 2.28 kB
JavaScript
import { S as ShaderStore } from './index-MZPybX0H.esm.js';
// Do not edit.
const name$1 = "morphTargetsVertexGlobalDeclaration";
const shader$1 = `
uniform morphTargetInfluences : array<f32,NUM_MORPH_INFLUENCERS>;
uniform morphTargetTextureIndices : array<f32,NUM_MORPH_INFLUENCERS>;uniform morphTargetTextureInfo : vec3<f32>;var morphTargets : texture_2d_array<f32>;fn readVector3FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec3<f32>
{
let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0).xyz;}
fn readVector4FromRawSampler(targetIndex : i32,vertexIndex : f32)->vec4<f32>
{
let textureWidth: i32=i32(uniforms.morphTargetTextureInfo.y);
let y: i32=i32(vertexIndex)/textureWidth;let x: i32=i32(vertexIndex) % textureWidth;return textureLoad(morphTargets,vec2i(x,y),i32(uniforms.morphTargetTextureIndices[targetIndex]),0);}
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$1]) {
ShaderStore.IncludesShadersStoreWGSL[name$1] = shader$1;
}
/** @internal */
const morphTargetsVertexGlobalDeclarationWGSL = { name: name$1, shader: shader$1 };
// Do not edit.
const name = "morphTargetsVertexDeclaration";
const shader = `
attribute position{X} : vec3<f32>;
attribute normal{X} : vec3<f32>;
attribute tangent{X} : vec3<f32>;
attribute uv_{X} : vec2<f32>;
attribute uv2_{X} : vec2<f32>;
attribute color{X} : vec4<f32>;
uniform morphTargetCount: f32;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
const morphTargetsVertexDeclarationWGSL = { name, shader };
export { morphTargetsVertexDeclarationWGSL as a, morphTargetsVertexGlobalDeclarationWGSL as m };
//# sourceMappingURL=morphTargetsVertexDeclaration-BiDnarww.esm.js.map