prePassRenderTarget.d.ts 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import type { IMultiRenderTargetOptions } from "./multiRenderTarget";
  2. import { MultiRenderTarget } from "./multiRenderTarget";
  3. import type { Engine } from "../../Engines/engine";
  4. import type { RenderTargetTexture } from "./renderTargetTexture";
  5. import type { Scene } from "../../scene";
  6. import type { PostProcess } from "../../PostProcesses/postProcess";
  7. import { ImageProcessingPostProcess } from "../../PostProcesses/imageProcessingPostProcess";
  8. import type { Nullable } from "../../types";
  9. /**
  10. * A multi render target designed to render the prepass.
  11. * Prepass is a scene component used to render information in multiple textures
  12. * alongside with the scene materials rendering.
  13. * Note : This is an internal class, and you should NOT need to instanciate this.
  14. * Only the `PrePassRenderer` should instanciate this class.
  15. * It is more likely that you need a regular `MultiRenderTarget`
  16. * @internal
  17. */
  18. export declare class PrePassRenderTarget extends MultiRenderTarget {
  19. /**
  20. * @internal
  21. */
  22. _beforeCompositionPostProcesses: PostProcess[];
  23. /**
  24. * Image processing post process for composition
  25. */
  26. imageProcessingPostProcess: ImageProcessingPostProcess;
  27. /**
  28. * @internal
  29. */
  30. _engine: Engine;
  31. /**
  32. * @internal
  33. */
  34. _scene: Scene;
  35. /**
  36. * @internal
  37. */
  38. _outputPostProcess: Nullable<PostProcess>;
  39. /**
  40. * @internal
  41. */
  42. _internalTextureDirty: boolean;
  43. /**
  44. * Is this render target enabled for prepass rendering
  45. */
  46. enabled: boolean;
  47. /**
  48. * Render target associated with this prePassRenderTarget
  49. * If this is `null`, it means this prePassRenderTarget is associated with the scene
  50. */
  51. renderTargetTexture: Nullable<RenderTargetTexture>;
  52. constructor(name: string, renderTargetTexture: Nullable<RenderTargetTexture>, size: any, count: number, scene?: Scene, options?: IMultiRenderTargetOptions | undefined);
  53. /**
  54. * Creates a composition effect for this RT
  55. * @internal
  56. */
  57. _createCompositionEffect(): void;
  58. /**
  59. * Checks that the size of this RT is still adapted to the desired render size.
  60. * @internal
  61. */
  62. _checkSize(): void;
  63. /**
  64. * Changes the number of render targets in this MRT
  65. * Be careful as it will recreate all the data in the new texture.
  66. * @param count new texture count
  67. * @param options Specifies texture types and sampling modes for new textures
  68. * @param textureNames Specifies the names of the textures (optional)
  69. */
  70. updateCount(count: number, options?: IMultiRenderTargetOptions, textureNames?: string[]): void;
  71. /**
  72. * Resets the post processes chains applied to this RT.
  73. * @internal
  74. */
  75. _resetPostProcessChain(): void;
  76. /**
  77. * Diposes this render target
  78. */
  79. dispose(): void;
  80. }