babylonjs.materials.d.ts 23 KB

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