babylonjs.postProcess.module.d.ts 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660
  1. declare module "babylonjs-post-process/asciiArt/asciiart.fragment" {
  2. /** @hidden */
  3. export var asciiartPixelShader: {
  4. name: string;
  5. shader: string;
  6. };
  7. }
  8. declare module "babylonjs-post-process/asciiArt/asciiArtPostProcess" {
  9. import { Nullable } from "babylonjs/types";
  10. import { Camera } from "babylonjs/Cameras/camera";
  11. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  12. import { PostProcess } from "babylonjs/PostProcesses/postProcess";
  13. import { Scene } from "babylonjs/scene";
  14. import "babylonjs-post-process/asciiArt/asciiart.fragment";
  15. /**
  16. * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
  17. *
  18. * It basically takes care rendering the font front the given font size to a texture.
  19. * This is used later on in the postprocess.
  20. */
  21. export class AsciiArtFontTexture extends BaseTexture {
  22. private _font;
  23. private _text;
  24. private _charSize;
  25. /**
  26. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  27. */
  28. readonly charSize: number;
  29. /**
  30. * Create a new instance of the Ascii Art FontTexture class
  31. * @param name the name of the texture
  32. * @param font the font to use, use the W3C CSS notation
  33. * @param text the caracter set to use in the rendering.
  34. * @param scene the scene that owns the texture
  35. */
  36. constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
  37. /**
  38. * Gets the max char width of a font.
  39. * @param font the font to use, use the W3C CSS notation
  40. * @return the max char width
  41. */
  42. private getFontWidth;
  43. /**
  44. * Gets the max char height of a font.
  45. * @param font the font to use, use the W3C CSS notation
  46. * @return the max char height
  47. */
  48. private getFontHeight;
  49. /**
  50. * Clones the current AsciiArtTexture.
  51. * @return the clone of the texture.
  52. */
  53. clone(): AsciiArtFontTexture;
  54. /**
  55. * Parses a json object representing the texture and returns an instance of it.
  56. * @param source the source JSON representation
  57. * @param scene the scene to create the texture for
  58. * @return the parsed texture
  59. */
  60. static Parse(source: any, scene: Scene): AsciiArtFontTexture;
  61. }
  62. /**
  63. * Option available in the Ascii Art Post Process.
  64. */
  65. export interface IAsciiArtPostProcessOptions {
  66. /**
  67. * The font to use following the w3c font definition.
  68. */
  69. font?: string;
  70. /**
  71. * The character set to use in the postprocess.
  72. */
  73. characterSet?: string;
  74. /**
  75. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  76. * This number is defined between 0 and 1;
  77. */
  78. mixToTile?: number;
  79. /**
  80. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  81. * This number is defined between 0 and 1;
  82. */
  83. mixToNormal?: number;
  84. }
  85. /**
  86. * AsciiArtPostProcess helps rendering everithing in Ascii Art.
  87. *
  88. * Simmply add it to your scene and let the nerd that lives in you have fun.
  89. * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
  90. */
  91. export class AsciiArtPostProcess extends PostProcess {
  92. /**
  93. * The font texture used to render the char in the post process.
  94. */
  95. private _asciiArtFontTexture;
  96. /**
  97. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  98. * This number is defined between 0 and 1;
  99. */
  100. mixToTile: number;
  101. /**
  102. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  103. * This number is defined between 0 and 1;
  104. */
  105. mixToNormal: number;
  106. /**
  107. * Instantiates a new Ascii Art Post Process.
  108. * @param name the name to give to the postprocess
  109. * @camera the camera to apply the post process to.
  110. * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
  111. */
  112. constructor(name: string, camera: Camera, options?: string | IAsciiArtPostProcessOptions);
  113. }
  114. }
  115. declare module "babylonjs-post-process/asciiArt/index" {
  116. export * from "babylonjs-post-process/asciiArt/asciiArtPostProcess";
  117. }
  118. declare module "babylonjs-post-process/digitalRain/digitalrain.fragment" {
  119. /** @hidden */
  120. export var digitalrainPixelShader: {
  121. name: string;
  122. shader: string;
  123. };
  124. }
  125. declare module "babylonjs-post-process/digitalRain/digitalRainPostProcess" {
  126. import { Nullable } from "babylonjs/types";
  127. import { Camera } from "babylonjs/Cameras/camera";
  128. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  129. import { PostProcess } from "babylonjs/PostProcesses/postProcess";
  130. import { Scene } from "babylonjs/scene";
  131. import "babylonjs-post-process/digitalRain/digitalrain.fragment";
  132. /**
  133. * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
  134. *
  135. * It basically takes care rendering the font front the given font size to a texture.
  136. * This is used later on in the postprocess.
  137. */
  138. export class DigitalRainFontTexture extends BaseTexture {
  139. private _font;
  140. private _text;
  141. private _charSize;
  142. /**
  143. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  144. */
  145. readonly charSize: number;
  146. /**
  147. * Create a new instance of the Digital Rain FontTexture class
  148. * @param name the name of the texture
  149. * @param font the font to use, use the W3C CSS notation
  150. * @param text the caracter set to use in the rendering.
  151. * @param scene the scene that owns the texture
  152. */
  153. constructor(name: string, font: string, text: string, scene?: Nullable<Scene>);
  154. /**
  155. * Gets the max char width of a font.
  156. * @param font the font to use, use the W3C CSS notation
  157. * @return the max char width
  158. */
  159. private getFontWidth;
  160. /**
  161. * Gets the max char height of a font.
  162. * @param font the font to use, use the W3C CSS notation
  163. * @return the max char height
  164. */
  165. private getFontHeight;
  166. /**
  167. * Clones the current DigitalRainFontTexture.
  168. * @return the clone of the texture.
  169. */
  170. clone(): DigitalRainFontTexture;
  171. /**
  172. * Parses a json object representing the texture and returns an instance of it.
  173. * @param source the source JSON representation
  174. * @param scene the scene to create the texture for
  175. * @return the parsed texture
  176. */
  177. static Parse(source: any, scene: Scene): DigitalRainFontTexture;
  178. }
  179. /**
  180. * Option available in the Digital Rain Post Process.
  181. */
  182. export interface IDigitalRainPostProcessOptions {
  183. /**
  184. * The font to use following the w3c font definition.
  185. */
  186. font?: string;
  187. /**
  188. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  189. * This number is defined between 0 and 1;
  190. */
  191. mixToTile?: number;
  192. /**
  193. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  194. * This number is defined between 0 and 1;
  195. */
  196. mixToNormal?: number;
  197. }
  198. /**
  199. * DigitalRainPostProcess helps rendering everithing in digital rain.
  200. *
  201. * Simmply add it to your scene and let the nerd that lives in you have fun.
  202. * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
  203. */
  204. export class DigitalRainPostProcess extends PostProcess {
  205. /**
  206. * The font texture used to render the char in the post process.
  207. */
  208. private _digitalRainFontTexture;
  209. /**
  210. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  211. * This number is defined between 0 and 1;
  212. */
  213. mixToTile: number;
  214. /**
  215. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  216. * This number is defined between 0 and 1;
  217. */
  218. mixToNormal: number;
  219. /**
  220. * Instantiates a new Digital Rain Post Process.
  221. * @param name the name to give to the postprocess
  222. * @camera the camera to apply the post process to.
  223. * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
  224. */
  225. constructor(name: string, camera: Camera, options?: string | IDigitalRainPostProcessOptions);
  226. }
  227. }
  228. declare module "babylonjs-post-process/digitalRain/index" {
  229. export * from "babylonjs-post-process/digitalRain/digitalRainPostProcess";
  230. }
  231. declare module "babylonjs-post-process/ocean/oceanPostProcess.fragment" {
  232. /** @hidden */
  233. export var oceanPostProcessPixelShader: {
  234. name: string;
  235. shader: string;
  236. };
  237. }
  238. declare module "babylonjs-post-process/ocean/oceanPostProcess" {
  239. import { TargetCamera } from "babylonjs/Cameras/targetCamera";
  240. import { MirrorTexture } from "babylonjs/Materials/Textures/mirrorTexture";
  241. import { RenderTargetTexture } from "babylonjs/Materials/Textures/renderTargetTexture";
  242. import { PostProcess } from "babylonjs/PostProcesses/postProcess";
  243. import "babylonjs-post-process/ocean/oceanPostProcess.fragment";
  244. /**
  245. * Option available in the Ocean Post Process.
  246. */
  247. export interface IOceanPostProcessOptions {
  248. /**
  249. * The size of the reflection RTT (number if square, or {width: number, height:number} or {ratio:} to define a ratio from the main scene)
  250. */
  251. reflectionSize?: number | {
  252. width: number;
  253. height: number;
  254. } | {
  255. ratio: number;
  256. };
  257. /**
  258. * The size of the refraction RTT (number if square, or {width: number, height:number} or {ratio:} to define a ratio from the main scene)
  259. */
  260. refractionSize?: number | {
  261. width: number;
  262. height: number;
  263. } | {
  264. ratio: number;
  265. };
  266. }
  267. /**
  268. * OceanPostProcess helps rendering an infinite ocean surface that can reflect and refract environment.
  269. *
  270. * Simmply add it to your scene and let the nerd that lives in you have fun.
  271. * Example usage:
  272. * var pp = new OceanPostProcess("myOcean", camera);
  273. * pp.reflectionEnabled = true;
  274. * pp.refractionEnabled = true;
  275. */
  276. export class OceanPostProcess extends PostProcess {
  277. /**
  278. * Gets a boolean indicating if the real-time reflection is enabled on the ocean.
  279. */
  280. /**
  281. * Sets weither or not the real-time reflection is enabled on the ocean.
  282. * Is set to true, the reflection mirror texture will be used as reflection texture.
  283. */
  284. reflectionEnabled: boolean;
  285. /**
  286. * Gets a boolean indicating if the real-time refraction is enabled on the ocean.
  287. */
  288. /**
  289. * Sets weither or not the real-time refraction is enabled on the ocean.
  290. * Is set to true, the refraction render target texture will be used as refraction texture.
  291. */
  292. refractionEnabled: boolean;
  293. /**
  294. * Gets wether or not the post-processes is supported by the running hardware.
  295. * This requires draw buffer supports.
  296. */
  297. readonly isSupported: boolean;
  298. /**
  299. * This is the reflection mirror texture used to display reflections on the ocean.
  300. * By default, render list is empty.
  301. */
  302. reflectionTexture: MirrorTexture;
  303. /**
  304. * This is the refraction render target texture used to display refraction on the ocean.
  305. * By default, render list is empty.
  306. */
  307. refractionTexture: RenderTargetTexture;
  308. private _time;
  309. private _cameraRotation;
  310. private _cameraViewMatrix;
  311. private _reflectionEnabled;
  312. private _refractionEnabled;
  313. private _geometryRenderer;
  314. /**
  315. * Instantiates a new Ocean Post Process.
  316. * @param name the name to give to the postprocess.
  317. * @camera the camera to apply the post process to.
  318. * @param options optional object following the IOceanPostProcessOptions format used to customize reflection and refraction render targets sizes.
  319. */
  320. constructor(name: string, camera: TargetCamera, options?: IOceanPostProcessOptions);
  321. /**
  322. * Returns the appropriate defines according to the current configuration.
  323. */
  324. private _getDefines;
  325. /**
  326. * Computes the current camera rotation as the shader requires a camera rotation.
  327. */
  328. private _computeCameraRotation;
  329. }
  330. }
  331. declare module "babylonjs-post-process/ocean/index" {
  332. export * from "babylonjs-post-process/ocean/oceanPostProcess";
  333. }
  334. declare module "babylonjs-post-process/index" {
  335. export * from "babylonjs-post-process/asciiArt/index";
  336. export * from "babylonjs-post-process/digitalRain/index";
  337. export * from "babylonjs-post-process/ocean/index";
  338. }
  339. declare module "babylonjs-post-process/legacy/legacy-asciiArt" {
  340. export * from "babylonjs-post-process/asciiArt/index";
  341. }
  342. declare module "babylonjs-post-process/legacy/legacy-digitalRain" {
  343. export * from "babylonjs-post-process/digitalRain/index";
  344. }
  345. declare module "babylonjs-post-process/legacy/legacy-ocean" {
  346. export * from "babylonjs-post-process/ocean/index";
  347. }
  348. declare module "babylonjs-post-process/legacy/legacy" {
  349. export * from "babylonjs-post-process/index";
  350. }
  351. declare module "babylonjs-post-process" {
  352. export * from "babylonjs-post-process/legacy/legacy";
  353. }
  354. declare module BABYLON {
  355. /** @hidden */
  356. export var asciiartPixelShader: {
  357. name: string;
  358. shader: string;
  359. };
  360. }
  361. declare module BABYLON {
  362. /**
  363. * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
  364. *
  365. * It basically takes care rendering the font front the given font size to a texture.
  366. * This is used later on in the postprocess.
  367. */
  368. export class AsciiArtFontTexture extends BABYLON.BaseTexture {
  369. private _font;
  370. private _text;
  371. private _charSize;
  372. /**
  373. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  374. */
  375. readonly charSize: number;
  376. /**
  377. * Create a new instance of the Ascii Art FontTexture class
  378. * @param name the name of the texture
  379. * @param font the font to use, use the W3C CSS notation
  380. * @param text the caracter set to use in the rendering.
  381. * @param scene the scene that owns the texture
  382. */
  383. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  384. /**
  385. * Gets the max char width of a font.
  386. * @param font the font to use, use the W3C CSS notation
  387. * @return the max char width
  388. */
  389. private getFontWidth;
  390. /**
  391. * Gets the max char height of a font.
  392. * @param font the font to use, use the W3C CSS notation
  393. * @return the max char height
  394. */
  395. private getFontHeight;
  396. /**
  397. * Clones the current AsciiArtTexture.
  398. * @return the clone of the texture.
  399. */
  400. clone(): AsciiArtFontTexture;
  401. /**
  402. * Parses a json object representing the texture and returns an instance of it.
  403. * @param source the source JSON representation
  404. * @param scene the scene to create the texture for
  405. * @return the parsed texture
  406. */
  407. static Parse(source: any, scene: BABYLON.Scene): AsciiArtFontTexture;
  408. }
  409. /**
  410. * Option available in the Ascii Art Post Process.
  411. */
  412. export interface IAsciiArtPostProcessOptions {
  413. /**
  414. * The font to use following the w3c font definition.
  415. */
  416. font?: string;
  417. /**
  418. * The character set to use in the postprocess.
  419. */
  420. characterSet?: string;
  421. /**
  422. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  423. * This number is defined between 0 and 1;
  424. */
  425. mixToTile?: number;
  426. /**
  427. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  428. * This number is defined between 0 and 1;
  429. */
  430. mixToNormal?: number;
  431. }
  432. /**
  433. * AsciiArtPostProcess helps rendering everithing in Ascii Art.
  434. *
  435. * Simmply add it to your scene and let the nerd that lives in you have fun.
  436. * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
  437. */
  438. export class AsciiArtPostProcess extends BABYLON.PostProcess {
  439. /**
  440. * The font texture used to render the char in the post process.
  441. */
  442. private _asciiArtFontTexture;
  443. /**
  444. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  445. * This number is defined between 0 and 1;
  446. */
  447. mixToTile: number;
  448. /**
  449. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  450. * This number is defined between 0 and 1;
  451. */
  452. mixToNormal: number;
  453. /**
  454. * Instantiates a new Ascii Art Post Process.
  455. * @param name the name to give to the postprocess
  456. * @camera the camera to apply the post process to.
  457. * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
  458. */
  459. constructor(name: string, camera: BABYLON.Camera, options?: string | IAsciiArtPostProcessOptions);
  460. }
  461. }
  462. declare module BABYLON {
  463. /** @hidden */
  464. export var digitalrainPixelShader: {
  465. name: string;
  466. shader: string;
  467. };
  468. }
  469. declare module BABYLON {
  470. /**
  471. * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
  472. *
  473. * It basically takes care rendering the font front the given font size to a texture.
  474. * This is used later on in the postprocess.
  475. */
  476. export class DigitalRainFontTexture extends BABYLON.BaseTexture {
  477. private _font;
  478. private _text;
  479. private _charSize;
  480. /**
  481. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  482. */
  483. readonly charSize: number;
  484. /**
  485. * Create a new instance of the Digital Rain FontTexture class
  486. * @param name the name of the texture
  487. * @param font the font to use, use the W3C CSS notation
  488. * @param text the caracter set to use in the rendering.
  489. * @param scene the scene that owns the texture
  490. */
  491. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  492. /**
  493. * Gets the max char width of a font.
  494. * @param font the font to use, use the W3C CSS notation
  495. * @return the max char width
  496. */
  497. private getFontWidth;
  498. /**
  499. * Gets the max char height of a font.
  500. * @param font the font to use, use the W3C CSS notation
  501. * @return the max char height
  502. */
  503. private getFontHeight;
  504. /**
  505. * Clones the current DigitalRainFontTexture.
  506. * @return the clone of the texture.
  507. */
  508. clone(): DigitalRainFontTexture;
  509. /**
  510. * Parses a json object representing the texture and returns an instance of it.
  511. * @param source the source JSON representation
  512. * @param scene the scene to create the texture for
  513. * @return the parsed texture
  514. */
  515. static Parse(source: any, scene: BABYLON.Scene): DigitalRainFontTexture;
  516. }
  517. /**
  518. * Option available in the Digital Rain Post Process.
  519. */
  520. export interface IDigitalRainPostProcessOptions {
  521. /**
  522. * The font to use following the w3c font definition.
  523. */
  524. font?: string;
  525. /**
  526. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  527. * This number is defined between 0 and 1;
  528. */
  529. mixToTile?: number;
  530. /**
  531. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  532. * This number is defined between 0 and 1;
  533. */
  534. mixToNormal?: number;
  535. }
  536. /**
  537. * DigitalRainPostProcess helps rendering everithing in digital rain.
  538. *
  539. * Simmply add it to your scene and let the nerd that lives in you have fun.
  540. * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
  541. */
  542. export class DigitalRainPostProcess extends BABYLON.PostProcess {
  543. /**
  544. * The font texture used to render the char in the post process.
  545. */
  546. private _digitalRainFontTexture;
  547. /**
  548. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  549. * This number is defined between 0 and 1;
  550. */
  551. mixToTile: number;
  552. /**
  553. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  554. * This number is defined between 0 and 1;
  555. */
  556. mixToNormal: number;
  557. /**
  558. * Instantiates a new Digital Rain Post Process.
  559. * @param name the name to give to the postprocess
  560. * @camera the camera to apply the post process to.
  561. * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
  562. */
  563. constructor(name: string, camera: BABYLON.Camera, options?: string | IDigitalRainPostProcessOptions);
  564. }
  565. }
  566. declare module BABYLON {
  567. /** @hidden */
  568. export var oceanPostProcessPixelShader: {
  569. name: string;
  570. shader: string;
  571. };
  572. }
  573. declare module BABYLON {
  574. /**
  575. * Option available in the Ocean Post Process.
  576. */
  577. export interface IOceanPostProcessOptions {
  578. /**
  579. * The size of the reflection RTT (number if square, or {width: number, height:number} or {ratio:} to define a ratio from the main scene)
  580. */
  581. reflectionSize?: number | {
  582. width: number;
  583. height: number;
  584. } | {
  585. ratio: number;
  586. };
  587. /**
  588. * The size of the refraction RTT (number if square, or {width: number, height:number} or {ratio:} to define a ratio from the main scene)
  589. */
  590. refractionSize?: number | {
  591. width: number;
  592. height: number;
  593. } | {
  594. ratio: number;
  595. };
  596. }
  597. /**
  598. * OceanPostProcess helps rendering an infinite ocean surface that can reflect and refract environment.
  599. *
  600. * Simmply add it to your scene and let the nerd that lives in you have fun.
  601. * Example usage:
  602. * var pp = new OceanPostProcess("myOcean", camera);
  603. * pp.reflectionEnabled = true;
  604. * pp.refractionEnabled = true;
  605. */
  606. export class OceanPostProcess extends BABYLON.PostProcess {
  607. /**
  608. * Gets a boolean indicating if the real-time reflection is enabled on the ocean.
  609. */
  610. /**
  611. * Sets weither or not the real-time reflection is enabled on the ocean.
  612. * Is set to true, the reflection mirror texture will be used as reflection texture.
  613. */
  614. reflectionEnabled: boolean;
  615. /**
  616. * Gets a boolean indicating if the real-time refraction is enabled on the ocean.
  617. */
  618. /**
  619. * Sets weither or not the real-time refraction is enabled on the ocean.
  620. * Is set to true, the refraction render target texture will be used as refraction texture.
  621. */
  622. refractionEnabled: boolean;
  623. /**
  624. * Gets wether or not the post-processes is supported by the running hardware.
  625. * This requires draw buffer supports.
  626. */
  627. readonly isSupported: boolean;
  628. /**
  629. * This is the reflection mirror texture used to display reflections on the ocean.
  630. * By default, render list is empty.
  631. */
  632. reflectionTexture: BABYLON.MirrorTexture;
  633. /**
  634. * This is the refraction render target texture used to display refraction on the ocean.
  635. * By default, render list is empty.
  636. */
  637. refractionTexture: BABYLON.RenderTargetTexture;
  638. private _time;
  639. private _cameraRotation;
  640. private _cameraViewMatrix;
  641. private _reflectionEnabled;
  642. private _refractionEnabled;
  643. private _geometryRenderer;
  644. /**
  645. * Instantiates a new Ocean Post Process.
  646. * @param name the name to give to the postprocess.
  647. * @camera the camera to apply the post process to.
  648. * @param options optional object following the IOceanPostProcessOptions format used to customize reflection and refraction render targets sizes.
  649. */
  650. constructor(name: string, camera: BABYLON.TargetCamera, options?: IOceanPostProcessOptions);
  651. /**
  652. * Returns the appropriate defines according to the current configuration.
  653. */
  654. private _getDefines;
  655. /**
  656. * Computes the current camera rotation as the shader requires a camera rotation.
  657. */
  658. private _computeCameraRotation;
  659. }
  660. }