imageProcessingPostProcess.d.ts 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. import type { Nullable } from "../types";
  2. import type { Color4 } from "../Maths/math.color";
  3. import type { Camera } from "../Cameras/camera";
  4. import type { BaseTexture } from "../Materials/Textures/baseTexture";
  5. import type { ColorCurves } from "../Materials/colorCurves";
  6. import { ImageProcessingConfiguration } from "../Materials/imageProcessingConfiguration";
  7. import type { PostProcessOptions } from "./postProcess";
  8. import { PostProcess } from "./postProcess";
  9. import type { AbstractEngine } from "../Engines/abstractEngine";
  10. import "../Shaders/imageProcessing.fragment";
  11. import "../Shaders/postprocess.vertex";
  12. /**
  13. * ImageProcessingPostProcess
  14. * @see https://doc.babylonjs.com/features/featuresDeepDive/postProcesses/usePostProcesses#imageprocessing
  15. */
  16. export declare class ImageProcessingPostProcess extends PostProcess {
  17. /**
  18. * Default configuration related to image processing available in the PBR Material.
  19. */
  20. protected _imageProcessingConfiguration: ImageProcessingConfiguration;
  21. /**
  22. * Gets the image processing configuration used either in this material.
  23. */
  24. get imageProcessingConfiguration(): ImageProcessingConfiguration;
  25. /**
  26. * Sets the Default image processing configuration used either in the this material.
  27. *
  28. * If sets to null, the scene one is in use.
  29. */
  30. set imageProcessingConfiguration(value: ImageProcessingConfiguration);
  31. /**
  32. * Keep track of the image processing observer to allow dispose and replace.
  33. */
  34. private _imageProcessingObserver;
  35. /**
  36. * Attaches a new image processing configuration to the PBR Material.
  37. * @param configuration
  38. * @param doNotBuild
  39. */
  40. protected _attachImageProcessingConfiguration(configuration: Nullable<ImageProcessingConfiguration>, doNotBuild?: boolean): void;
  41. /**
  42. * If the post process is supported.
  43. */
  44. get isSupported(): boolean;
  45. /**
  46. * Gets Color curves setup used in the effect if colorCurvesEnabled is set to true .
  47. */
  48. get colorCurves(): Nullable<ColorCurves>;
  49. /**
  50. * Sets Color curves setup used in the effect if colorCurvesEnabled is set to true .
  51. */
  52. set colorCurves(value: Nullable<ColorCurves>);
  53. /**
  54. * Gets whether the color curves effect is enabled.
  55. */
  56. get colorCurvesEnabled(): boolean;
  57. /**
  58. * Sets whether the color curves effect is enabled.
  59. */
  60. set colorCurvesEnabled(value: boolean);
  61. /**
  62. * Gets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
  63. */
  64. get colorGradingTexture(): Nullable<BaseTexture>;
  65. /**
  66. * Sets Color grading LUT texture used in the effect if colorGradingEnabled is set to true.
  67. */
  68. set colorGradingTexture(value: Nullable<BaseTexture>);
  69. /**
  70. * Gets whether the color grading effect is enabled.
  71. */
  72. get colorGradingEnabled(): boolean;
  73. /**
  74. * Gets whether the color grading effect is enabled.
  75. */
  76. set colorGradingEnabled(value: boolean);
  77. /**
  78. * Gets exposure used in the effect.
  79. */
  80. get exposure(): number;
  81. /**
  82. * Sets exposure used in the effect.
  83. */
  84. set exposure(value: number);
  85. /**
  86. * Gets whether tonemapping is enabled or not.
  87. */
  88. get toneMappingEnabled(): boolean;
  89. /**
  90. * Sets whether tonemapping is enabled or not
  91. */
  92. set toneMappingEnabled(value: boolean);
  93. /**
  94. * Gets the type of tone mapping effect.
  95. */
  96. get toneMappingType(): number;
  97. /**
  98. * Sets the type of tone mapping effect.
  99. */
  100. set toneMappingType(value: number);
  101. /**
  102. * Gets contrast used in the effect.
  103. */
  104. get contrast(): number;
  105. /**
  106. * Sets contrast used in the effect.
  107. */
  108. set contrast(value: number);
  109. /**
  110. * Gets Vignette stretch size.
  111. */
  112. get vignetteStretch(): number;
  113. /**
  114. * Sets Vignette stretch size.
  115. */
  116. set vignetteStretch(value: number);
  117. /**
  118. * Gets Vignette center X Offset.
  119. * @deprecated use vignetteCenterX instead
  120. */
  121. get vignetteCentreX(): number;
  122. /**
  123. * Sets Vignette center X Offset.
  124. * @deprecated use vignetteCenterX instead
  125. */
  126. set vignetteCentreX(value: number);
  127. /**
  128. * Gets Vignette center Y Offset.
  129. * @deprecated use vignetteCenterY instead
  130. */
  131. get vignetteCentreY(): number;
  132. /**
  133. * Sets Vignette center Y Offset.
  134. * @deprecated use vignetteCenterY instead
  135. */
  136. set vignetteCentreY(value: number);
  137. /**
  138. * Vignette center Y Offset.
  139. */
  140. get vignetteCenterY(): number;
  141. set vignetteCenterY(value: number);
  142. /**
  143. * Vignette center X Offset.
  144. */
  145. get vignetteCenterX(): number;
  146. set vignetteCenterX(value: number);
  147. /**
  148. * Gets Vignette weight or intensity of the vignette effect.
  149. */
  150. get vignetteWeight(): number;
  151. /**
  152. * Sets Vignette weight or intensity of the vignette effect.
  153. */
  154. set vignetteWeight(value: number);
  155. /**
  156. * Gets Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode)
  157. * if vignetteEnabled is set to true.
  158. */
  159. get vignetteColor(): Color4;
  160. /**
  161. * Sets Color of the vignette applied on the screen through the chosen blend mode (vignetteBlendMode)
  162. * if vignetteEnabled is set to true.
  163. */
  164. set vignetteColor(value: Color4);
  165. /**
  166. * Gets Camera field of view used by the Vignette effect.
  167. */
  168. get vignetteCameraFov(): number;
  169. /**
  170. * Sets Camera field of view used by the Vignette effect.
  171. */
  172. set vignetteCameraFov(value: number);
  173. /**
  174. * Gets the vignette blend mode allowing different kind of effect.
  175. */
  176. get vignetteBlendMode(): number;
  177. /**
  178. * Sets the vignette blend mode allowing different kind of effect.
  179. */
  180. set vignetteBlendMode(value: number);
  181. /**
  182. * Gets whether the vignette effect is enabled.
  183. */
  184. get vignetteEnabled(): boolean;
  185. /**
  186. * Sets whether the vignette effect is enabled.
  187. */
  188. set vignetteEnabled(value: boolean);
  189. /**
  190. * Gets intensity of the dithering effect.
  191. */
  192. get ditheringIntensity(): number;
  193. /**
  194. * Sets intensity of the dithering effect.
  195. */
  196. set ditheringIntensity(value: number);
  197. /**
  198. * Gets whether the dithering effect is enabled.
  199. */
  200. get ditheringEnabled(): boolean;
  201. /**
  202. * Sets whether the dithering effect is enabled.
  203. */
  204. set ditheringEnabled(value: boolean);
  205. private _fromLinearSpace;
  206. /**
  207. * Gets whether the input of the processing is in Gamma or Linear Space.
  208. */
  209. get fromLinearSpace(): boolean;
  210. /**
  211. * Sets whether the input of the processing is in Gamma or Linear Space.
  212. */
  213. set fromLinearSpace(value: boolean);
  214. /**
  215. * Defines cache preventing GC.
  216. */
  217. private _defines;
  218. constructor(name: string, options: number | PostProcessOptions, camera?: Nullable<Camera>, samplingMode?: number, engine?: AbstractEngine, reusable?: boolean, textureType?: number, imageProcessingConfiguration?: ImageProcessingConfiguration);
  219. /**
  220. * "ImageProcessingPostProcess"
  221. * @returns "ImageProcessingPostProcess"
  222. */
  223. getClassName(): string;
  224. /**
  225. * @internal
  226. */
  227. _updateParameters(): void;
  228. dispose(camera?: Camera): void;
  229. }