@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 (57 loc) • 2.51 kB
JavaScript
import { S as ShaderStore } from './index-HyNDfLMI.esm.js';
import { b as bonesDeclarationWGSL } from './bonesDeclaration-Cisd6nLM.esm.js';
import { b as bakedVertexAnimationDeclarationWGSL, i as instancesVertexWGSL } from './instancesVertex-Bxgat6Ds.esm.js';
import { c as clipPlaneVertexDeclarationWGSL, a as clipPlaneVertexWGSL } from './clipPlaneVertex-Cl8WR3Fk.esm.js';
import { f as fogVertexDeclarationWGSL, a as fogVertexWGSL } from './fogVertex-CVXVri0v.esm.js';
import { i as instancesDeclarationWGSL } from './instancesDeclaration-DRfPI11R.esm.js';
import { b as bonesVertexWGSL } from './bonesVertex-Dj6Sg33v.esm.js';
import { b as bakedVertexAnimationWGSL } from './bakedVertexAnimation-DVILfFlx.esm.js';
import { v as vertexColorMixingWGSL } from './vertexColorMixing-B_Q1InJn.esm.js';
// Do not edit.
const name = "colorVertexShader";
const shader = `attribute position: vec3f;
attribute color: vec4f;
uniform view: mat4x4f;
uniform viewProjection: mat4x4f;
varying vColor: vec4f;
@vertex
fn main(input : VertexInputs)->FragmentInputs {
var colorUpdated: vec4f=vertexInputs.color;
var worldPos: vec4f=finalWorld* vec4f(vertexInputs.position,1.0);vertexOutputs.position=uniforms.viewProjection*worldPos;
}`;
// Sideeffect
if (!ShaderStore.ShadersStoreWGSL[name]) {
ShaderStore.ShadersStoreWGSL[name] = shader;
}
const includes = [bonesDeclarationWGSL, bakedVertexAnimationDeclarationWGSL, clipPlaneVertexDeclarationWGSL, fogVertexDeclarationWGSL, instancesDeclarationWGSL, instancesVertexWGSL, bonesVertexWGSL, bakedVertexAnimationWGSL, clipPlaneVertexWGSL, fogVertexWGSL, vertexColorMixingWGSL];
for (const inc of includes) {
if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {
ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;
}
}
/** @internal */
const colorVertexShaderWGSL = { name, shader };
export { colorVertexShaderWGSL };
//# sourceMappingURL=color.vertex-DVwEZTDT.esm.js.map