highlightsPostProcess.ts 1.5 KB

1234567891011121314151617181920212223242526
  1. import { Nullable } from "types";
  2. import { Camera } from "Cameras/camera";
  3. import { PostProcess, PostProcessOptions } from "./postProcess";
  4. import { Engine } from "Engine/engine";
  5. import { Constants } from "Engine/constants";
  6. /**
  7. * Extracts highlights from the image
  8. * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
  9. */
  10. export class HighlightsPostProcess extends PostProcess {
  11. /**
  12. * Extracts highlights from the image
  13. * @see https://doc.babylonjs.com/how_to/how_to_use_postprocesses
  14. * @param name The name of the effect.
  15. * @param options The required width/height ratio to downsize to before computing the render pass.
  16. * @param camera The camera to apply the render pass to.
  17. * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
  18. * @param engine The engine which the post process will be applied. (default: current engine)
  19. * @param reusable If the post process can be reused on the same frame. (default: false)
  20. * @param textureType Type of texture for the post process (default: Engine.TEXTURETYPE_UNSIGNED_INT)
  21. */
  22. constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: Engine, reusable?: boolean, textureType: number = Constants.TEXTURETYPE_UNSIGNED_INT) {
  23. super(name, "highlights", null, null, options, camera, samplingMode, engine, reusable, null, textureType);
  24. }
  25. }