@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.1 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../Engines/shaderStore.js";
import { helperFunctions } from "./ShadersInclude/helperFunctions.js";
const name = "layerPixelShader";
const shader = `varying vec2 vUV;uniform sampler2D textureSampler;uniform vec4 color;
void main(void) {
vec4 baseColor=texture2D(textureSampler,vUV);
baseColor.rgb=toGammaSpace(baseColor.rgb);
baseColor.rgb=toLinearSpace(baseColor.rgb);
if (baseColor.a<0.4)
discard;
gl_FragColor=baseColor*color;
}`;
// Sideeffect
if (!ShaderStore.ShadersStore[name]) {
ShaderStore.ShadersStore[name] = shader;
}
const includes = [helperFunctions];
for (const inc of includes) {
if (!ShaderStore.IncludesShadersStore[inc.name]) {
ShaderStore.IncludesShadersStore[inc.name] = inc.shader;
}
}
/** @internal */
export const layerPixelShader = { name, shader };
//# sourceMappingURL=layer.fragment.js.map