@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.
40 lines (37 loc) • 1.58 kB
JavaScript
import { S as ShaderStore } from './index-MZPybX0H.esm.js';
import { i as imageProcessingDeclarationWGSL, a as imageProcessingFunctionsWGSL } from './imageProcessingFunctions-DmDAqk27.esm.js';
import { h as helperFunctionsWGSL } from './helperFunctions-CiGzvr6_.esm.js';
// Do not edit.
const name = "imageProcessingPixelShader";
const shader = `varying vUV: vec2f;var textureSamplerSampler: sampler;var textureSampler: texture_2d<f32>;
@fragment
fn main(input: FragmentInputs)->FragmentOutputs {var result: vec4f=textureSample(textureSampler,textureSamplerSampler,input.vUV);result=vec4f(max(result.rgb,vec3f(0.)),result.a);
result=vec4f(toLinearSpaceVec3(result.rgb),result.a);
result=applyImageProcessing(result);
result=applyImageProcessing(result);
fragmentOutputs.color=result;}`;
// Sideeffect
if (!ShaderStore.ShadersStoreWGSL[name]) {
ShaderStore.ShadersStoreWGSL[name] = shader;
}
const includes = [imageProcessingDeclarationWGSL, helperFunctionsWGSL, imageProcessingFunctionsWGSL];
for (const inc of includes) {
if (!ShaderStore.IncludesShadersStoreWGSL[inc.name]) {
ShaderStore.IncludesShadersStoreWGSL[inc.name] = inc.shader;
}
}
/** @internal */
const imageProcessingPixelShaderWGSL = { name, shader };
export { imageProcessingPixelShaderWGSL };
//# sourceMappingURL=imageProcessing.fragment-BSK1p2l3.esm.js.map