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.

35 lines 1.18 kB
// Do not edit. import { ShaderStore } from "../Engines/shaderStore.js"; import "./ShadersInclude/clipPlaneFragmentDeclaration.js"; import "./ShadersInclude/fogFragmentDeclaration.js"; import "./ShadersInclude/clipPlaneFragment.js"; import "./ShadersInclude/fogFragment.js"; 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; } /** @internal */ export const colorPixelShaderWGSL = { name, shader }; //# sourceMappingURL=color.fragment.js.map