babylonjs.materials.module.d.ts 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651
  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. * Gets a boolean indicating that current material needs to register RTT
  217. */
  218. readonly hasRenderTargetTextures: boolean;
  219. /**
  220. * Constructor
  221. */
  222. constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
  223. useLogarithmicDepth: boolean;
  224. readonly refractionTexture: Nullable<RenderTargetTexture>;
  225. readonly reflectionTexture: Nullable<RenderTargetTexture>;
  226. addToRenderList(node: any): void;
  227. enableRenderTargets(enable: boolean): void;
  228. getRenderList(): Nullable<AbstractMesh[]>;
  229. readonly renderTargetsEnabled: boolean;
  230. needAlphaBlending(): boolean;
  231. needAlphaTesting(): boolean;
  232. getAlphaTestTexture(): Nullable<BaseTexture>;
  233. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  234. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  235. private _createRenderTargets;
  236. getAnimatables(): IAnimatable[];
  237. getActiveTextures(): BaseTexture[];
  238. hasTexture(texture: BaseTexture): boolean;
  239. dispose(forceDisposeEffect?: boolean): void;
  240. clone(name: string): WaterMaterial;
  241. serialize(): any;
  242. getClassName(): string;
  243. static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
  244. static CreateDefaultMesh(name: string, scene: Scene): Mesh;
  245. }
  246. }
  247. declare module BABYLON {
  248. class FireMaterial extends PushMaterial {
  249. private _diffuseTexture;
  250. diffuseTexture: Nullable<BaseTexture>;
  251. private _distortionTexture;
  252. distortionTexture: Nullable<BaseTexture>;
  253. private _opacityTexture;
  254. opacityTexture: Nullable<BaseTexture>;
  255. diffuseColor: Color3;
  256. speed: number;
  257. private _scaledDiffuse;
  258. private _renderId;
  259. private _lastTime;
  260. constructor(name: string, scene: Scene);
  261. needAlphaBlending(): boolean;
  262. needAlphaTesting(): boolean;
  263. getAlphaTestTexture(): Nullable<BaseTexture>;
  264. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  265. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  266. getAnimatables(): IAnimatable[];
  267. getActiveTextures(): BaseTexture[];
  268. hasTexture(texture: BaseTexture): boolean;
  269. getClassName(): string;
  270. dispose(forceDisposeEffect?: boolean): void;
  271. clone(name: string): FireMaterial;
  272. serialize(): any;
  273. static Parse(source: any, scene: Scene, rootUrl: string): FireMaterial;
  274. }
  275. }
  276. declare module BABYLON {
  277. class FurMaterial extends PushMaterial {
  278. private _diffuseTexture;
  279. diffuseTexture: BaseTexture;
  280. private _heightTexture;
  281. heightTexture: BaseTexture;
  282. diffuseColor: Color3;
  283. furLength: number;
  284. furAngle: number;
  285. furColor: Color3;
  286. furOffset: number;
  287. furSpacing: number;
  288. furGravity: Vector3;
  289. furSpeed: number;
  290. furDensity: number;
  291. furOcclusion: number;
  292. furTexture: DynamicTexture;
  293. private _disableLighting;
  294. disableLighting: boolean;
  295. private _maxSimultaneousLights;
  296. maxSimultaneousLights: number;
  297. highLevelFur: boolean;
  298. _meshes: AbstractMesh[];
  299. private _renderId;
  300. private _furTime;
  301. constructor(name: string, scene: Scene);
  302. furTime: number;
  303. needAlphaBlending(): boolean;
  304. needAlphaTesting(): boolean;
  305. getAlphaTestTexture(): Nullable<BaseTexture>;
  306. updateFur(): void;
  307. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  308. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  309. getAnimatables(): IAnimatable[];
  310. getActiveTextures(): BaseTexture[];
  311. hasTexture(texture: BaseTexture): boolean;
  312. dispose(forceDisposeEffect?: boolean): void;
  313. clone(name: string): FurMaterial;
  314. serialize(): any;
  315. getClassName(): string;
  316. static Parse(source: any, scene: Scene, rootUrl: string): FurMaterial;
  317. static GenerateTexture(name: string, scene: Scene): DynamicTexture;
  318. static FurifyMesh(sourceMesh: Mesh, quality: number): Mesh[];
  319. }
  320. }
  321. declare module BABYLON {
  322. class TerrainMaterial extends PushMaterial {
  323. private _mixTexture;
  324. mixTexture: BaseTexture;
  325. private _diffuseTexture1;
  326. diffuseTexture1: Texture;
  327. private _diffuseTexture2;
  328. diffuseTexture2: Texture;
  329. private _diffuseTexture3;
  330. diffuseTexture3: Texture;
  331. private _bumpTexture1;
  332. bumpTexture1: Texture;
  333. private _bumpTexture2;
  334. bumpTexture2: Texture;
  335. private _bumpTexture3;
  336. bumpTexture3: Texture;
  337. diffuseColor: Color3;
  338. specularColor: Color3;
  339. specularPower: number;
  340. private _disableLighting;
  341. disableLighting: boolean;
  342. private _maxSimultaneousLights;
  343. maxSimultaneousLights: number;
  344. private _renderId;
  345. constructor(name: string, scene: Scene);
  346. needAlphaBlending(): boolean;
  347. needAlphaTesting(): boolean;
  348. getAlphaTestTexture(): Nullable<BaseTexture>;
  349. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  350. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  351. getAnimatables(): IAnimatable[];
  352. getActiveTextures(): BaseTexture[];
  353. hasTexture(texture: BaseTexture): boolean;
  354. dispose(forceDisposeEffect?: boolean): void;
  355. clone(name: string): TerrainMaterial;
  356. serialize(): any;
  357. getClassName(): string;
  358. static Parse(source: any, scene: Scene, rootUrl: string): TerrainMaterial;
  359. }
  360. }
  361. declare module BABYLON {
  362. class MixMaterial extends PushMaterial {
  363. /**
  364. * Mix textures
  365. */
  366. private _mixTexture1;
  367. mixTexture1: BaseTexture;
  368. private _mixTexture2;
  369. mixTexture2: BaseTexture;
  370. /**
  371. * Diffuse textures
  372. */
  373. private _diffuseTexture1;
  374. diffuseTexture1: Texture;
  375. private _diffuseTexture2;
  376. diffuseTexture2: Texture;
  377. private _diffuseTexture3;
  378. diffuseTexture3: Texture;
  379. private _diffuseTexture4;
  380. diffuseTexture4: Texture;
  381. private _diffuseTexture5;
  382. diffuseTexture5: Texture;
  383. private _diffuseTexture6;
  384. diffuseTexture6: Texture;
  385. private _diffuseTexture7;
  386. diffuseTexture7: Texture;
  387. private _diffuseTexture8;
  388. diffuseTexture8: Texture;
  389. /**
  390. * Uniforms
  391. */
  392. diffuseColor: Color3;
  393. specularColor: Color3;
  394. specularPower: number;
  395. private _disableLighting;
  396. disableLighting: boolean;
  397. private _maxSimultaneousLights;
  398. maxSimultaneousLights: number;
  399. private _renderId;
  400. constructor(name: string, scene: Scene);
  401. needAlphaBlending(): boolean;
  402. needAlphaTesting(): boolean;
  403. getAlphaTestTexture(): Nullable<BaseTexture>;
  404. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  405. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  406. getAnimatables(): IAnimatable[];
  407. getActiveTextures(): BaseTexture[];
  408. hasTexture(texture: BaseTexture): boolean;
  409. dispose(forceDisposeEffect?: boolean): void;
  410. clone(name: string): MixMaterial;
  411. serialize(): any;
  412. getClassName(): string;
  413. static Parse(source: any, scene: Scene, rootUrl: string): MixMaterial;
  414. }
  415. }
  416. declare module BABYLON {
  417. class TriPlanarMaterial extends PushMaterial {
  418. mixTexture: BaseTexture;
  419. private _diffuseTextureX;
  420. diffuseTextureX: BaseTexture;
  421. private _diffuseTextureY;
  422. diffuseTextureY: BaseTexture;
  423. private _diffuseTextureZ;
  424. diffuseTextureZ: BaseTexture;
  425. private _normalTextureX;
  426. normalTextureX: BaseTexture;
  427. private _normalTextureY;
  428. normalTextureY: BaseTexture;
  429. private _normalTextureZ;
  430. normalTextureZ: BaseTexture;
  431. tileSize: number;
  432. diffuseColor: Color3;
  433. specularColor: Color3;
  434. specularPower: number;
  435. private _disableLighting;
  436. disableLighting: boolean;
  437. private _maxSimultaneousLights;
  438. maxSimultaneousLights: number;
  439. private _renderId;
  440. constructor(name: string, scene: Scene);
  441. needAlphaBlending(): boolean;
  442. needAlphaTesting(): boolean;
  443. getAlphaTestTexture(): Nullable<BaseTexture>;
  444. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  445. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  446. getAnimatables(): IAnimatable[];
  447. getActiveTextures(): BaseTexture[];
  448. hasTexture(texture: BaseTexture): boolean;
  449. dispose(forceDisposeEffect?: boolean): void;
  450. clone(name: string): TriPlanarMaterial;
  451. serialize(): any;
  452. getClassName(): string;
  453. static Parse(source: any, scene: Scene, rootUrl: string): TriPlanarMaterial;
  454. }
  455. }
  456. declare module BABYLON {
  457. class SkyMaterial extends PushMaterial {
  458. luminance: number;
  459. turbidity: number;
  460. rayleigh: number;
  461. mieCoefficient: number;
  462. mieDirectionalG: number;
  463. distance: number;
  464. inclination: number;
  465. azimuth: number;
  466. sunPosition: Vector3;
  467. useSunPosition: boolean;
  468. private _cameraPosition;
  469. private _renderId;
  470. constructor(name: string, scene: Scene);
  471. needAlphaBlending(): boolean;
  472. needAlphaTesting(): boolean;
  473. getAlphaTestTexture(): Nullable<BaseTexture>;
  474. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  475. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  476. getAnimatables(): IAnimatable[];
  477. dispose(forceDisposeEffect?: boolean): void;
  478. clone(name: string): SkyMaterial;
  479. serialize(): any;
  480. getClassName(): string;
  481. static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
  482. }
  483. }
  484. declare module BABYLON {
  485. /**
  486. * The grid materials allows you to wrap any shape with a grid.
  487. * Colors are customizable.
  488. */
  489. class GridMaterial extends BABYLON.PushMaterial {
  490. /**
  491. * Main color of the grid (e.g. between lines)
  492. */
  493. mainColor: Color3;
  494. /**
  495. * Color of the grid lines.
  496. */
  497. lineColor: Color3;
  498. /**
  499. * The scale of the grid compared to unit.
  500. */
  501. gridRatio: number;
  502. /**
  503. * Allows setting an offset for the grid lines.
  504. */
  505. gridOffset: Vector3;
  506. /**
  507. * The frequency of thicker lines.
  508. */
  509. majorUnitFrequency: number;
  510. /**
  511. * The visibility of minor units in the grid.
  512. */
  513. minorUnitVisibility: number;
  514. /**
  515. * The grid opacity outside of the lines.
  516. */
  517. opacity: number;
  518. /**
  519. * Determine RBG output is premultiplied by alpha value.
  520. */
  521. preMultiplyAlpha: boolean;
  522. private _gridControl;
  523. private _renderId;
  524. /**
  525. * constructor
  526. * @param name The name given to the material in order to identify it afterwards.
  527. * @param scene The scene the material is used in.
  528. */
  529. constructor(name: string, scene: Scene);
  530. /**
  531. * Returns wehter or not the grid requires alpha blending.
  532. */
  533. needAlphaBlending(): boolean;
  534. needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
  535. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  536. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  537. dispose(forceDisposeEffect?: boolean): void;
  538. clone(name: string): GridMaterial;
  539. serialize(): any;
  540. getClassName(): string;
  541. static Parse(source: any, scene: Scene, rootUrl: string): GridMaterial;
  542. }
  543. }
  544. declare module BABYLON {
  545. class CustomShaderStructure {
  546. FragmentStore: string;
  547. VertexStore: string;
  548. constructor();
  549. }
  550. class ShaderSpecialParts {
  551. constructor();
  552. Fragment_Begin: string;
  553. Fragment_Definitions: string;
  554. Fragment_MainBegin: string;
  555. Fragment_Custom_Diffuse: string;
  556. Fragment_Custom_Alpha: string;
  557. Fragment_Before_FragColor: string;
  558. Vertex_Begin: string;
  559. Vertex_Definitions: string;
  560. Vertex_MainBegin: string;
  561. Vertex_Before_PositionUpdated: string;
  562. Vertex_Before_NormalUpdated: string;
  563. }
  564. class CustomMaterial extends StandardMaterial {
  565. static ShaderIndexer: number;
  566. CustomParts: ShaderSpecialParts;
  567. _isCreatedShader: boolean;
  568. _createdShaderName: string;
  569. _customUniform: string[];
  570. _newUniforms: string[];
  571. _newUniformInstances: any[];
  572. _newSamplerInstances: Texture[];
  573. FragmentShader: string;
  574. VertexShader: string;
  575. AttachAfterBind(mesh: Mesh, effect: Effect): void;
  576. ReviewUniform(name: string, arr: string[]): string[];
  577. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines): string;
  578. constructor(name: string, scene: Scene);
  579. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  580. Fragment_Begin(shaderPart: string): CustomMaterial;
  581. Fragment_Definitions(shaderPart: string): CustomMaterial;
  582. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  583. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  584. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  585. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  586. Vertex_Begin(shaderPart: string): CustomMaterial;
  587. Vertex_Definitions(shaderPart: string): CustomMaterial;
  588. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  589. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  590. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  591. }
  592. }
  593. declare module BABYLON {
  594. class CellMaterial extends PushMaterial {
  595. private _diffuseTexture;
  596. diffuseTexture: BaseTexture;
  597. diffuseColor: Color3;
  598. _computeHighLevel: boolean;
  599. computeHighLevel: boolean;
  600. private _disableLighting;
  601. disableLighting: boolean;
  602. private _maxSimultaneousLights;
  603. maxSimultaneousLights: number;
  604. private _renderId;
  605. constructor(name: string, scene: Scene);
  606. needAlphaBlending(): boolean;
  607. needAlphaTesting(): boolean;
  608. getAlphaTestTexture(): Nullable<BaseTexture>;
  609. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  610. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  611. getAnimatables(): IAnimatable[];
  612. getActiveTextures(): BaseTexture[];
  613. hasTexture(texture: BaseTexture): boolean;
  614. dispose(forceDisposeEffect?: boolean): void;
  615. getClassName(): string;
  616. clone(name: string): CellMaterial;
  617. serialize(): any;
  618. static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
  619. }
  620. }