@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.
176 lines (167 loc) • 6.02 kB
JavaScript
import { S as ShaderStore } from './index-FzOfPXLV.esm.js';
// Do not edit.
const name$7 = "uvAttributeDeclaration";
const shader$7 = `
attribute uv{X}: vec2f;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$7]) {
ShaderStore.IncludesShadersStoreWGSL[name$7] = shader$7;
}
// Do not edit.
const name$6 = "prePassVertexDeclaration";
const shader$6 = `
varying vPosition : vec3f;
varying vViewPos: vec3f;
varying vNormViewDepth: f32;
uniform previousViewProjection: mat4x4f;varying vCurrentPosition: vec4f;varying vPreviousPosition: vec4f;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$6]) {
ShaderStore.IncludesShadersStoreWGSL[name$6] = shader$6;
}
// Do not edit.
const name$5 = "samplerVertexDeclaration";
const shader$5 = `
varying v_VARYINGNAME_UV: vec2f;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$5]) {
ShaderStore.IncludesShadersStoreWGSL[name$5] = shader$5;
}
// Do not edit.
const name$4 = "bumpVertexDeclaration";
const shader$4 = `
varying vTBN0: vec3f;varying vTBN1: vec3f;varying vTBN2: vec3f;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$4]) {
ShaderStore.IncludesShadersStoreWGSL[name$4] = shader$4;
}
// Do not edit.
const name$3 = "prePassVertex";
const shader$3 = `
vertexOutputs.vViewPos=(scene.view*worldPos).rgb;
vertexOutputs.vNormViewDepth=((scene.view*worldPos).z-uniforms.cameraInfo.x)/(uniforms.cameraInfo.y-uniforms.cameraInfo.x);
vertexOutputs.vPosition=positionUpdated.xyz;
vertexOutputs.vCurrentPosition=scene.viewProjection*worldPos;
var previousInfluence: mat4x4f;previousInfluence=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[0])]*vertexInputs.matricesWeights[0];
previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[1])]*vertexInputs.matricesWeights[1];
previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[2])]*vertexInputs.matricesWeights[2];
previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndices[3])]*vertexInputs.matricesWeights[3];
previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[0])]*vertexInputs.matricesWeightsExtra[0];
previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[1])]*vertexInputs.matricesWeightsExtra[1];
previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[2])]*vertexInputs.matricesWeightsExtra[2];
previousInfluence+=uniforms.mPreviousBones[ i32(vertexInputs.matricesIndicesExtra[3])]*vertexInputs.matricesWeightsExtra[3];
vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld*previousInfluence* vec4f(positionUpdated,1.0);
vertexOutputs.vPreviousPosition=uniforms.previousViewProjection*finalPreviousWorld* vec4f(positionUpdated,1.0);
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$3]) {
ShaderStore.IncludesShadersStoreWGSL[name$3] = shader$3;
}
// Do not edit.
const name$2 = "uvVariableDeclaration";
const shader$2 = `
var uv{X}: vec2f=vec2f(0.,0.);
var uv{X}: vec2f=vertexInputs.uv{X};
vertexOutputs.vMainUV{X}=uv{X};
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$2]) {
ShaderStore.IncludesShadersStoreWGSL[name$2] = shader$2;
}
// Do not edit.
const name$1 = "samplerVertexImplementation";
const shader$1 = `
if (uniforms.v_INFONAME_==0.)
{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uvUpdated,1.0,0.0)).xy;}
else if (uniforms.v_INFONAME_==1.)
{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(uv2Updated,1.0,0.0)).xy;}
else if (uniforms.v_INFONAME_==2.)
{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv3,1.0,0.0)).xy;}
else if (uniforms.v_INFONAME_==3.)
{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv4,1.0,0.0)).xy;}
else if (uniforms.v_INFONAME_==4.)
{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv5,1.0,0.0)).xy;}
else if (uniforms.v_INFONAME_==5.)
{vertexOutputs.v_VARYINGNAME_UV= (uniforms._MATRIXNAME_Matrix* vec4f(vertexInputs.uv6,1.0,0.0)).xy;}
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name$1]) {
ShaderStore.IncludesShadersStoreWGSL[name$1] = shader$1;
}
// Do not edit.
const name = "vertexColorMixing";
const shader = `
vertexOutputs.vColor=vec4f(1.0);
vertexOutputs.vColor*=vertexInputs.color;
vertexOutputs.vColor=vec4f(vertexOutputs.vColor.rgb*vertexInputs.color.rgb,vertexOutputs.vColor.a);
vertexOutputs.vColor*=vertexInputs.instanceColor;
`;
// Sideeffect
if (!ShaderStore.IncludesShadersStoreWGSL[name]) {
ShaderStore.IncludesShadersStoreWGSL[name] = shader;
}
//# sourceMappingURL=vertexColorMixing-DiAAfHEs.esm.js.map