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.

42 lines (39 loc) 1.39 kB
import { S as ShaderStore } from './index-MZPybX0H.esm.js'; import { c as clipPlaneFragmentDeclaration, a as clipPlaneFragment } from './clipPlaneFragment-CKB1su_H.esm.js'; import { f as fogFragmentDeclaration, a as fogFragment } from './fogFragment-C3YQIhnt.esm.js'; // Do not edit. const name = "colorPixelShader"; const shader = `#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) #define VERTEXCOLOR varying vec4 vColor; #else uniform vec4 color; #endif #include<clipPlaneFragmentDeclaration> #include<fogFragmentDeclaration> #define CUSTOM_FRAGMENT_DEFINITIONS void main(void) { #define CUSTOM_FRAGMENT_MAIN_BEGIN #include<clipPlaneFragment> #if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) gl_FragColor=vColor; #else gl_FragColor=color; #endif #include<fogFragment>(color,gl_FragColor) #define CUSTOM_FRAGMENT_MAIN_END }`; // Sideeffect if (!ShaderStore.ShadersStore[name]) { ShaderStore.ShadersStore[name] = shader; } const includes = [clipPlaneFragmentDeclaration, fogFragmentDeclaration, clipPlaneFragment, fogFragment]; for (const inc of includes) { if (!ShaderStore.IncludesShadersStore[inc.name]) { ShaderStore.IncludesShadersStore[inc.name] = inc.shader; } } /** @internal */ const colorPixelShader = { name, shader }; export { colorPixelShader }; //# sourceMappingURL=color.fragment-BqGox7i0.esm.js.map