babylonjs.materials.d.ts 23 KB

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