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.

60 lines 1.88 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 vec3 position; #ifdef VERTEXCOLOR attribute vec4 color; #endif #include<bonesDeclaration> #include<bakedVertexAnimationDeclaration> #include<clipPlaneVertexDeclaration> #include<fogVertexDeclaration> #ifdef FOG uniform mat4 view; #endif #include<instancesDeclaration> uniform mat4 viewProjection; #ifdef MULTIVIEW uniform mat4 viewProjectionR; #endif #if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) varying vec4 vColor; #endif #define CUSTOM_VERTEX_DEFINITIONS void main(void) { #define CUSTOM_VERTEX_MAIN_BEGIN #ifdef VERTEXCOLOR vec4 colorUpdated=color; #endif #include<instancesVertex> #include<bonesVertex> #include<bakedVertexAnimation> vec4 worldPos=finalWorld*vec4(position,1.0); #ifdef MULTIVIEW if (gl_ViewID_OVR==0u) {gl_Position=viewProjection*worldPos;} else {gl_Position=viewProjectionR*worldPos;} #else gl_Position=viewProjection*worldPos; #endif #include<clipPlaneVertex> #include<fogVertex> #include<vertexColorMixing> #define CUSTOM_VERTEX_MAIN_END }`; // Sideeffect if (!ShaderStore.ShadersStore[name]) { ShaderStore.ShadersStore[name] = shader; } /** @internal */ export const colorVertexShader = { name, shader }; //# sourceMappingURL=color.vertex.js.map