UNPKG

@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.

38 lines 1.37 kB
import { EffectWrapper } from "../Materials/effectRenderer.js"; import { Engine } from "../Engines/engine.js"; /** * @internal */ export class ThinBloomMergePostProcess extends EffectWrapper { _gatherImports(useWebGPU, list) { if (useWebGPU) { this._webGPUReady = true; list.push(import("../ShadersWGSL/bloomMerge.fragment.js")); } else { list.push(import("../Shaders/bloomMerge.fragment.js")); } } constructor(name, engine = null, options) { super({ ...options, name, engine: engine || Engine.LastCreatedEngine, useShaderStore: true, useAsPostProcess: true, fragmentShader: ThinBloomMergePostProcess.FragmentUrl, uniforms: ThinBloomMergePostProcess.Uniforms, samplers: ThinBloomMergePostProcess.Samplers, }); /** Weight of the bloom to be added to the original input. */ this.weight = 1; } bind(noDefaultBindings = false) { super.bind(noDefaultBindings); this._drawWrapper.effect.setFloat("bloomWeight", this.weight); } } ThinBloomMergePostProcess.FragmentUrl = "bloomMerge"; ThinBloomMergePostProcess.Uniforms = ["bloomWeight"]; ThinBloomMergePostProcess.Samplers = ["bloomBlur"]; //# sourceMappingURL=thinBloomMergePostProcess.js.map