postProcessRenderEffect.d.ts 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. import type { Nullable } from "../../types";
  2. import type { Camera } from "../../Cameras/camera";
  3. import type { PostProcess } from "../../PostProcesses/postProcess";
  4. import type { AbstractEngine } from "../../Engines/abstractEngine";
  5. /**
  6. * This represents a set of one or more post processes in Babylon.
  7. * A post process can be used to apply a shader to a texture after it is rendered.
  8. * @example https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/postProcessRenderPipeline
  9. */
  10. export declare class PostProcessRenderEffect {
  11. private _postProcesses;
  12. private _getPostProcesses;
  13. private _singleInstance;
  14. private _cameras;
  15. private _indicesForCamera;
  16. /**
  17. * Name of the effect
  18. * @internal
  19. */
  20. _name: string;
  21. /**
  22. * Instantiates a post process render effect.
  23. * A post process can be used to apply a shader to a texture after it is rendered.
  24. * @param engine The engine the effect is tied to
  25. * @param name The name of the effect
  26. * @param getPostProcesses A function that returns a set of post processes which the effect will run in order to be run.
  27. * @param singleInstance False if this post process can be run on multiple cameras. (default: true)
  28. */
  29. constructor(engine: AbstractEngine, name: string, getPostProcesses: () => Nullable<PostProcess | Array<PostProcess>>, singleInstance?: boolean);
  30. /**
  31. * Checks if all the post processes in the effect are supported.
  32. */
  33. get isSupported(): boolean;
  34. /**
  35. * Updates the current state of the effect
  36. * @internal
  37. */
  38. _update(): void;
  39. /**
  40. * Attaches the effect on cameras
  41. * @param cameras The camera to attach to.
  42. * @internal
  43. */
  44. _attachCameras(cameras: Camera): void;
  45. /**
  46. * Attaches the effect on cameras
  47. * @param cameras The camera to attach to.
  48. * @internal
  49. */
  50. _attachCameras(cameras: Camera[]): void;
  51. /**
  52. * Detaches the effect on cameras
  53. * @param cameras The camera to detach from.
  54. * @internal
  55. */
  56. _detachCameras(cameras: Camera): void;
  57. /**
  58. * Detaches the effect on cameras
  59. * @param cameras The camera to detach from.
  60. * @internal
  61. */
  62. _detachCameras(cameras: Camera[]): void;
  63. /**
  64. * Enables the effect on given cameras
  65. * @param cameras The camera to enable.
  66. * @internal
  67. */
  68. _enable(cameras: Camera): void;
  69. /**
  70. * Enables the effect on given cameras
  71. * @param cameras The camera to enable.
  72. * @internal
  73. */
  74. _enable(cameras: Nullable<Camera[]>): void;
  75. /**
  76. * Disables the effect on the given cameras
  77. * @param cameras The camera to disable.
  78. * @internal
  79. */
  80. _disable(cameras: Camera): void;
  81. /**
  82. * Disables the effect on the given cameras
  83. * @param cameras The camera to disable.
  84. * @internal
  85. */
  86. _disable(cameras: Nullable<Camera[]>): void;
  87. /**
  88. * Gets a list of the post processes contained in the effect.
  89. * @param camera The camera to get the post processes on.
  90. * @returns The list of the post processes in the effect.
  91. */
  92. getPostProcesses(camera?: Camera): Nullable<Array<PostProcess>>;
  93. }