@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.
60 lines (56 loc) • 2.42 kB
JavaScript
import { S as ShaderStore } from './index-MZPybX0H.esm.js';
// Do not edit.
const name$1 = "bakedVertexAnimationDeclaration";
const shader$1 = `
uniform bakedVertexAnimationTime: f32;uniform bakedVertexAnimationSettings: vec4<f32>;var bakedVertexAnimationTexture : texture_2d<f32>;
attribute bakedVertexAnimationSettingsInstanced : vec4<f32>;
fn readMatrixFromRawSamplerVAT(smp : texture_2d<f32>,index : f32,frame : f32)->mat4x4<f32>
{let offset=i32(index)*4;let frameUV=i32(frame);let m0=textureLoad(smp,vec2<i32>(offset+0,frameUV),0);let m1=textureLoad(smp,vec2<i32>(offset+1,frameUV),0);let m2=textureLoad(smp,vec2<i32>(offset+2,frameUV),0);let m3=textureLoad(smp,vec2<i32>(offset+3,frameUV),0);return mat4x4<f32>(m0,m1,m2,m3);}
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$1]) {
ShaderStore.IncludesShadersStoreWGSL[name$1] = shader$1;
}
/** @internal */
const bakedVertexAnimationDeclarationWGSL = { name: name$1, shader: shader$1 };
// Do not edit.
const name = "instancesVertex";
const shader = `
var finalWorld=mat4x4<f32>(vertexInputs.world0,vertexInputs.world1,vertexInputs.world2,vertexInputs.world3);
var finalPreviousWorld=mat4x4<f32>(
vertexInputs.previousWorld0,vertexInputs.previousWorld1,
vertexInputs.previousWorld2,vertexInputs.previousWorld3);
finalWorld=uniforms.world*finalWorld;
finalWorld=mesh.world*finalWorld;
finalPreviousWorld=uniforms.previousWorld*finalPreviousWorld;
var finalWorld=uniforms.world;
var finalWorld=mesh.world;
var finalPreviousWorld=uniforms.previousWorld;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
/** @internal */
const instancesVertexWGSL = { name, shader };
export { bakedVertexAnimationDeclarationWGSL as b, instancesVertexWGSL as i };
//# sourceMappingURL=instancesVertex-DMZ4QPzF.esm.js.map