babylonjs.materials.d.ts 23 KB

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