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-MZPybX0H.esm.js'; import { b as bonesDeclarationWGSL } from './bonesDeclaration-PMvyqkeE.esm.js'; import { b as bakedVertexAnimationDeclarationWGSL, i as instancesVertexWGSL } from './instancesVertex-DMZ4QPzF.esm.js'; import { c as clipPlaneVertexDeclarationWGSL, a as clipPlaneVertexWGSL } from './clipPlaneVertex-DrcLG8k3.esm.js'; import { f as fogVertexDeclarationWGSL, a as fogVertexWGSL } from './fogVertex-jAzZJUX3.esm.js'; import { i as instancesDeclarationWGSL } from './instancesDeclaration-BNVwxGTw.esm.js'; import { b as bonesVertexWGSL } from './bonesVertex-CJuJ5VLw.esm.js'; import { b as bakedVertexAnimationWGSL } from './bakedVertexAnimation-v7FGdAXH.esm.js'; import { v as vertexColorMixingWGSL } from './vertexColorMixing-C_ggORv4.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-CN7ukM8n.esm.js.map