grainPostProcess.d.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import type { Nullable } from "../types";
  2. import type { Camera } from "../Cameras/camera";
  3. import type { PostProcessOptions } from "./postProcess";
  4. import { PostProcess } from "./postProcess";
  5. import type { AbstractEngine } from "../Engines/abstractEngine";
  6. import "../Shaders/grain.fragment";
  7. import type { Scene } from "../scene";
  8. /**
  9. * The GrainPostProcess adds noise to the image at mid luminance levels
  10. */
  11. export declare class GrainPostProcess extends PostProcess {
  12. /**
  13. * The intensity of the grain added (default: 30)
  14. */
  15. intensity: number;
  16. /**
  17. * If the grain should be randomized on every frame
  18. */
  19. animated: boolean;
  20. /**
  21. * Gets a string identifying the name of the class
  22. * @returns "GrainPostProcess" string
  23. */
  24. getClassName(): string;
  25. /**
  26. * Creates a new instance of @see GrainPostProcess
  27. * @param name The name of the effect.
  28. * @param options The required width/height ratio to downsize to before computing the render pass.
  29. * @param camera The camera to apply the render pass to.
  30. * @param samplingMode The sampling mode to be used when computing the pass. (default: 0)
  31. * @param engine The engine which the post process will be applied. (default: current engine)
  32. * @param reusable If the post process can be reused on the same frame. (default: false)
  33. * @param textureType Type of textures used when performing the post process. (default: 0)
  34. * @param blockCompilation If compilation of the shader should not be done in the constructor. The updateEffect method can be used to compile the shader at a later time. (default: false)
  35. */
  36. constructor(name: string, options: number | PostProcessOptions, camera: Nullable<Camera>, samplingMode?: number, engine?: AbstractEngine, reusable?: boolean, textureType?: number, blockCompilation?: boolean);
  37. /**
  38. * @internal
  39. */
  40. static _Parse(parsedPostProcess: any, targetCamera: Camera, scene: Scene, rootUrl: string): GrainPostProcess;
  41. }