@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.
47 lines • 1.39 kB
JavaScript
// Do not edit.
import { ShaderStore } from "../Engines/shaderStore.js";
import "./ShadersInclude/clipPlaneFragmentDeclaration.js";
import "./ShadersInclude/clipPlaneFragment.js";
const name = "selectionPixelShader";
const shader = `
flat varying vSelectionId: f32;
uniform selectionId: f32;
varying vViewPosZ: f32;
varying vDepthMetric: f32;
varying vUV: vec2f;var diffuseSamplerSampler: sampler;var diffuseSampler: texture_2d<f32>;
@fragment
fn main(input: FragmentInputs)->FragmentOutputs {
if (textureSample(diffuseSampler,diffuseSamplerSampler,fragmentInputs.vUV).a<0.4) {discard;}
var id: f32=fragmentInputs.vSelectionId;
var id: f32=uniforms.selectionId;
fragmentOutputs.color=vec4(id,fragmentInputs.vViewPosZ,0.0,1.0);
fragmentOutputs.color=vec4(id,fragmentInputs.vDepthMetric,0.0,1.0);
}
`;
// Sideeffect
if (!ShaderStore.ShadersStoreWGSL[name]) {
ShaderStore.ShadersStoreWGSL[name] = shader;
}
/** @internal */
export const selectionPixelShaderWGSL = { name, shader };
//# sourceMappingURL=selection.fragment.js.map