displayPassPostProcess.ts 1.2 KB

123456789101112131415161718192021222324
  1. import { Nullable } from "../types";
  2. import { Camera } from "../Cameras/camera";
  3. import { PostProcess, PostProcessOptions } from "./postProcess";
  4. import { Engine } from "../Engines/engine";
  5. import "../Shaders/displayPass.fragment";
  6. /**
  7. * DisplayPassPostProcess which produces an output the same as it's input
  8. */
  9. export class DisplayPassPostProcess extends PostProcess {
  10. /**
  11. * Creates the DisplayPassPostProcess
  12. * @param name The name of the effect.
  13. * @param options The required width/height ratio to downsize to before computing the render pass.
  14. * @param camera The camera to apply the render pass to.
  15. * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
  16. * @param engine The engine which the post process will be applied. (default: current engine)
  17. * @param reusable If the post process can be reused on the same frame. (default: false)
  18. */
  19. constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean) {
  20. super(name, "displayPass", ["passSampler"], ["passSampler"], options, camera, samplingMode, engine, reusable);
  21. }
  22. }