@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.
29 lines • 1.03 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../Engines/shaderStore.js";
import "./ShadersInclude/helperFunctions.js";
const name = "layerPixelShader";
const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;uniform color: vec4f;
@fragment
fn main(input: FragmentInputs)->FragmentOutputs {
var baseColor: vec4f=textureSample(textureSampler,textureSamplerSampler,input.vUV);
baseColor=toGammaSpace(baseColor);
baseColor=toLinearSpaceVec4(baseColor);
if (baseColor.a<0.4) {discard;}
fragmentOutputs.color=baseColor*uniforms.color;
}`;
// Sideeffect
if (!ShaderStore.ShadersStoreWGSL[name]) {
ShaderStore.ShadersStoreWGSL[name] = shader;
}
/** @internal */
export const layerPixelShaderWGSL = { name, shader };
//# sourceMappingURL=layer.fragment.js.map