UNPKG

@babylonjs/core

Version:

Getting started? Play directly with the Babylon.js API using our [playground](https://playground.babylonjs.com/). It also contains a lot of samples to learn how to use it.

53 lines 1.8 kB
// Do not edit. import { ShaderStore } from "../Engines/shaderStore.js"; import "./ShadersInclude/bonesDeclaration.js"; import "./ShadersInclude/bakedVertexAnimationDeclaration.js"; import "./ShadersInclude/clipPlaneVertexDeclaration.js"; import "./ShadersInclude/fogVertexDeclaration.js"; import "./ShadersInclude/instancesDeclaration.js"; import "./ShadersInclude/instancesVertex.js"; import "./ShadersInclude/bonesVertex.js"; import "./ShadersInclude/bakedVertexAnimation.js"; import "./ShadersInclude/clipPlaneVertex.js"; import "./ShadersInclude/fogVertex.js"; import "./ShadersInclude/vertexColorMixing.js"; 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(input.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; } /** @internal */ export const colorVertexShaderWGSL = { name, shader }; //# sourceMappingURL=color.vertex.js.map