babylonjs.postProcess.module.d.ts 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664
  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. get 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. get 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. get reflectionEnabled(): boolean;
  281. /**
  282. * Sets weither or not the real-time reflection is enabled on the ocean.
  283. * Is set to true, the reflection mirror texture will be used as reflection texture.
  284. */
  285. set reflectionEnabled(enabled: boolean);
  286. /**
  287. * Gets a boolean indicating if the real-time refraction is enabled on the ocean.
  288. */
  289. get refractionEnabled(): boolean;
  290. /**
  291. * Sets weither or not the real-time refraction is enabled on the ocean.
  292. * Is set to true, the refraction render target texture will be used as refraction texture.
  293. */
  294. set refractionEnabled(enabled: boolean);
  295. /**
  296. * Gets wether or not the post-processes is supported by the running hardware.
  297. * This requires draw buffer supports.
  298. */
  299. get isSupported(): boolean;
  300. /**
  301. * This is the reflection mirror texture used to display reflections on the ocean.
  302. * By default, render list is empty.
  303. */
  304. reflectionTexture: MirrorTexture;
  305. /**
  306. * This is the refraction render target texture used to display refraction on the ocean.
  307. * By default, render list is empty.
  308. */
  309. refractionTexture: RenderTargetTexture;
  310. private _time;
  311. private _cameraRotation;
  312. private _cameraViewMatrix;
  313. private _reflectionEnabled;
  314. private _refractionEnabled;
  315. private _geometryRenderer;
  316. /**
  317. * Instantiates a new Ocean Post Process.
  318. * @param name the name to give to the postprocess.
  319. * @camera the camera to apply the post process to.
  320. * @param options optional object following the IOceanPostProcessOptions format used to customize reflection and refraction render targets sizes.
  321. */
  322. constructor(name: string, camera: TargetCamera, options?: IOceanPostProcessOptions);
  323. /**
  324. * Returns the appropriate defines according to the current configuration.
  325. */
  326. private _getDefines;
  327. /**
  328. * Computes the current camera rotation as the shader requires a camera rotation.
  329. */
  330. private _computeCameraRotation;
  331. }
  332. }
  333. declare module "babylonjs-post-process/ocean/index" {
  334. export * from "babylonjs-post-process/ocean/oceanPostProcess";
  335. }
  336. declare module "babylonjs-post-process/index" {
  337. export * from "babylonjs-post-process/asciiArt/index";
  338. export * from "babylonjs-post-process/digitalRain/index";
  339. export * from "babylonjs-post-process/ocean/index";
  340. }
  341. declare module "babylonjs-post-process/legacy/legacy-asciiArt" {
  342. export * from "babylonjs-post-process/asciiArt/index";
  343. }
  344. declare module "babylonjs-post-process/legacy/legacy-digitalRain" {
  345. export * from "babylonjs-post-process/digitalRain/index";
  346. }
  347. declare module "babylonjs-post-process/legacy/legacy-ocean" {
  348. export * from "babylonjs-post-process/ocean/index";
  349. }
  350. declare module "babylonjs-post-process/legacy/legacy" {
  351. export * from "babylonjs-post-process/index";
  352. }
  353. declare module "babylonjs-post-process" {
  354. export * from "babylonjs-post-process/legacy/legacy";
  355. }
  356. declare module BABYLON {
  357. /** @hidden */
  358. export var asciiartPixelShader: {
  359. name: string;
  360. shader: string;
  361. };
  362. }
  363. declare module BABYLON {
  364. /**
  365. * AsciiArtFontTexture is the helper class used to easily create your ascii art font texture.
  366. *
  367. * It basically takes care rendering the font front the given font size to a texture.
  368. * This is used later on in the postprocess.
  369. */
  370. export class AsciiArtFontTexture extends BABYLON.BaseTexture {
  371. private _font;
  372. private _text;
  373. private _charSize;
  374. /**
  375. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  376. */
  377. get charSize(): number;
  378. /**
  379. * Create a new instance of the Ascii Art FontTexture class
  380. * @param name the name of the texture
  381. * @param font the font to use, use the W3C CSS notation
  382. * @param text the caracter set to use in the rendering.
  383. * @param scene the scene that owns the texture
  384. */
  385. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  386. /**
  387. * Gets the max char width of a font.
  388. * @param font the font to use, use the W3C CSS notation
  389. * @return the max char width
  390. */
  391. private getFontWidth;
  392. /**
  393. * Gets the max char height of a font.
  394. * @param font the font to use, use the W3C CSS notation
  395. * @return the max char height
  396. */
  397. private getFontHeight;
  398. /**
  399. * Clones the current AsciiArtTexture.
  400. * @return the clone of the texture.
  401. */
  402. clone(): AsciiArtFontTexture;
  403. /**
  404. * Parses a json object representing the texture and returns an instance of it.
  405. * @param source the source JSON representation
  406. * @param scene the scene to create the texture for
  407. * @return the parsed texture
  408. */
  409. static Parse(source: any, scene: BABYLON.Scene): AsciiArtFontTexture;
  410. }
  411. /**
  412. * Option available in the Ascii Art Post Process.
  413. */
  414. export interface IAsciiArtPostProcessOptions {
  415. /**
  416. * The font to use following the w3c font definition.
  417. */
  418. font?: string;
  419. /**
  420. * The character set to use in the postprocess.
  421. */
  422. characterSet?: string;
  423. /**
  424. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  425. * This number is defined between 0 and 1;
  426. */
  427. mixToTile?: number;
  428. /**
  429. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  430. * This number is defined between 0 and 1;
  431. */
  432. mixToNormal?: number;
  433. }
  434. /**
  435. * AsciiArtPostProcess helps rendering everithing in Ascii Art.
  436. *
  437. * Simmply add it to your scene and let the nerd that lives in you have fun.
  438. * Example usage: var pp = new AsciiArtPostProcess("myAscii", "20px Monospace", camera);
  439. */
  440. export class AsciiArtPostProcess extends BABYLON.PostProcess {
  441. /**
  442. * The font texture used to render the char in the post process.
  443. */
  444. private _asciiArtFontTexture;
  445. /**
  446. * This defines the amount you want to mix the "tile" or caracter space colored in the ascii art.
  447. * This number is defined between 0 and 1;
  448. */
  449. mixToTile: number;
  450. /**
  451. * This defines the amount you want to mix the normal rendering pass in the ascii art.
  452. * This number is defined between 0 and 1;
  453. */
  454. mixToNormal: number;
  455. /**
  456. * Instantiates a new Ascii Art Post Process.
  457. * @param name the name to give to the postprocess
  458. * @camera the camera to apply the post process to.
  459. * @param options can either be the font name or an option object following the IAsciiArtPostProcessOptions format
  460. */
  461. constructor(name: string, camera: BABYLON.Camera, options?: string | IAsciiArtPostProcessOptions);
  462. }
  463. }
  464. declare module BABYLON {
  465. /** @hidden */
  466. export var digitalrainPixelShader: {
  467. name: string;
  468. shader: string;
  469. };
  470. }
  471. declare module BABYLON {
  472. /**
  473. * DigitalRainFontTexture is the helper class used to easily create your digital rain font texture.
  474. *
  475. * It basically takes care rendering the font front the given font size to a texture.
  476. * This is used later on in the postprocess.
  477. */
  478. export class DigitalRainFontTexture extends BABYLON.BaseTexture {
  479. private _font;
  480. private _text;
  481. private _charSize;
  482. /**
  483. * Gets the size of one char in the texture (each char fits in size * size space in the texture).
  484. */
  485. get charSize(): number;
  486. /**
  487. * Create a new instance of the Digital Rain FontTexture class
  488. * @param name the name of the texture
  489. * @param font the font to use, use the W3C CSS notation
  490. * @param text the caracter set to use in the rendering.
  491. * @param scene the scene that owns the texture
  492. */
  493. constructor(name: string, font: string, text: string, scene?: BABYLON.Nullable<BABYLON.Scene>);
  494. /**
  495. * Gets the max char width of a font.
  496. * @param font the font to use, use the W3C CSS notation
  497. * @return the max char width
  498. */
  499. private getFontWidth;
  500. /**
  501. * Gets the max char height of a font.
  502. * @param font the font to use, use the W3C CSS notation
  503. * @return the max char height
  504. */
  505. private getFontHeight;
  506. /**
  507. * Clones the current DigitalRainFontTexture.
  508. * @return the clone of the texture.
  509. */
  510. clone(): DigitalRainFontTexture;
  511. /**
  512. * Parses a json object representing the texture and returns an instance of it.
  513. * @param source the source JSON representation
  514. * @param scene the scene to create the texture for
  515. * @return the parsed texture
  516. */
  517. static Parse(source: any, scene: BABYLON.Scene): DigitalRainFontTexture;
  518. }
  519. /**
  520. * Option available in the Digital Rain Post Process.
  521. */
  522. export interface IDigitalRainPostProcessOptions {
  523. /**
  524. * The font to use following the w3c font definition.
  525. */
  526. font?: string;
  527. /**
  528. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  529. * This number is defined between 0 and 1;
  530. */
  531. mixToTile?: number;
  532. /**
  533. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  534. * This number is defined between 0 and 1;
  535. */
  536. mixToNormal?: number;
  537. }
  538. /**
  539. * DigitalRainPostProcess helps rendering everithing in digital rain.
  540. *
  541. * Simmply add it to your scene and let the nerd that lives in you have fun.
  542. * Example usage: var pp = new DigitalRainPostProcess("digitalRain", "20px Monospace", camera);
  543. */
  544. export class DigitalRainPostProcess extends BABYLON.PostProcess {
  545. /**
  546. * The font texture used to render the char in the post process.
  547. */
  548. private _digitalRainFontTexture;
  549. /**
  550. * This defines the amount you want to mix the "tile" or caracter space colored in the digital rain.
  551. * This number is defined between 0 and 1;
  552. */
  553. mixToTile: number;
  554. /**
  555. * This defines the amount you want to mix the normal rendering pass in the digital rain.
  556. * This number is defined between 0 and 1;
  557. */
  558. mixToNormal: number;
  559. /**
  560. * Instantiates a new Digital Rain Post Process.
  561. * @param name the name to give to the postprocess
  562. * @camera the camera to apply the post process to.
  563. * @param options can either be the font name or an option object following the IDigitalRainPostProcessOptions format
  564. */
  565. constructor(name: string, camera: BABYLON.Camera, options?: string | IDigitalRainPostProcessOptions);
  566. }
  567. }
  568. declare module BABYLON {
  569. /** @hidden */
  570. export var oceanPostProcessPixelShader: {
  571. name: string;
  572. shader: string;
  573. };
  574. }
  575. declare module BABYLON {
  576. /**
  577. * Option available in the Ocean Post Process.
  578. */
  579. export interface IOceanPostProcessOptions {
  580. /**
  581. * The size of the reflection RTT (number if square, or {width: number, height:number} or {ratio:} to define a ratio from the main scene)
  582. */
  583. reflectionSize?: number | {
  584. width: number;
  585. height: number;
  586. } | {
  587. ratio: number;
  588. };
  589. /**
  590. * The size of the refraction RTT (number if square, or {width: number, height:number} or {ratio:} to define a ratio from the main scene)
  591. */
  592. refractionSize?: number | {
  593. width: number;
  594. height: number;
  595. } | {
  596. ratio: number;
  597. };
  598. }
  599. /**
  600. * OceanPostProcess helps rendering an infinite ocean surface that can reflect and refract environment.
  601. *
  602. * Simmply add it to your scene and let the nerd that lives in you have fun.
  603. * Example usage:
  604. * var pp = new OceanPostProcess("myOcean", camera);
  605. * pp.reflectionEnabled = true;
  606. * pp.refractionEnabled = true;
  607. */
  608. export class OceanPostProcess extends BABYLON.PostProcess {
  609. /**
  610. * Gets a boolean indicating if the real-time reflection is enabled on the ocean.
  611. */
  612. get reflectionEnabled(): boolean;
  613. /**
  614. * Sets weither or not the real-time reflection is enabled on the ocean.
  615. * Is set to true, the reflection mirror texture will be used as reflection texture.
  616. */
  617. set reflectionEnabled(enabled: boolean);
  618. /**
  619. * Gets a boolean indicating if the real-time refraction is enabled on the ocean.
  620. */
  621. get refractionEnabled(): boolean;
  622. /**
  623. * Sets weither or not the real-time refraction is enabled on the ocean.
  624. * Is set to true, the refraction render target texture will be used as refraction texture.
  625. */
  626. set refractionEnabled(enabled: boolean);
  627. /**
  628. * Gets wether or not the post-processes is supported by the running hardware.
  629. * This requires draw buffer supports.
  630. */
  631. get isSupported(): boolean;
  632. /**
  633. * This is the reflection mirror texture used to display reflections on the ocean.
  634. * By default, render list is empty.
  635. */
  636. reflectionTexture: BABYLON.MirrorTexture;
  637. /**
  638. * This is the refraction render target texture used to display refraction on the ocean.
  639. * By default, render list is empty.
  640. */
  641. refractionTexture: BABYLON.RenderTargetTexture;
  642. private _time;
  643. private _cameraRotation;
  644. private _cameraViewMatrix;
  645. private _reflectionEnabled;
  646. private _refractionEnabled;
  647. private _geometryRenderer;
  648. /**
  649. * Instantiates a new Ocean Post Process.
  650. * @param name the name to give to the postprocess.
  651. * @camera the camera to apply the post process to.
  652. * @param options optional object following the IOceanPostProcessOptions format used to customize reflection and refraction render targets sizes.
  653. */
  654. constructor(name: string, camera: BABYLON.TargetCamera, options?: IOceanPostProcessOptions);
  655. /**
  656. * Returns the appropriate defines according to the current configuration.
  657. */
  658. private _getDefines;
  659. /**
  660. * Computes the current camera rotation as the shader requires a camera rotation.
  661. */
  662. private _computeCameraRotation;
  663. }
  664. }