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.

42 lines 1.39 kB
import { EffectWrapper } from "../Materials/effectRenderer.js"; import { Engine } from "../Engines/engine.js"; /** * Postprocess used to generate anaglyphic rendering */ export class ThinAnaglyphPostProcess extends EffectWrapper { _gatherImports(useWebGPU, list) { if (useWebGPU) { this._webGPUReady = true; list.push(import("../ShadersWGSL/anaglyph.fragment.js")); } else { list.push(import("../Shaders/anaglyph.fragment.js")); } } /** * Constructs a new anaglyph post process * @param name Name of the effect * @param engine Engine to use to render the effect. If not provided, the last created engine will be used * @param options Options to configure the effect */ constructor(name, engine = null, options) { super({ ...options, name, engine: engine || Engine.LastCreatedEngine, useShaderStore: true, useAsPostProcess: true, fragmentShader: ThinAnaglyphPostProcess.FragmentUrl, samplers: ThinAnaglyphPostProcess.Samplers, }); } } /** * The fragment shader url */ ThinAnaglyphPostProcess.FragmentUrl = "anaglyph"; /** * The list of samplers used by the effect */ ThinAnaglyphPostProcess.Samplers = ["leftSampler"]; //# sourceMappingURL=thinAnaglyphPostProcess.js.map