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.

43 lines (40 loc) 1.53 kB
import { S as ShaderStore } from './index-MZPybX0H.esm.js'; import { c as clipPlaneFragmentDeclarationWGSL, a as clipPlaneFragmentWGSL } from './clipPlaneFragment-C6Z5D7El.esm.js'; import { f as fogFragmentDeclarationWGSL, a as fogFragmentWGSL } from './fogFragment-Lnu5KyrF.esm.js'; // Do not edit. const name = "colorPixelShader"; const shader = `#if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) #define VERTEXCOLOR varying vColor: vec4f; #else uniform color: vec4f; #endif #include<clipPlaneFragmentDeclaration> #include<fogFragmentDeclaration> #define CUSTOM_FRAGMENT_DEFINITIONS @fragment fn main(input: FragmentInputs)->FragmentOutputs { #define CUSTOM_FRAGMENT_MAIN_BEGIN #include<clipPlaneFragment> #if defined(VERTEXCOLOR) || defined(INSTANCESCOLOR) && defined(INSTANCES) fragmentOutputs.color=input.vColor; #else fragmentOutputs.color=uniforms.color; #endif #include<fogFragment>(color,fragmentOutputs.color) #define CUSTOM_FRAGMENT_MAIN_END }`; // Sideeffect if (!ShaderStore.ShadersStoreWGSL[name]) { ShaderStore.ShadersStoreWGSL[name] = shader; } const includes = [clipPlaneFragmentDeclarationWGSL, fogFragmentDeclarationWGSL, clipPlaneFragmentWGSL, fogFragmentWGSL]; for (const inc of includes) { if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) { ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader; } } /** @internal */ const colorPixelShaderWGSL = { name, shader }; export { colorPixelShaderWGSL }; //# sourceMappingURL=color.fragment-DK1mmbTU.esm.js.map