@babylonjs/viewer
Version:
The Babylon Viewer aims to simplify a specific but common Babylon.js use case: loading, viewing, and interacting with a 3D model.
3 lines (2 loc) • 1.21 kB
JavaScript
import{S as e}from"./index-BPURObVq.esm.min.js";import{i as r,a as n}from"./imageProcessingFunctions-Dykqwc0Y.esm.min.js";import{h as s}from"./helperFunctions-T6LSXWWf.esm.min.js";const t="imageProcessingPixelShader",a="varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;\n#include<imageProcessingDeclaration>\n#include<helperFunctions>\n#include<imageProcessingFunctions>\n#define CUSTOM_FRAGMENT_DEFINITIONS\n@fragment\nfn main(input: FragmentInputs)->FragmentOutputs {var result: vec4f=textureSample(textureSampler,textureSamplerSampler,input.vUV);result=vec4f(max(result.rgb,vec3f(0.)),result.a);\n#ifdef IMAGEPROCESSING\n#ifndef FROMLINEARSPACE\nresult=vec4f(toLinearSpaceVec3(result.rgb),result.a);\n#endif\nresult=applyImageProcessing(result);\n#else\n#ifdef FROMLINEARSPACE\nresult=applyImageProcessing(result);\n#endif\n#endif\nfragmentOutputs.color=result;}";e.ShadersStoreWGSL[t]||(e.ShadersStoreWGSL[t]=a);const i=[r,s,n];for(const r of i)e.IncludesShadersStoreWGSL[r.name]||(e.IncludesShadersStoreWGSL[r.name]=r.shader);const m={name:t,shader:a};export{m as imageProcessingPixelShaderWGSL};
//# sourceMappingURL=imageProcessing.fragment-B2iTyKTc.esm.min.js.map