UNPKG

@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
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; #ifdef VERTEXCOLOR attribute color: vec4f; #endif #include<bonesDeclaration> #include<bakedVertexAnimationDeclaration> #include<clipPlaneVertexDeclaration> #include<fogVertexDeclaration> #ifdef FOG uniform view: mat4x4f; #endif #include<instancesDeclaration> uniform viewProjection: mat4x4f; #if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) varying vColor: vec4f; #endif #define CUSTOM_VERTEX_DEFINITIONS @vertex fn main(input : VertexInputs)->FragmentInputs { #define CUSTOM_VERTEX_MAIN_BEGIN #ifdef VERTEXCOLOR var colorUpdated: vec4f=vertexInputs.color; #endif #include<instancesVertex> #include<bonesVertex> #include<bakedVertexAnimation> var worldPos: vec4f=finalWorld* vec4f(vertexInputs.position,1.0);vertexOutputs.position=uniforms.viewProjection*worldPos; #include<clipPlaneVertex> #include<fogVertex> #include<vertexColorMixing> #define CUSTOM_VERTEX_MAIN_END }`; // 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