postProcessRenderPipeline.d.ts 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. import type { Nullable } from "../../types";
  2. import type { Camera } from "../../Cameras/camera";
  3. import type { AbstractEngine } from "../../Engines/abstractEngine";
  4. import type { PostProcessRenderEffect } from "./postProcessRenderEffect";
  5. import type { IInspectable } from "../../Misc/iInspectable";
  6. import type { PrePassRenderer } from "../../Rendering/prePassRenderer";
  7. /**
  8. * PostProcessRenderPipeline
  9. * @see https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/postProcessRenderPipeline
  10. */
  11. export declare class PostProcessRenderPipeline {
  12. private _engine;
  13. protected _renderEffects: {
  14. [key: string]: PostProcessRenderEffect;
  15. };
  16. protected _renderEffectsForIsolatedPass: PostProcessRenderEffect[];
  17. /**
  18. * List of inspectable custom properties (used by the Inspector)
  19. * @see https://doc.babylonjs.com/toolsAndResources/inspector#extensibility
  20. */
  21. inspectableCustomProperties: IInspectable[];
  22. /**
  23. * @internal
  24. */
  25. protected _cameras: Camera[];
  26. /** @internal */
  27. _name: string;
  28. /**
  29. * Gets pipeline name
  30. */
  31. get name(): string;
  32. /** Gets the list of attached cameras */
  33. get cameras(): Camera[];
  34. /**
  35. * Initializes a PostProcessRenderPipeline
  36. * @param _engine engine to add the pipeline to
  37. * @param name name of the pipeline
  38. */
  39. constructor(_engine: AbstractEngine, name: string);
  40. /**
  41. * Gets the class name
  42. * @returns "PostProcessRenderPipeline"
  43. */
  44. getClassName(): string;
  45. /**
  46. * If all the render effects in the pipeline are supported
  47. */
  48. get isSupported(): boolean;
  49. /**
  50. * Adds an effect to the pipeline
  51. * @param renderEffect the effect to add
  52. */
  53. addEffect(renderEffect: PostProcessRenderEffect): void;
  54. /** @internal */
  55. _rebuild(): void;
  56. /** @internal */
  57. _enableEffect(renderEffectName: string, cameras: Camera): void;
  58. /** @internal */
  59. _enableEffect(renderEffectName: string, cameras: Camera[]): void;
  60. /** @internal */
  61. _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void;
  62. /** @internal */
  63. _disableEffect(renderEffectName: string, cameras: Nullable<Camera[]>): void;
  64. /** @internal */
  65. _attachCameras(cameras: Camera, unique: boolean): void;
  66. /** @internal */
  67. _attachCameras(cameras: Camera[], unique: boolean): void;
  68. /** @internal */
  69. _detachCameras(cameras: Camera): void;
  70. /** @internal */
  71. _detachCameras(cameras: Nullable<Camera[]>): void;
  72. /** @internal */
  73. _update(): void;
  74. /** @internal */
  75. _reset(): void;
  76. protected _enableMSAAOnFirstPostProcess(sampleCount: number): boolean;
  77. /**
  78. * Ensures that all post processes in the pipeline are the correct size according to the
  79. * the viewport's required size
  80. */
  81. protected _adaptPostProcessesToViewPort(): void;
  82. /**
  83. * Sets the required values to the prepass renderer.
  84. * @param prePassRenderer defines the prepass renderer to setup.
  85. * @returns true if the pre pass is needed.
  86. */
  87. setPrePassRenderer(prePassRenderer: PrePassRenderer): boolean;
  88. /**
  89. * Disposes of the pipeline
  90. */
  91. dispose(): void;
  92. }