@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.
41 lines • 1.43 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../Engines/shaderStore.js";
import { clipPlaneFragmentDeclaration } from "./ShadersInclude/clipPlaneFragmentDeclaration.js";
import { logDepthDeclaration } from "./ShadersInclude/logDepthDeclaration.js";
import { clipPlaneFragment } from "./ShadersInclude/clipPlaneFragment.js";
import { logDepthFragment } from "./ShadersInclude/logDepthFragment.js";
const name = "outlinePixelShader";
const shader = `
uniform vec4 color;
varying vec2 vUV;uniform sampler2D diffuseSampler;
void main(void) {
if (texture2D(diffuseSampler,vUV).a<0.4)
discard;
gl_FragColor=color;
}`;
// Sideeffect
if (!ShaderStore.ShadersStore[name]) {
ShaderStore.ShadersStore[name] = shader;
}
const includes = [clipPlaneFragmentDeclaration, logDepthDeclaration, clipPlaneFragment, logDepthFragment];
for (const inc of includes) {
if (!ShaderStore.IncludesShadersStore[inc.name]) {
ShaderStore.IncludesShadersStore[inc.name] = inc.shader;
}
}
/** @internal */
export const outlinePixelShader = { name, shader };
//# sourceMappingURL=outline.fragment.js.map