babylonjs.materials.module.d.ts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647
  1. declare module 'babylonjs-materials' {
  2. export = BABYLON;
  3. }
  4. declare module BABYLON {
  5. class ShadowOnlyMaterial extends PushMaterial {
  6. private _renderId;
  7. private _activeLight;
  8. constructor(name: string, scene: Scene);
  9. shadowColor: Color3;
  10. needAlphaBlending(): boolean;
  11. needAlphaTesting(): boolean;
  12. getAlphaTestTexture(): Nullable<BaseTexture>;
  13. activeLight: IShadowLight;
  14. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  15. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  16. clone(name: string): ShadowOnlyMaterial;
  17. serialize(): any;
  18. getClassName(): string;
  19. static Parse(source: any, scene: Scene, rootUrl: string): ShadowOnlyMaterial;
  20. }
  21. }
  22. declare module BABYLON {
  23. class GradientMaterial extends PushMaterial {
  24. private _maxSimultaneousLights;
  25. maxSimultaneousLights: number;
  26. topColor: Color3;
  27. topColorAlpha: number;
  28. bottomColor: Color3;
  29. bottomColorAlpha: number;
  30. offset: number;
  31. scale: number;
  32. smoothness: number;
  33. disableLighting: boolean;
  34. private _scaledDiffuse;
  35. private _renderId;
  36. constructor(name: string, scene: Scene);
  37. needAlphaBlending(): boolean;
  38. needAlphaTesting(): boolean;
  39. getAlphaTestTexture(): Nullable<BaseTexture>;
  40. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  41. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  42. getAnimatables(): IAnimatable[];
  43. dispose(forceDisposeEffect?: boolean): void;
  44. clone(name: string): GradientMaterial;
  45. serialize(): any;
  46. getClassName(): string;
  47. static Parse(source: any, scene: Scene, rootUrl: string): GradientMaterial;
  48. }
  49. }
  50. declare module BABYLON {
  51. class NormalMaterial extends PushMaterial {
  52. private _diffuseTexture;
  53. diffuseTexture: BaseTexture;
  54. diffuseColor: Color3;
  55. private _disableLighting;
  56. disableLighting: boolean;
  57. private _maxSimultaneousLights;
  58. maxSimultaneousLights: number;
  59. private _renderId;
  60. constructor(name: string, scene: Scene);
  61. needAlphaBlending(): boolean;
  62. needAlphaTesting(): boolean;
  63. getAlphaTestTexture(): Nullable<BaseTexture>;
  64. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  65. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  66. getAnimatables(): IAnimatable[];
  67. getActiveTextures(): BaseTexture[];
  68. hasTexture(texture: BaseTexture): boolean;
  69. dispose(forceDisposeEffect?: boolean): void;
  70. clone(name: string): NormalMaterial;
  71. serialize(): any;
  72. getClassName(): string;
  73. static Parse(source: any, scene: Scene, rootUrl: string): NormalMaterial;
  74. }
  75. }
  76. declare module BABYLON {
  77. class LavaMaterial extends PushMaterial {
  78. private _diffuseTexture;
  79. diffuseTexture: BaseTexture;
  80. noiseTexture: BaseTexture;
  81. fogColor: Color3;
  82. speed: number;
  83. movingSpeed: number;
  84. lowFrequencySpeed: number;
  85. fogDensity: number;
  86. private _lastTime;
  87. diffuseColor: Color3;
  88. private _disableLighting;
  89. disableLighting: boolean;
  90. private _unlit;
  91. unlit: boolean;
  92. private _maxSimultaneousLights;
  93. maxSimultaneousLights: number;
  94. private _scaledDiffuse;
  95. private _renderId;
  96. constructor(name: string, scene: Scene);
  97. needAlphaBlending(): boolean;
  98. needAlphaTesting(): boolean;
  99. getAlphaTestTexture(): Nullable<BaseTexture>;
  100. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  101. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  102. getAnimatables(): IAnimatable[];
  103. getActiveTextures(): BaseTexture[];
  104. hasTexture(texture: BaseTexture): boolean;
  105. dispose(forceDisposeEffect?: boolean): void;
  106. clone(name: string): LavaMaterial;
  107. serialize(): any;
  108. getClassName(): string;
  109. static Parse(source: any, scene: Scene, rootUrl: string): LavaMaterial;
  110. }
  111. }
  112. declare module BABYLON {
  113. class SimpleMaterial extends PushMaterial {
  114. private _diffuseTexture;
  115. diffuseTexture: BaseTexture;
  116. diffuseColor: Color3;
  117. private _disableLighting;
  118. disableLighting: boolean;
  119. private _maxSimultaneousLights;
  120. maxSimultaneousLights: number;
  121. private _renderId;
  122. constructor(name: string, scene: Scene);
  123. needAlphaBlending(): boolean;
  124. needAlphaTesting(): boolean;
  125. getAlphaTestTexture(): Nullable<BaseTexture>;
  126. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  127. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  128. getAnimatables(): IAnimatable[];
  129. getActiveTextures(): BaseTexture[];
  130. hasTexture(texture: BaseTexture): boolean;
  131. dispose(forceDisposeEffect?: boolean): void;
  132. clone(name: string): SimpleMaterial;
  133. serialize(): any;
  134. getClassName(): string;
  135. static Parse(source: any, scene: Scene, rootUrl: string): SimpleMaterial;
  136. }
  137. }
  138. declare module BABYLON {
  139. class WaterMaterial extends PushMaterial {
  140. renderTargetSize: Vector2;
  141. private _bumpTexture;
  142. bumpTexture: BaseTexture;
  143. diffuseColor: Color3;
  144. specularColor: Color3;
  145. specularPower: number;
  146. private _disableLighting;
  147. disableLighting: boolean;
  148. private _maxSimultaneousLights;
  149. maxSimultaneousLights: number;
  150. /**
  151. * @param {number}: Represents the wind force
  152. */
  153. windForce: number;
  154. /**
  155. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  156. */
  157. windDirection: Vector2;
  158. /**
  159. * @param {number}: Wave height, represents the height of the waves
  160. */
  161. waveHeight: number;
  162. /**
  163. * @param {number}: Bump height, represents the bump height related to the bump map
  164. */
  165. bumpHeight: number;
  166. /**
  167. * @param {boolean}: Add a smaller moving bump to less steady waves.
  168. */
  169. private _bumpSuperimpose;
  170. bumpSuperimpose: boolean;
  171. /**
  172. * @param {boolean}: Color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel.
  173. */
  174. private _fresnelSeparate;
  175. fresnelSeparate: boolean;
  176. /**
  177. * @param {boolean}: bump Waves modify the reflection.
  178. */
  179. private _bumpAffectsReflection;
  180. bumpAffectsReflection: boolean;
  181. /**
  182. * @param {number}: The water color blended with the refraction (near)
  183. */
  184. waterColor: Color3;
  185. /**
  186. * @param {number}: The blend factor related to the water color
  187. */
  188. colorBlendFactor: number;
  189. /**
  190. * @param {number}: The water color blended with the reflection (far)
  191. */
  192. waterColor2: Color3;
  193. /**
  194. * @param {number}: The blend factor related to the water color (reflection, far)
  195. */
  196. colorBlendFactor2: number;
  197. /**
  198. * @param {number}: Represents the maximum length of a wave
  199. */
  200. waveLength: number;
  201. /**
  202. * @param {number}: Defines the waves speed
  203. */
  204. waveSpeed: number;
  205. protected _renderTargets: SmartArray<RenderTargetTexture>;
  206. private _mesh;
  207. private _refractionRTT;
  208. private _reflectionRTT;
  209. private _reflectionTransform;
  210. private _lastTime;
  211. private _lastDeltaTime;
  212. private _renderId;
  213. private _useLogarithmicDepth;
  214. private _waitingRenderList;
  215. /**
  216. * Constructor
  217. */
  218. constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
  219. useLogarithmicDepth: boolean;
  220. readonly refractionTexture: Nullable<RenderTargetTexture>;
  221. readonly reflectionTexture: Nullable<RenderTargetTexture>;
  222. addToRenderList(node: any): void;
  223. enableRenderTargets(enable: boolean): void;
  224. getRenderList(): Nullable<AbstractMesh[]>;
  225. readonly renderTargetsEnabled: boolean;
  226. needAlphaBlending(): boolean;
  227. needAlphaTesting(): boolean;
  228. getAlphaTestTexture(): Nullable<BaseTexture>;
  229. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  230. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  231. private _createRenderTargets;
  232. getAnimatables(): IAnimatable[];
  233. getActiveTextures(): BaseTexture[];
  234. hasTexture(texture: BaseTexture): boolean;
  235. dispose(forceDisposeEffect?: boolean): void;
  236. clone(name: string): WaterMaterial;
  237. serialize(): any;
  238. getClassName(): string;
  239. static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
  240. static CreateDefaultMesh(name: string, scene: Scene): Mesh;
  241. }
  242. }
  243. declare module BABYLON {
  244. class FireMaterial extends PushMaterial {
  245. private _diffuseTexture;
  246. diffuseTexture: Nullable<BaseTexture>;
  247. private _distortionTexture;
  248. distortionTexture: Nullable<BaseTexture>;
  249. private _opacityTexture;
  250. opacityTexture: Nullable<BaseTexture>;
  251. diffuseColor: Color3;
  252. speed: number;
  253. private _scaledDiffuse;
  254. private _renderId;
  255. private _lastTime;
  256. constructor(name: string, scene: Scene);
  257. needAlphaBlending(): boolean;
  258. needAlphaTesting(): boolean;
  259. getAlphaTestTexture(): Nullable<BaseTexture>;
  260. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  261. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  262. getAnimatables(): IAnimatable[];
  263. getActiveTextures(): BaseTexture[];
  264. hasTexture(texture: BaseTexture): boolean;
  265. getClassName(): string;
  266. dispose(forceDisposeEffect?: boolean): void;
  267. clone(name: string): FireMaterial;
  268. serialize(): any;
  269. static Parse(source: any, scene: Scene, rootUrl: string): FireMaterial;
  270. }
  271. }
  272. declare module BABYLON {
  273. class FurMaterial extends PushMaterial {
  274. private _diffuseTexture;
  275. diffuseTexture: BaseTexture;
  276. private _heightTexture;
  277. heightTexture: BaseTexture;
  278. diffuseColor: Color3;
  279. furLength: number;
  280. furAngle: number;
  281. furColor: Color3;
  282. furOffset: number;
  283. furSpacing: number;
  284. furGravity: Vector3;
  285. furSpeed: number;
  286. furDensity: number;
  287. furOcclusion: number;
  288. furTexture: DynamicTexture;
  289. private _disableLighting;
  290. disableLighting: boolean;
  291. private _maxSimultaneousLights;
  292. maxSimultaneousLights: number;
  293. highLevelFur: boolean;
  294. _meshes: AbstractMesh[];
  295. private _renderId;
  296. private _furTime;
  297. constructor(name: string, scene: Scene);
  298. furTime: number;
  299. needAlphaBlending(): boolean;
  300. needAlphaTesting(): boolean;
  301. getAlphaTestTexture(): Nullable<BaseTexture>;
  302. updateFur(): void;
  303. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  304. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  305. getAnimatables(): IAnimatable[];
  306. getActiveTextures(): BaseTexture[];
  307. hasTexture(texture: BaseTexture): boolean;
  308. dispose(forceDisposeEffect?: boolean): void;
  309. clone(name: string): FurMaterial;
  310. serialize(): any;
  311. getClassName(): string;
  312. static Parse(source: any, scene: Scene, rootUrl: string): FurMaterial;
  313. static GenerateTexture(name: string, scene: Scene): DynamicTexture;
  314. static FurifyMesh(sourceMesh: Mesh, quality: number): Mesh[];
  315. }
  316. }
  317. declare module BABYLON {
  318. class TerrainMaterial extends PushMaterial {
  319. private _mixTexture;
  320. mixTexture: BaseTexture;
  321. private _diffuseTexture1;
  322. diffuseTexture1: Texture;
  323. private _diffuseTexture2;
  324. diffuseTexture2: Texture;
  325. private _diffuseTexture3;
  326. diffuseTexture3: Texture;
  327. private _bumpTexture1;
  328. bumpTexture1: Texture;
  329. private _bumpTexture2;
  330. bumpTexture2: Texture;
  331. private _bumpTexture3;
  332. bumpTexture3: Texture;
  333. diffuseColor: Color3;
  334. specularColor: Color3;
  335. specularPower: number;
  336. private _disableLighting;
  337. disableLighting: boolean;
  338. private _maxSimultaneousLights;
  339. maxSimultaneousLights: number;
  340. private _renderId;
  341. constructor(name: string, scene: Scene);
  342. needAlphaBlending(): boolean;
  343. needAlphaTesting(): boolean;
  344. getAlphaTestTexture(): Nullable<BaseTexture>;
  345. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  346. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  347. getAnimatables(): IAnimatable[];
  348. getActiveTextures(): BaseTexture[];
  349. hasTexture(texture: BaseTexture): boolean;
  350. dispose(forceDisposeEffect?: boolean): void;
  351. clone(name: string): TerrainMaterial;
  352. serialize(): any;
  353. getClassName(): string;
  354. static Parse(source: any, scene: Scene, rootUrl: string): TerrainMaterial;
  355. }
  356. }
  357. declare module BABYLON {
  358. class MixMaterial extends PushMaterial {
  359. /**
  360. * Mix textures
  361. */
  362. private _mixTexture1;
  363. mixTexture1: BaseTexture;
  364. private _mixTexture2;
  365. mixTexture2: BaseTexture;
  366. /**
  367. * Diffuse textures
  368. */
  369. private _diffuseTexture1;
  370. diffuseTexture1: Texture;
  371. private _diffuseTexture2;
  372. diffuseTexture2: Texture;
  373. private _diffuseTexture3;
  374. diffuseTexture3: Texture;
  375. private _diffuseTexture4;
  376. diffuseTexture4: Texture;
  377. private _diffuseTexture5;
  378. diffuseTexture5: Texture;
  379. private _diffuseTexture6;
  380. diffuseTexture6: Texture;
  381. private _diffuseTexture7;
  382. diffuseTexture7: Texture;
  383. private _diffuseTexture8;
  384. diffuseTexture8: Texture;
  385. /**
  386. * Uniforms
  387. */
  388. diffuseColor: Color3;
  389. specularColor: Color3;
  390. specularPower: number;
  391. private _disableLighting;
  392. disableLighting: boolean;
  393. private _maxSimultaneousLights;
  394. maxSimultaneousLights: number;
  395. private _renderId;
  396. constructor(name: string, scene: Scene);
  397. needAlphaBlending(): boolean;
  398. needAlphaTesting(): boolean;
  399. getAlphaTestTexture(): Nullable<BaseTexture>;
  400. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  401. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  402. getAnimatables(): IAnimatable[];
  403. getActiveTextures(): BaseTexture[];
  404. hasTexture(texture: BaseTexture): boolean;
  405. dispose(forceDisposeEffect?: boolean): void;
  406. clone(name: string): MixMaterial;
  407. serialize(): any;
  408. getClassName(): string;
  409. static Parse(source: any, scene: Scene, rootUrl: string): MixMaterial;
  410. }
  411. }
  412. declare module BABYLON {
  413. class TriPlanarMaterial extends PushMaterial {
  414. mixTexture: BaseTexture;
  415. private _diffuseTextureX;
  416. diffuseTextureX: BaseTexture;
  417. private _diffuseTextureY;
  418. diffuseTextureY: BaseTexture;
  419. private _diffuseTextureZ;
  420. diffuseTextureZ: BaseTexture;
  421. private _normalTextureX;
  422. normalTextureX: BaseTexture;
  423. private _normalTextureY;
  424. normalTextureY: BaseTexture;
  425. private _normalTextureZ;
  426. normalTextureZ: BaseTexture;
  427. tileSize: number;
  428. diffuseColor: Color3;
  429. specularColor: Color3;
  430. specularPower: number;
  431. private _disableLighting;
  432. disableLighting: boolean;
  433. private _maxSimultaneousLights;
  434. maxSimultaneousLights: number;
  435. private _renderId;
  436. constructor(name: string, scene: Scene);
  437. needAlphaBlending(): boolean;
  438. needAlphaTesting(): boolean;
  439. getAlphaTestTexture(): Nullable<BaseTexture>;
  440. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  441. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  442. getAnimatables(): IAnimatable[];
  443. getActiveTextures(): BaseTexture[];
  444. hasTexture(texture: BaseTexture): boolean;
  445. dispose(forceDisposeEffect?: boolean): void;
  446. clone(name: string): TriPlanarMaterial;
  447. serialize(): any;
  448. getClassName(): string;
  449. static Parse(source: any, scene: Scene, rootUrl: string): TriPlanarMaterial;
  450. }
  451. }
  452. declare module BABYLON {
  453. class SkyMaterial extends PushMaterial {
  454. luminance: number;
  455. turbidity: number;
  456. rayleigh: number;
  457. mieCoefficient: number;
  458. mieDirectionalG: number;
  459. distance: number;
  460. inclination: number;
  461. azimuth: number;
  462. sunPosition: Vector3;
  463. useSunPosition: boolean;
  464. private _cameraPosition;
  465. private _renderId;
  466. constructor(name: string, scene: Scene);
  467. needAlphaBlending(): boolean;
  468. needAlphaTesting(): boolean;
  469. getAlphaTestTexture(): Nullable<BaseTexture>;
  470. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  471. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  472. getAnimatables(): IAnimatable[];
  473. dispose(forceDisposeEffect?: boolean): void;
  474. clone(name: string): SkyMaterial;
  475. serialize(): any;
  476. getClassName(): string;
  477. static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
  478. }
  479. }
  480. declare module BABYLON {
  481. /**
  482. * The grid materials allows you to wrap any shape with a grid.
  483. * Colors are customizable.
  484. */
  485. class GridMaterial extends BABYLON.PushMaterial {
  486. /**
  487. * Main color of the grid (e.g. between lines)
  488. */
  489. mainColor: Color3;
  490. /**
  491. * Color of the grid lines.
  492. */
  493. lineColor: Color3;
  494. /**
  495. * The scale of the grid compared to unit.
  496. */
  497. gridRatio: number;
  498. /**
  499. * Allows setting an offset for the grid lines.
  500. */
  501. gridOffset: Vector3;
  502. /**
  503. * The frequency of thicker lines.
  504. */
  505. majorUnitFrequency: number;
  506. /**
  507. * The visibility of minor units in the grid.
  508. */
  509. minorUnitVisibility: number;
  510. /**
  511. * The grid opacity outside of the lines.
  512. */
  513. opacity: number;
  514. /**
  515. * Determine RBG output is premultiplied by alpha value.
  516. */
  517. preMultiplyAlpha: boolean;
  518. private _gridControl;
  519. private _renderId;
  520. /**
  521. * constructor
  522. * @param name The name given to the material in order to identify it afterwards.
  523. * @param scene The scene the material is used in.
  524. */
  525. constructor(name: string, scene: Scene);
  526. /**
  527. * Returns wehter or not the grid requires alpha blending.
  528. */
  529. needAlphaBlending(): boolean;
  530. needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
  531. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  532. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  533. dispose(forceDisposeEffect?: boolean): void;
  534. clone(name: string): GridMaterial;
  535. serialize(): any;
  536. getClassName(): string;
  537. static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
  538. }
  539. }
  540. declare module BABYLON {
  541. class CustomShaderStructure {
  542. FragmentStore: string;
  543. VertexStore: string;
  544. constructor();
  545. }
  546. class ShaderSpecialParts {
  547. constructor();
  548. Fragment_Begin: string;
  549. Fragment_Definitions: string;
  550. Fragment_MainBegin: string;
  551. Fragment_Custom_Diffuse: string;
  552. Fragment_Custom_Alpha: string;
  553. Fragment_Before_FragColor: string;
  554. Vertex_Begin: string;
  555. Vertex_Definitions: string;
  556. Vertex_MainBegin: string;
  557. Vertex_Before_PositionUpdated: string;
  558. Vertex_Before_NormalUpdated: string;
  559. }
  560. class CustomMaterial extends StandardMaterial {
  561. static ShaderIndexer: number;
  562. CustomParts: ShaderSpecialParts;
  563. _isCreatedShader: boolean;
  564. _createdShaderName: string;
  565. _customUniform: string[];
  566. _newUniforms: string[];
  567. _newUniformInstances: any[];
  568. _newSamplerInstances: Texture[];
  569. FragmentShader: string;
  570. VertexShader: string;
  571. AttachAfterBind(mesh: Mesh, effect: Effect): void;
  572. ReviewUniform(name: string, arr: string[]): string[];
  573. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines): string;
  574. constructor(name: string, scene: Scene);
  575. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  576. Fragment_Begin(shaderPart: string): CustomMaterial;
  577. Fragment_Definitions(shaderPart: string): CustomMaterial;
  578. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  579. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  580. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  581. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  582. Vertex_Begin(shaderPart: string): CustomMaterial;
  583. Vertex_Definitions(shaderPart: string): CustomMaterial;
  584. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  585. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  586. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  587. }
  588. }
  589. declare module BABYLON {
  590. class CellMaterial extends PushMaterial {
  591. private _diffuseTexture;
  592. diffuseTexture: BaseTexture;
  593. diffuseColor: Color3;
  594. _computeHighLevel: boolean;
  595. computeHighLevel: boolean;
  596. private _disableLighting;
  597. disableLighting: boolean;
  598. private _maxSimultaneousLights;
  599. maxSimultaneousLights: number;
  600. private _renderId;
  601. constructor(name: string, scene: Scene);
  602. needAlphaBlending(): boolean;
  603. needAlphaTesting(): boolean;
  604. getAlphaTestTexture(): Nullable<BaseTexture>;
  605. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  606. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  607. getAnimatables(): IAnimatable[];
  608. getActiveTextures(): BaseTexture[];
  609. hasTexture(texture: BaseTexture): boolean;
  610. dispose(forceDisposeEffect?: boolean): void;
  611. getClassName(): string;
  612. clone(name: string): CellMaterial;
  613. serialize(): any;
  614. static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
  615. }
  616. }