babylonjs.materials.module.d.ts 106 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516
  1. declare module "babylonjs-materials/cell/cell.fragment" {
  2. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  3. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  4. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  5. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  6. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  7. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  8. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  9. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  10. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  11. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  12. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  13. /** @hidden */
  14. export var cellPixelShader: {
  15. name: string;
  16. shader: string;
  17. };
  18. }
  19. declare module "babylonjs-materials/cell/cell.vertex" {
  20. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  21. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  22. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  23. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  24. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  25. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  26. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  27. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  28. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  29. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  30. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  31. /** @hidden */
  32. export var cellVertexShader: {
  33. name: string;
  34. shader: string;
  35. };
  36. }
  37. declare module "babylonjs-materials/cell/cellMaterial" {
  38. import { Nullable } from "babylonjs/types";
  39. import { Color3, Matrix } from "babylonjs/Maths/math";
  40. import { IAnimatable } from "babylonjs/Misc/tools";
  41. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  42. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  43. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  44. import { SubMesh } from "babylonjs/Meshes/subMesh";
  45. import { Mesh } from "babylonjs/Meshes/mesh";
  46. import { Scene } from "babylonjs/scene";
  47. import "babylonjs-materials/cell/cell.fragment";
  48. import "babylonjs-materials/cell/cell.vertex";
  49. export class CellMaterial extends PushMaterial {
  50. private _diffuseTexture;
  51. diffuseTexture: BaseTexture;
  52. diffuseColor: Color3;
  53. _computeHighLevel: boolean;
  54. computeHighLevel: boolean;
  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. getClassName(): string;
  71. clone(name: string): CellMaterial;
  72. serialize(): any;
  73. static Parse(source: any, scene: Scene, rootUrl: string): CellMaterial;
  74. }
  75. }
  76. declare module "babylonjs-materials/cell/index" {
  77. export * from "babylonjs-materials/cell/cellMaterial";
  78. }
  79. declare module "babylonjs-materials/custom/customMaterial" {
  80. import { Texture } from "babylonjs/Materials/Textures/texture";
  81. import { Effect } from "babylonjs/Materials/effect";
  82. import { StandardMaterialDefines } from "babylonjs/Materials/standardMaterial";
  83. import { StandardMaterial } from "babylonjs/Materials/standardMaterial";
  84. import { Mesh } from "babylonjs/Meshes/mesh";
  85. import { Scene } from "babylonjs/scene";
  86. export class CustomShaderStructure {
  87. FragmentStore: string;
  88. VertexStore: string;
  89. constructor();
  90. }
  91. export class ShaderSpecialParts {
  92. constructor();
  93. Fragment_Begin: string;
  94. Fragment_Definitions: string;
  95. Fragment_MainBegin: string;
  96. Fragment_Custom_Diffuse: string;
  97. Fragment_Before_Lights: string;
  98. Fragment_Before_Fog: string;
  99. Fragment_Custom_Alpha: string;
  100. Fragment_Before_FragColor: string;
  101. Vertex_Begin: string;
  102. Vertex_Definitions: string;
  103. Vertex_MainBegin: string;
  104. Vertex_Before_PositionUpdated: string;
  105. Vertex_Before_NormalUpdated: string;
  106. Vertex_MainEnd: string;
  107. }
  108. export class CustomMaterial extends StandardMaterial {
  109. static ShaderIndexer: number;
  110. CustomParts: ShaderSpecialParts;
  111. _isCreatedShader: boolean;
  112. _createdShaderName: string;
  113. _customUniform: string[];
  114. _newUniforms: string[];
  115. _newUniformInstances: any[];
  116. _newSamplerInstances: Texture[];
  117. FragmentShader: string;
  118. VertexShader: string;
  119. AttachAfterBind(mesh: Mesh, effect: Effect): void;
  120. ReviewUniform(name: string, arr: string[]): string[];
  121. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: StandardMaterialDefines): string;
  122. constructor(name: string, scene: Scene);
  123. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  124. Fragment_Begin(shaderPart: string): CustomMaterial;
  125. Fragment_Definitions(shaderPart: string): CustomMaterial;
  126. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  127. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  128. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  129. Fragment_Before_Lights(shaderPart: string): CustomMaterial;
  130. Fragment_Before_Fog(shaderPart: string): CustomMaterial;
  131. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  132. Vertex_Begin(shaderPart: string): CustomMaterial;
  133. Vertex_Definitions(shaderPart: string): CustomMaterial;
  134. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  135. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  136. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  137. Vertex_MainEnd(shaderPart: string): CustomMaterial;
  138. }
  139. }
  140. declare module "babylonjs-materials/custom/pbrCustomMaterial" {
  141. import { Texture } from "babylonjs/Materials/Textures/texture";
  142. import { Effect } from "babylonjs/Materials/effect";
  143. import { PBRMaterialDefines } from "babylonjs/Materials/PBR/pbrBaseMaterial";
  144. import { PBRMaterial } from "babylonjs/Materials/PBR/pbrMaterial";
  145. import { Mesh } from "babylonjs/Meshes/mesh";
  146. import { Scene } from "babylonjs/scene";
  147. export class ShaderAlebdoParts {
  148. constructor();
  149. Fragment_Begin: string;
  150. Fragment_Definitions: string;
  151. Fragment_MainBegin: string;
  152. Fragment_Custom_Albedo: string;
  153. Fragment_Before_Lights: string;
  154. Fragment_Before_Fog: string;
  155. Fragment_Custom_Alpha: string;
  156. Fragment_Before_FragColor: string;
  157. Vertex_Begin: string;
  158. Vertex_Definitions: string;
  159. Vertex_MainBegin: string;
  160. Vertex_Before_PositionUpdated: string;
  161. Vertex_Before_NormalUpdated: string;
  162. Vertex_MainEnd: string;
  163. }
  164. export class PBRCustomMaterial extends PBRMaterial {
  165. static ShaderIndexer: number;
  166. CustomParts: ShaderAlebdoParts;
  167. _isCreatedShader: boolean;
  168. _createdShaderName: string;
  169. _customUniform: string[];
  170. _newUniforms: string[];
  171. _newUniformInstances: any[];
  172. _newSamplerInstances: Texture[];
  173. FragmentShader: string;
  174. VertexShader: string;
  175. AttachAfterBind(mesh: Mesh, effect: Effect): void;
  176. ReviewUniform(name: string, arr: string[]): string[];
  177. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: PBRMaterialDefines): string;
  178. constructor(name: string, scene: Scene);
  179. AddUniform(name: string, kind: string, param: any): PBRCustomMaterial;
  180. Fragment_Begin(shaderPart: string): PBRCustomMaterial;
  181. Fragment_Definitions(shaderPart: string): PBRCustomMaterial;
  182. Fragment_MainBegin(shaderPart: string): PBRCustomMaterial;
  183. Fragment_Custom_Albedo(shaderPart: string): PBRCustomMaterial;
  184. Fragment_Custom_Alpha(shaderPart: string): PBRCustomMaterial;
  185. Fragment_Before_Lights(shaderPart: string): PBRCustomMaterial;
  186. Fragment_Before_Fog(shaderPart: string): PBRCustomMaterial;
  187. Fragment_Before_FragColor(shaderPart: string): PBRCustomMaterial;
  188. Vertex_Begin(shaderPart: string): PBRCustomMaterial;
  189. Vertex_Definitions(shaderPart: string): PBRCustomMaterial;
  190. Vertex_MainBegin(shaderPart: string): PBRCustomMaterial;
  191. Vertex_Before_PositionUpdated(shaderPart: string): PBRCustomMaterial;
  192. Vertex_Before_NormalUpdated(shaderPart: string): PBRCustomMaterial;
  193. Vertex_MainEnd(shaderPart: string): PBRCustomMaterial;
  194. }
  195. }
  196. declare module "babylonjs-materials/custom/index" {
  197. export * from "babylonjs-materials/custom/customMaterial";
  198. export * from "babylonjs-materials/custom/pbrCustomMaterial";
  199. }
  200. declare module "babylonjs-materials/fire/fire.fragment" {
  201. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  202. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  203. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  204. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  205. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  206. /** @hidden */
  207. export var firePixelShader: {
  208. name: string;
  209. shader: string;
  210. };
  211. }
  212. declare module "babylonjs-materials/fire/fire.vertex" {
  213. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  214. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  215. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  216. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  217. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  218. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  219. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  220. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  221. /** @hidden */
  222. export var fireVertexShader: {
  223. name: string;
  224. shader: string;
  225. };
  226. }
  227. declare module "babylonjs-materials/fire/fireMaterial" {
  228. import { Nullable } from "babylonjs/types";
  229. import { Color3, Matrix } from "babylonjs/Maths/math";
  230. import { IAnimatable } from "babylonjs/Misc/tools";
  231. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  232. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  233. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  234. import { SubMesh } from "babylonjs/Meshes/subMesh";
  235. import { Mesh } from "babylonjs/Meshes/mesh";
  236. import { Scene } from "babylonjs/scene";
  237. import "babylonjs-materials/fire/fire.fragment";
  238. import "babylonjs-materials/fire/fire.vertex";
  239. export class FireMaterial extends PushMaterial {
  240. private _diffuseTexture;
  241. diffuseTexture: Nullable<BaseTexture>;
  242. private _distortionTexture;
  243. distortionTexture: Nullable<BaseTexture>;
  244. private _opacityTexture;
  245. opacityTexture: Nullable<BaseTexture>;
  246. diffuseColor: Color3;
  247. speed: number;
  248. private _scaledDiffuse;
  249. private _renderId;
  250. private _lastTime;
  251. constructor(name: string, scene: Scene);
  252. needAlphaBlending(): boolean;
  253. needAlphaTesting(): boolean;
  254. getAlphaTestTexture(): Nullable<BaseTexture>;
  255. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  256. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  257. getAnimatables(): IAnimatable[];
  258. getActiveTextures(): BaseTexture[];
  259. hasTexture(texture: BaseTexture): boolean;
  260. getClassName(): string;
  261. dispose(forceDisposeEffect?: boolean): void;
  262. clone(name: string): FireMaterial;
  263. serialize(): any;
  264. static Parse(source: any, scene: Scene, rootUrl: string): FireMaterial;
  265. }
  266. }
  267. declare module "babylonjs-materials/fire/index" {
  268. export * from "babylonjs-materials/fire/fireMaterial";
  269. }
  270. declare module "babylonjs-materials/fur/fur.fragment" {
  271. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  272. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  273. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  274. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  275. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  276. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  277. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  278. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  279. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  280. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  281. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  282. /** @hidden */
  283. export var furPixelShader: {
  284. name: string;
  285. shader: string;
  286. };
  287. }
  288. declare module "babylonjs-materials/fur/fur.vertex" {
  289. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  290. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  291. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  292. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  293. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  294. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  295. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  296. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  297. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  298. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  299. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  300. /** @hidden */
  301. export var furVertexShader: {
  302. name: string;
  303. shader: string;
  304. };
  305. }
  306. declare module "babylonjs-materials/fur/furMaterial" {
  307. import { Nullable } from "babylonjs/types";
  308. import { Vector3, Color3, Matrix } from "babylonjs/Maths/math";
  309. import { IAnimatable } from "babylonjs/Misc/tools";
  310. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  311. import { DynamicTexture } from "babylonjs/Materials/Textures/dynamicTexture";
  312. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  313. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  314. import { SubMesh } from "babylonjs/Meshes/subMesh";
  315. import { Mesh } from "babylonjs/Meshes/mesh";
  316. import { Scene } from "babylonjs/scene";
  317. import "babylonjs-materials/fur/fur.fragment";
  318. import "babylonjs-materials/fur/fur.vertex";
  319. export class FurMaterial extends PushMaterial {
  320. private _diffuseTexture;
  321. diffuseTexture: BaseTexture;
  322. private _heightTexture;
  323. heightTexture: BaseTexture;
  324. diffuseColor: Color3;
  325. furLength: number;
  326. furAngle: number;
  327. furColor: Color3;
  328. furOffset: number;
  329. furSpacing: number;
  330. furGravity: Vector3;
  331. furSpeed: number;
  332. furDensity: number;
  333. furOcclusion: number;
  334. furTexture: DynamicTexture;
  335. private _disableLighting;
  336. disableLighting: boolean;
  337. private _maxSimultaneousLights;
  338. maxSimultaneousLights: number;
  339. highLevelFur: boolean;
  340. _meshes: AbstractMesh[];
  341. private _renderId;
  342. private _furTime;
  343. constructor(name: string, scene: Scene);
  344. furTime: number;
  345. needAlphaBlending(): boolean;
  346. needAlphaTesting(): boolean;
  347. getAlphaTestTexture(): Nullable<BaseTexture>;
  348. updateFur(): void;
  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): FurMaterial;
  356. serialize(): any;
  357. getClassName(): string;
  358. static Parse(source: any, scene: Scene, rootUrl: string): FurMaterial;
  359. static GenerateTexture(name: string, scene: Scene): DynamicTexture;
  360. static FurifyMesh(sourceMesh: Mesh, quality: number): Mesh[];
  361. }
  362. }
  363. declare module "babylonjs-materials/fur/index" {
  364. export * from "babylonjs-materials/fur/furMaterial";
  365. }
  366. declare module "babylonjs-materials/gradient/gradient.fragment" {
  367. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  368. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  369. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  370. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  371. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  372. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  373. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  374. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  375. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  376. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  377. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  378. /** @hidden */
  379. export var gradientPixelShader: {
  380. name: string;
  381. shader: string;
  382. };
  383. }
  384. declare module "babylonjs-materials/gradient/gradient.vertex" {
  385. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  386. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  387. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  388. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  389. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  390. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  391. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  392. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  393. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  394. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  395. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  396. /** @hidden */
  397. export var gradientVertexShader: {
  398. name: string;
  399. shader: string;
  400. };
  401. }
  402. declare module "babylonjs-materials/gradient/gradientMaterial" {
  403. import { Nullable } from "babylonjs/types";
  404. import { Color3, Matrix } from "babylonjs/Maths/math";
  405. import { IAnimatable } from "babylonjs/Misc/tools";
  406. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  407. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  408. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  409. import { SubMesh } from "babylonjs/Meshes/subMesh";
  410. import { Mesh } from "babylonjs/Meshes/mesh";
  411. import { Scene } from "babylonjs/scene";
  412. import "babylonjs-materials/gradient/gradient.fragment";
  413. import "babylonjs-materials/gradient/gradient.vertex";
  414. export class GradientMaterial extends PushMaterial {
  415. private _maxSimultaneousLights;
  416. maxSimultaneousLights: number;
  417. topColor: Color3;
  418. topColorAlpha: number;
  419. bottomColor: Color3;
  420. bottomColorAlpha: number;
  421. offset: number;
  422. scale: number;
  423. smoothness: number;
  424. private _disableLighting;
  425. disableLighting: boolean;
  426. private _renderId;
  427. constructor(name: string, scene: Scene);
  428. needAlphaBlending(): boolean;
  429. needAlphaTesting(): boolean;
  430. getAlphaTestTexture(): Nullable<BaseTexture>;
  431. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  432. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  433. getAnimatables(): IAnimatable[];
  434. dispose(forceDisposeEffect?: boolean): void;
  435. clone(name: string): GradientMaterial;
  436. serialize(): any;
  437. getClassName(): string;
  438. static Parse(source: any, scene: Scene, rootUrl: string): GradientMaterial;
  439. }
  440. }
  441. declare module "babylonjs-materials/gradient/index" {
  442. export * from "babylonjs-materials/gradient/gradientMaterial";
  443. }
  444. declare module "babylonjs-materials/grid/grid.fragment" {
  445. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  446. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  447. /** @hidden */
  448. export var gridPixelShader: {
  449. name: string;
  450. shader: string;
  451. };
  452. }
  453. declare module "babylonjs-materials/grid/grid.vertex" {
  454. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  455. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  456. /** @hidden */
  457. export var gridVertexShader: {
  458. name: string;
  459. shader: string;
  460. };
  461. }
  462. declare module "babylonjs-materials/grid/gridMaterial" {
  463. import { Color3, Vector3, Matrix } from "babylonjs/Maths/math";
  464. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  465. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  466. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  467. import { SubMesh } from "babylonjs/Meshes/subMesh";
  468. import { Mesh } from "babylonjs/Meshes/mesh";
  469. import { Scene } from "babylonjs/scene";
  470. import "babylonjs-materials/grid/grid.fragment";
  471. import "babylonjs-materials/grid/grid.vertex";
  472. /**
  473. * The grid materials allows you to wrap any shape with a grid.
  474. * Colors are customizable.
  475. */
  476. export class GridMaterial extends PushMaterial {
  477. /**
  478. * Main color of the grid (e.g. between lines)
  479. */
  480. mainColor: Color3;
  481. /**
  482. * Color of the grid lines.
  483. */
  484. lineColor: Color3;
  485. /**
  486. * The scale of the grid compared to unit.
  487. */
  488. gridRatio: number;
  489. /**
  490. * Allows setting an offset for the grid lines.
  491. */
  492. gridOffset: Vector3;
  493. /**
  494. * The frequency of thicker lines.
  495. */
  496. majorUnitFrequency: number;
  497. /**
  498. * The visibility of minor units in the grid.
  499. */
  500. minorUnitVisibility: number;
  501. /**
  502. * The grid opacity outside of the lines.
  503. */
  504. opacity: number;
  505. /**
  506. * Determine RBG output is premultiplied by alpha value.
  507. */
  508. preMultiplyAlpha: boolean;
  509. private _opacityTexture;
  510. opacityTexture: BaseTexture;
  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. /**
  527. * Dispose the material and its associated resources.
  528. * @param forceDisposeEffect will also dispose the used effect when true
  529. */
  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 "babylonjs-materials/grid/index" {
  538. export * from "babylonjs-materials/grid/gridMaterial";
  539. }
  540. declare module "babylonjs-materials/lava/lava.fragment" {
  541. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  542. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  543. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  544. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  545. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  546. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  547. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  548. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  549. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  550. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  551. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  552. /** @hidden */
  553. export var lavaPixelShader: {
  554. name: string;
  555. shader: string;
  556. };
  557. }
  558. declare module "babylonjs-materials/lava/lava.vertex" {
  559. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  560. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  561. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  562. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  563. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  564. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  565. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  566. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  567. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  568. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  569. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  570. /** @hidden */
  571. export var lavaVertexShader: {
  572. name: string;
  573. shader: string;
  574. };
  575. }
  576. declare module "babylonjs-materials/lava/lavaMaterial" {
  577. import { Nullable } from "babylonjs/types";
  578. import { Color3, Matrix } from "babylonjs/Maths/math";
  579. import { IAnimatable } from "babylonjs/Misc/tools";
  580. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  581. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  582. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  583. import { SubMesh } from "babylonjs/Meshes/subMesh";
  584. import { Mesh } from "babylonjs/Meshes/mesh";
  585. import { Scene } from "babylonjs/scene";
  586. import "babylonjs-materials/lava/lava.fragment";
  587. import "babylonjs-materials/lava/lava.vertex";
  588. export class LavaMaterial extends PushMaterial {
  589. private _diffuseTexture;
  590. diffuseTexture: BaseTexture;
  591. noiseTexture: BaseTexture;
  592. fogColor: Color3;
  593. speed: number;
  594. movingSpeed: number;
  595. lowFrequencySpeed: number;
  596. fogDensity: number;
  597. private _lastTime;
  598. diffuseColor: Color3;
  599. private _disableLighting;
  600. disableLighting: boolean;
  601. private _unlit;
  602. unlit: boolean;
  603. private _maxSimultaneousLights;
  604. maxSimultaneousLights: number;
  605. private _scaledDiffuse;
  606. private _renderId;
  607. constructor(name: string, scene: Scene);
  608. needAlphaBlending(): boolean;
  609. needAlphaTesting(): boolean;
  610. getAlphaTestTexture(): Nullable<BaseTexture>;
  611. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  612. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  613. getAnimatables(): IAnimatable[];
  614. getActiveTextures(): BaseTexture[];
  615. hasTexture(texture: BaseTexture): boolean;
  616. dispose(forceDisposeEffect?: boolean): void;
  617. clone(name: string): LavaMaterial;
  618. serialize(): any;
  619. getClassName(): string;
  620. static Parse(source: any, scene: Scene, rootUrl: string): LavaMaterial;
  621. }
  622. }
  623. declare module "babylonjs-materials/lava/index" {
  624. export * from "babylonjs-materials/lava/lavaMaterial";
  625. }
  626. declare module "babylonjs-materials/mix/mix.fragment" {
  627. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  628. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  629. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  630. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  631. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  632. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  633. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  634. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  635. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  636. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  637. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  638. /** @hidden */
  639. export var mixPixelShader: {
  640. name: string;
  641. shader: string;
  642. };
  643. }
  644. declare module "babylonjs-materials/mix/mix.vertex" {
  645. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  646. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  647. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  648. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  649. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  650. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  651. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  652. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  653. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  654. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  655. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  656. /** @hidden */
  657. export var mixVertexShader: {
  658. name: string;
  659. shader: string;
  660. };
  661. }
  662. declare module "babylonjs-materials/mix/mixMaterial" {
  663. import { Nullable } from "babylonjs/types";
  664. import { Color3, Matrix } from "babylonjs/Maths/math";
  665. import { IAnimatable } from "babylonjs/Misc/tools";
  666. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  667. import { Texture } from "babylonjs/Materials/Textures/texture";
  668. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  669. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  670. import { SubMesh } from "babylonjs/Meshes/subMesh";
  671. import { Mesh } from "babylonjs/Meshes/mesh";
  672. import { Scene } from "babylonjs/scene";
  673. import "babylonjs-materials/mix/mix.fragment";
  674. import "babylonjs-materials/mix/mix.vertex";
  675. export class MixMaterial extends PushMaterial {
  676. /**
  677. * Mix textures
  678. */
  679. private _mixTexture1;
  680. mixTexture1: BaseTexture;
  681. private _mixTexture2;
  682. mixTexture2: BaseTexture;
  683. /**
  684. * Diffuse textures
  685. */
  686. private _diffuseTexture1;
  687. diffuseTexture1: Texture;
  688. private _diffuseTexture2;
  689. diffuseTexture2: Texture;
  690. private _diffuseTexture3;
  691. diffuseTexture3: Texture;
  692. private _diffuseTexture4;
  693. diffuseTexture4: Texture;
  694. private _diffuseTexture5;
  695. diffuseTexture5: Texture;
  696. private _diffuseTexture6;
  697. diffuseTexture6: Texture;
  698. private _diffuseTexture7;
  699. diffuseTexture7: Texture;
  700. private _diffuseTexture8;
  701. diffuseTexture8: Texture;
  702. /**
  703. * Uniforms
  704. */
  705. diffuseColor: Color3;
  706. specularColor: Color3;
  707. specularPower: number;
  708. private _disableLighting;
  709. disableLighting: boolean;
  710. private _maxSimultaneousLights;
  711. maxSimultaneousLights: number;
  712. private _renderId;
  713. constructor(name: string, scene: Scene);
  714. needAlphaBlending(): boolean;
  715. needAlphaTesting(): boolean;
  716. getAlphaTestTexture(): Nullable<BaseTexture>;
  717. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  718. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  719. getAnimatables(): IAnimatable[];
  720. getActiveTextures(): BaseTexture[];
  721. hasTexture(texture: BaseTexture): boolean;
  722. dispose(forceDisposeEffect?: boolean): void;
  723. clone(name: string): MixMaterial;
  724. serialize(): any;
  725. getClassName(): string;
  726. static Parse(source: any, scene: Scene, rootUrl: string): MixMaterial;
  727. }
  728. }
  729. declare module "babylonjs-materials/mix/index" {
  730. export * from "babylonjs-materials/mix/mixMaterial";
  731. }
  732. declare module "babylonjs-materials/normal/normal.fragment" {
  733. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  734. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  735. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  736. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  737. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  738. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  739. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  740. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  741. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  742. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  743. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  744. /** @hidden */
  745. export var normalPixelShader: {
  746. name: string;
  747. shader: string;
  748. };
  749. }
  750. declare module "babylonjs-materials/normal/normal.vertex" {
  751. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  752. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  753. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  754. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  755. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  756. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  757. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  758. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  759. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  760. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  761. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  762. /** @hidden */
  763. export var normalVertexShader: {
  764. name: string;
  765. shader: string;
  766. };
  767. }
  768. declare module "babylonjs-materials/normal/normalMaterial" {
  769. import { Nullable } from "babylonjs/types";
  770. import { Color3, Matrix } from "babylonjs/Maths/math";
  771. import { IAnimatable } from "babylonjs/Misc/tools";
  772. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  773. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  774. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  775. import { SubMesh } from "babylonjs/Meshes/subMesh";
  776. import { Mesh } from "babylonjs/Meshes/mesh";
  777. import { Scene } from "babylonjs/scene";
  778. import "babylonjs-materials/normal/normal.fragment";
  779. import "babylonjs-materials/normal/normal.vertex";
  780. export class NormalMaterial extends PushMaterial {
  781. private _diffuseTexture;
  782. diffuseTexture: BaseTexture;
  783. diffuseColor: Color3;
  784. private _disableLighting;
  785. disableLighting: boolean;
  786. private _maxSimultaneousLights;
  787. maxSimultaneousLights: number;
  788. private _renderId;
  789. constructor(name: string, scene: Scene);
  790. needAlphaBlending(): boolean;
  791. needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
  792. needAlphaTesting(): boolean;
  793. getAlphaTestTexture(): Nullable<BaseTexture>;
  794. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  795. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  796. getAnimatables(): IAnimatable[];
  797. getActiveTextures(): BaseTexture[];
  798. hasTexture(texture: BaseTexture): boolean;
  799. dispose(forceDisposeEffect?: boolean): void;
  800. clone(name: string): NormalMaterial;
  801. serialize(): any;
  802. getClassName(): string;
  803. static Parse(source: any, scene: Scene, rootUrl: string): NormalMaterial;
  804. }
  805. }
  806. declare module "babylonjs-materials/normal/index" {
  807. export * from "babylonjs-materials/normal/normalMaterial";
  808. }
  809. declare module "babylonjs-materials/shadowOnly/shadowOnly.fragment" {
  810. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  811. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  812. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  813. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  814. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  815. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  816. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  817. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  818. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  819. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  820. /** @hidden */
  821. export var shadowOnlyPixelShader: {
  822. name: string;
  823. shader: string;
  824. };
  825. }
  826. declare module "babylonjs-materials/shadowOnly/shadowOnly.vertex" {
  827. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  828. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  829. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  830. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  831. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  832. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  833. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  834. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  835. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  836. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  837. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  838. /** @hidden */
  839. export var shadowOnlyVertexShader: {
  840. name: string;
  841. shader: string;
  842. };
  843. }
  844. declare module "babylonjs-materials/shadowOnly/shadowOnlyMaterial" {
  845. import { Nullable } from "babylonjs/types";
  846. import { Color3, Matrix } from "babylonjs/Maths/math";
  847. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  848. import { IShadowLight } from "babylonjs/Lights/shadowLight";
  849. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  850. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  851. import { SubMesh } from "babylonjs/Meshes/subMesh";
  852. import { Mesh } from "babylonjs/Meshes/mesh";
  853. import { Scene } from "babylonjs/scene";
  854. import "babylonjs-materials/shadowOnly/shadowOnly.fragment";
  855. import "babylonjs-materials/shadowOnly/shadowOnly.vertex";
  856. export class ShadowOnlyMaterial extends PushMaterial {
  857. private _renderId;
  858. private _activeLight;
  859. constructor(name: string, scene: Scene);
  860. shadowColor: Color3;
  861. needAlphaBlending(): boolean;
  862. needAlphaTesting(): boolean;
  863. getAlphaTestTexture(): Nullable<BaseTexture>;
  864. activeLight: IShadowLight;
  865. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  866. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  867. clone(name: string): ShadowOnlyMaterial;
  868. serialize(): any;
  869. getClassName(): string;
  870. static Parse(source: any, scene: Scene, rootUrl: string): ShadowOnlyMaterial;
  871. }
  872. }
  873. declare module "babylonjs-materials/shadowOnly/index" {
  874. export * from "babylonjs-materials/shadowOnly/shadowOnlyMaterial";
  875. }
  876. declare module "babylonjs-materials/simple/simple.fragment" {
  877. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  878. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  879. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  880. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  881. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  882. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  883. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  884. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  885. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  886. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  887. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  888. /** @hidden */
  889. export var simplePixelShader: {
  890. name: string;
  891. shader: string;
  892. };
  893. }
  894. declare module "babylonjs-materials/simple/simple.vertex" {
  895. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  896. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  897. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  898. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  899. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  900. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  901. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  902. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  903. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  904. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  905. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  906. /** @hidden */
  907. export var simpleVertexShader: {
  908. name: string;
  909. shader: string;
  910. };
  911. }
  912. declare module "babylonjs-materials/simple/simpleMaterial" {
  913. import { Nullable } from "babylonjs/types";
  914. import { Color3, Matrix } from "babylonjs/Maths/math";
  915. import { IAnimatable } from "babylonjs/Misc/tools";
  916. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  917. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  918. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  919. import { SubMesh } from "babylonjs/Meshes/subMesh";
  920. import { Mesh } from "babylonjs/Meshes/mesh";
  921. import { Scene } from "babylonjs/scene";
  922. import "babylonjs-materials/simple/simple.fragment";
  923. import "babylonjs-materials/simple/simple.vertex";
  924. export class SimpleMaterial extends PushMaterial {
  925. private _diffuseTexture;
  926. diffuseTexture: BaseTexture;
  927. diffuseColor: Color3;
  928. private _disableLighting;
  929. disableLighting: boolean;
  930. private _maxSimultaneousLights;
  931. maxSimultaneousLights: number;
  932. private _renderId;
  933. constructor(name: string, scene: Scene);
  934. needAlphaBlending(): boolean;
  935. needAlphaTesting(): boolean;
  936. getAlphaTestTexture(): Nullable<BaseTexture>;
  937. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  938. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  939. getAnimatables(): IAnimatable[];
  940. getActiveTextures(): BaseTexture[];
  941. hasTexture(texture: BaseTexture): boolean;
  942. dispose(forceDisposeEffect?: boolean): void;
  943. clone(name: string): SimpleMaterial;
  944. serialize(): any;
  945. getClassName(): string;
  946. static Parse(source: any, scene: Scene, rootUrl: string): SimpleMaterial;
  947. }
  948. }
  949. declare module "babylonjs-materials/simple/index" {
  950. export * from "babylonjs-materials/simple/simpleMaterial";
  951. }
  952. declare module "babylonjs-materials/sky/sky.fragment" {
  953. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  954. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  955. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  956. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  957. /** @hidden */
  958. export var skyPixelShader: {
  959. name: string;
  960. shader: string;
  961. };
  962. }
  963. declare module "babylonjs-materials/sky/sky.vertex" {
  964. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  965. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  966. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  967. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  968. /** @hidden */
  969. export var skyVertexShader: {
  970. name: string;
  971. shader: string;
  972. };
  973. }
  974. declare module "babylonjs-materials/sky/skyMaterial" {
  975. import { Nullable } from "babylonjs/types";
  976. import { Vector3, Matrix } from "babylonjs/Maths/math";
  977. import { IAnimatable } from "babylonjs/Misc/tools";
  978. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  979. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  980. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  981. import { SubMesh } from "babylonjs/Meshes/subMesh";
  982. import { Mesh } from "babylonjs/Meshes/mesh";
  983. import { Scene } from "babylonjs/scene";
  984. import "babylonjs-materials/sky/sky.fragment";
  985. import "babylonjs-materials/sky/sky.vertex";
  986. /**
  987. * This is the sky material which allows to create dynamic and texture free effects for skyboxes.
  988. * @see https://doc.babylonjs.com/extensions/sky
  989. */
  990. export class SkyMaterial extends PushMaterial {
  991. /**
  992. * Defines the overall luminance of sky in interval ]0, 1[.
  993. */
  994. luminance: number;
  995. /**
  996. * Defines the amount (scattering) of haze as opposed to molecules in atmosphere.
  997. */
  998. turbidity: number;
  999. /**
  1000. * Defines the sky appearance (light intensity).
  1001. */
  1002. rayleigh: number;
  1003. /**
  1004. * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG.
  1005. */
  1006. mieCoefficient: number;
  1007. /**
  1008. * Defines the amount of haze particles following the Mie scattering theory.
  1009. */
  1010. mieDirectionalG: number;
  1011. /**
  1012. * Defines the distance of the sun according to the active scene camera.
  1013. */
  1014. distance: number;
  1015. /**
  1016. * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said
  1017. * "inclined".
  1018. */
  1019. inclination: number;
  1020. /**
  1021. * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between
  1022. * an object direction and a reference direction.
  1023. */
  1024. azimuth: number;
  1025. /**
  1026. * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then
  1027. * the property is overriden by the inclination and the azimuth and can be read at any moment.
  1028. */
  1029. sunPosition: Vector3;
  1030. /**
  1031. * Defines if the sun position should be computed (inclination and azimuth) according to the given
  1032. * .sunPosition property.
  1033. */
  1034. useSunPosition: boolean;
  1035. /**
  1036. * Defines an offset vector used to get a horizon offset.
  1037. * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis
  1038. */
  1039. cameraOffset: Vector3;
  1040. private _cameraPosition;
  1041. private _renderId;
  1042. /**
  1043. * Instantiates a new sky material.
  1044. * This material allows to create dynamic and texture free
  1045. * effects for skyboxes by taking care of the atmosphere state.
  1046. * @see https://doc.babylonjs.com/extensions/sky
  1047. * @param name Define the name of the material in the scene
  1048. * @param scene Define the scene the material belong to
  1049. */
  1050. constructor(name: string, scene: Scene);
  1051. /**
  1052. * Specifies if the material will require alpha blending
  1053. * @returns a boolean specifying if alpha blending is needed
  1054. */
  1055. needAlphaBlending(): boolean;
  1056. /**
  1057. * Specifies if this material should be rendered in alpha test mode
  1058. * @returns false as the sky material doesn't need alpha testing.
  1059. */
  1060. needAlphaTesting(): boolean;
  1061. /**
  1062. * Get the texture used for alpha test purpose.
  1063. * @returns null as the sky material has no texture.
  1064. */
  1065. getAlphaTestTexture(): Nullable<BaseTexture>;
  1066. /**
  1067. * Get if the submesh is ready to be used and all its information available.
  1068. * Child classes can use it to update shaders
  1069. * @param mesh defines the mesh to check
  1070. * @param subMesh defines which submesh to check
  1071. * @param useInstances specifies that instances should be used
  1072. * @returns a boolean indicating that the submesh is ready or not
  1073. */
  1074. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  1075. /**
  1076. * Binds the submesh to this material by preparing the effect and shader to draw
  1077. * @param world defines the world transformation matrix
  1078. * @param mesh defines the mesh containing the submesh
  1079. * @param subMesh defines the submesh to bind the material to
  1080. */
  1081. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  1082. /**
  1083. * Get the list of animatables in the material.
  1084. * @returns the list of animatables object used in the material
  1085. */
  1086. getAnimatables(): IAnimatable[];
  1087. /**
  1088. * Disposes the material
  1089. * @param forceDisposeEffect specifies if effects should be forcefully disposed
  1090. */
  1091. dispose(forceDisposeEffect?: boolean): void;
  1092. /**
  1093. * Makes a duplicate of the material, and gives it a new name
  1094. * @param name defines the new name for the duplicated material
  1095. * @returns the cloned material
  1096. */
  1097. clone(name: string): SkyMaterial;
  1098. /**
  1099. * Serializes this material in a JSON representation
  1100. * @returns the serialized material object
  1101. */
  1102. serialize(): any;
  1103. /**
  1104. * Gets the current class name of the material e.g. "SkyMaterial"
  1105. * Mainly use in serialization.
  1106. * @returns the class name
  1107. */
  1108. getClassName(): string;
  1109. /**
  1110. * Creates a sky material from parsed material data
  1111. * @param source defines the JSON representation of the material
  1112. * @param scene defines the hosting scene
  1113. * @param rootUrl defines the root URL to use to load textures and relative dependencies
  1114. * @returns a new sky material
  1115. */
  1116. static Parse(source: any, scene: Scene, rootUrl: string): SkyMaterial;
  1117. }
  1118. }
  1119. declare module "babylonjs-materials/sky/index" {
  1120. export * from "babylonjs-materials/sky/skyMaterial";
  1121. }
  1122. declare module "babylonjs-materials/terrain/terrain.fragment" {
  1123. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  1124. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  1125. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  1126. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  1127. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  1128. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  1129. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  1130. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  1131. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  1132. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  1133. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  1134. /** @hidden */
  1135. export var terrainPixelShader: {
  1136. name: string;
  1137. shader: string;
  1138. };
  1139. }
  1140. declare module "babylonjs-materials/terrain/terrain.vertex" {
  1141. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  1142. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  1143. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  1144. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  1145. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  1146. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  1147. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  1148. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  1149. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  1150. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  1151. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  1152. /** @hidden */
  1153. export var terrainVertexShader: {
  1154. name: string;
  1155. shader: string;
  1156. };
  1157. }
  1158. declare module "babylonjs-materials/terrain/terrainMaterial" {
  1159. import { Nullable } from "babylonjs/types";
  1160. import { Color3, Matrix } from "babylonjs/Maths/math";
  1161. import { IAnimatable } from "babylonjs/Misc/tools";
  1162. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  1163. import { Texture } from "babylonjs/Materials/Textures/texture";
  1164. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  1165. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  1166. import { SubMesh } from "babylonjs/Meshes/subMesh";
  1167. import { Mesh } from "babylonjs/Meshes/mesh";
  1168. import { Scene } from "babylonjs/scene";
  1169. import "babylonjs-materials/terrain/terrain.fragment";
  1170. import "babylonjs-materials/terrain/terrain.vertex";
  1171. export class TerrainMaterial extends PushMaterial {
  1172. private _mixTexture;
  1173. mixTexture: BaseTexture;
  1174. private _diffuseTexture1;
  1175. diffuseTexture1: Texture;
  1176. private _diffuseTexture2;
  1177. diffuseTexture2: Texture;
  1178. private _diffuseTexture3;
  1179. diffuseTexture3: Texture;
  1180. private _bumpTexture1;
  1181. bumpTexture1: Texture;
  1182. private _bumpTexture2;
  1183. bumpTexture2: Texture;
  1184. private _bumpTexture3;
  1185. bumpTexture3: Texture;
  1186. diffuseColor: Color3;
  1187. specularColor: Color3;
  1188. specularPower: number;
  1189. private _disableLighting;
  1190. disableLighting: boolean;
  1191. private _maxSimultaneousLights;
  1192. maxSimultaneousLights: number;
  1193. private _renderId;
  1194. constructor(name: string, scene: Scene);
  1195. needAlphaBlending(): boolean;
  1196. needAlphaTesting(): boolean;
  1197. getAlphaTestTexture(): Nullable<BaseTexture>;
  1198. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  1199. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  1200. getAnimatables(): IAnimatable[];
  1201. getActiveTextures(): BaseTexture[];
  1202. hasTexture(texture: BaseTexture): boolean;
  1203. dispose(forceDisposeEffect?: boolean): void;
  1204. clone(name: string): TerrainMaterial;
  1205. serialize(): any;
  1206. getClassName(): string;
  1207. static Parse(source: any, scene: Scene, rootUrl: string): TerrainMaterial;
  1208. }
  1209. }
  1210. declare module "babylonjs-materials/terrain/index" {
  1211. export * from "babylonjs-materials/terrain/terrainMaterial";
  1212. }
  1213. declare module "babylonjs-materials/triPlanar/triplanar.fragment" {
  1214. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  1215. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  1216. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  1217. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  1218. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  1219. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  1220. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  1221. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  1222. import "babylonjs/Shaders/ShadersInclude/depthPrePass";
  1223. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  1224. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  1225. /** @hidden */
  1226. export var triplanarPixelShader: {
  1227. name: string;
  1228. shader: string;
  1229. };
  1230. }
  1231. declare module "babylonjs-materials/triPlanar/triplanar.vertex" {
  1232. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  1233. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  1234. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  1235. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  1236. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  1237. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  1238. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  1239. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  1240. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  1241. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  1242. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  1243. /** @hidden */
  1244. export var triplanarVertexShader: {
  1245. name: string;
  1246. shader: string;
  1247. };
  1248. }
  1249. declare module "babylonjs-materials/triPlanar/triPlanarMaterial" {
  1250. import { Nullable } from "babylonjs/types";
  1251. import { Color3, Matrix } from "babylonjs/Maths/math";
  1252. import { IAnimatable } from "babylonjs/Misc/tools";
  1253. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  1254. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  1255. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  1256. import { SubMesh } from "babylonjs/Meshes/subMesh";
  1257. import { Mesh } from "babylonjs/Meshes/mesh";
  1258. import { Scene } from "babylonjs/scene";
  1259. import "babylonjs-materials/triPlanar/triplanar.fragment";
  1260. import "babylonjs-materials/triPlanar/triplanar.vertex";
  1261. export class TriPlanarMaterial extends PushMaterial {
  1262. mixTexture: BaseTexture;
  1263. private _diffuseTextureX;
  1264. diffuseTextureX: BaseTexture;
  1265. private _diffuseTextureY;
  1266. diffuseTextureY: BaseTexture;
  1267. private _diffuseTextureZ;
  1268. diffuseTextureZ: BaseTexture;
  1269. private _normalTextureX;
  1270. normalTextureX: BaseTexture;
  1271. private _normalTextureY;
  1272. normalTextureY: BaseTexture;
  1273. private _normalTextureZ;
  1274. normalTextureZ: BaseTexture;
  1275. tileSize: number;
  1276. diffuseColor: Color3;
  1277. specularColor: Color3;
  1278. specularPower: number;
  1279. private _disableLighting;
  1280. disableLighting: boolean;
  1281. private _maxSimultaneousLights;
  1282. maxSimultaneousLights: number;
  1283. private _renderId;
  1284. constructor(name: string, scene: Scene);
  1285. needAlphaBlending(): boolean;
  1286. needAlphaTesting(): boolean;
  1287. getAlphaTestTexture(): Nullable<BaseTexture>;
  1288. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  1289. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  1290. getAnimatables(): IAnimatable[];
  1291. getActiveTextures(): BaseTexture[];
  1292. hasTexture(texture: BaseTexture): boolean;
  1293. dispose(forceDisposeEffect?: boolean): void;
  1294. clone(name: string): TriPlanarMaterial;
  1295. serialize(): any;
  1296. getClassName(): string;
  1297. static Parse(source: any, scene: Scene, rootUrl: string): TriPlanarMaterial;
  1298. }
  1299. }
  1300. declare module "babylonjs-materials/triPlanar/index" {
  1301. export * from "babylonjs-materials/triPlanar/triPlanarMaterial";
  1302. }
  1303. declare module "babylonjs-materials/water/water.fragment" {
  1304. import "babylonjs/Shaders/ShadersInclude/helperFunctions";
  1305. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  1306. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  1307. import "babylonjs/Shaders/ShadersInclude/lightsFragmentFunctions";
  1308. import "babylonjs/Shaders/ShadersInclude/shadowsFragmentFunctions";
  1309. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragmentDeclaration";
  1310. import "babylonjs/Shaders/ShadersInclude/logDepthDeclaration";
  1311. import "babylonjs/Shaders/ShadersInclude/fogFragmentDeclaration";
  1312. import "babylonjs/Shaders/ShadersInclude/clipPlaneFragment";
  1313. import "babylonjs/Shaders/ShadersInclude/lightFragment";
  1314. import "babylonjs/Shaders/ShadersInclude/logDepthFragment";
  1315. import "babylonjs/Shaders/ShadersInclude/fogFragment";
  1316. /** @hidden */
  1317. export var waterPixelShader: {
  1318. name: string;
  1319. shader: string;
  1320. };
  1321. }
  1322. declare module "babylonjs-materials/water/water.vertex" {
  1323. import "babylonjs/Shaders/ShadersInclude/bonesDeclaration";
  1324. import "babylonjs/Shaders/ShadersInclude/instancesDeclaration";
  1325. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertexDeclaration";
  1326. import "babylonjs/Shaders/ShadersInclude/fogVertexDeclaration";
  1327. import "babylonjs/Shaders/ShadersInclude/lightFragmentDeclaration";
  1328. import "babylonjs/Shaders/ShadersInclude/lightUboDeclaration";
  1329. import "babylonjs/Shaders/ShadersInclude/logDepthDeclaration";
  1330. import "babylonjs/Shaders/ShadersInclude/instancesVertex";
  1331. import "babylonjs/Shaders/ShadersInclude/bonesVertex";
  1332. import "babylonjs/Shaders/ShadersInclude/clipPlaneVertex";
  1333. import "babylonjs/Shaders/ShadersInclude/fogVertex";
  1334. import "babylonjs/Shaders/ShadersInclude/shadowsVertex";
  1335. import "babylonjs/Shaders/ShadersInclude/logDepthVertex";
  1336. /** @hidden */
  1337. export var waterVertexShader: {
  1338. name: string;
  1339. shader: string;
  1340. };
  1341. }
  1342. declare module "babylonjs-materials/water/waterMaterial" {
  1343. import { Nullable } from "babylonjs/types";
  1344. import { Vector2, Color3, Matrix } from "babylonjs/Maths/math";
  1345. import { IAnimatable } from "babylonjs/Misc/tools";
  1346. import { SmartArray } from "babylonjs/Misc/smartArray";
  1347. import { BaseTexture } from "babylonjs/Materials/Textures/baseTexture";
  1348. import { RenderTargetTexture } from "babylonjs/Materials/Textures/renderTargetTexture";
  1349. import { PushMaterial } from "babylonjs/Materials/pushMaterial";
  1350. import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
  1351. import { SubMesh } from "babylonjs/Meshes/subMesh";
  1352. import { Mesh } from "babylonjs/Meshes/mesh";
  1353. import { Scene } from "babylonjs/scene";
  1354. import "babylonjs-materials/water/water.fragment";
  1355. import "babylonjs-materials/water/water.vertex";
  1356. export class WaterMaterial extends PushMaterial {
  1357. renderTargetSize: Vector2;
  1358. private _bumpTexture;
  1359. bumpTexture: BaseTexture;
  1360. diffuseColor: Color3;
  1361. specularColor: Color3;
  1362. specularPower: number;
  1363. private _disableLighting;
  1364. disableLighting: boolean;
  1365. private _maxSimultaneousLights;
  1366. maxSimultaneousLights: number;
  1367. /**
  1368. * @param {number}: Represents the wind force
  1369. */
  1370. windForce: number;
  1371. /**
  1372. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  1373. */
  1374. windDirection: Vector2;
  1375. /**
  1376. * @param {number}: Wave height, represents the height of the waves
  1377. */
  1378. waveHeight: number;
  1379. /**
  1380. * @param {number}: Bump height, represents the bump height related to the bump map
  1381. */
  1382. bumpHeight: number;
  1383. /**
  1384. * @param {boolean}: Add a smaller moving bump to less steady waves.
  1385. */
  1386. private _bumpSuperimpose;
  1387. bumpSuperimpose: boolean;
  1388. /**
  1389. * @param {boolean}: Color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel.
  1390. */
  1391. private _fresnelSeparate;
  1392. fresnelSeparate: boolean;
  1393. /**
  1394. * @param {boolean}: bump Waves modify the reflection.
  1395. */
  1396. private _bumpAffectsReflection;
  1397. bumpAffectsReflection: boolean;
  1398. /**
  1399. * @param {number}: The water color blended with the refraction (near)
  1400. */
  1401. waterColor: Color3;
  1402. /**
  1403. * @param {number}: The blend factor related to the water color
  1404. */
  1405. colorBlendFactor: number;
  1406. /**
  1407. * @param {number}: The water color blended with the reflection (far)
  1408. */
  1409. waterColor2: Color3;
  1410. /**
  1411. * @param {number}: The blend factor related to the water color (reflection, far)
  1412. */
  1413. colorBlendFactor2: number;
  1414. /**
  1415. * @param {number}: Represents the maximum length of a wave
  1416. */
  1417. waveLength: number;
  1418. /**
  1419. * @param {number}: Defines the waves speed
  1420. */
  1421. waveSpeed: number;
  1422. protected _renderTargets: SmartArray<RenderTargetTexture>;
  1423. private _mesh;
  1424. private _refractionRTT;
  1425. private _reflectionRTT;
  1426. private _reflectionTransform;
  1427. private _lastTime;
  1428. private _lastDeltaTime;
  1429. private _renderId;
  1430. private _useLogarithmicDepth;
  1431. private _waitingRenderList;
  1432. /**
  1433. * Gets a boolean indicating that current material needs to register RTT
  1434. */
  1435. readonly hasRenderTargetTextures: boolean;
  1436. /**
  1437. * Constructor
  1438. */
  1439. constructor(name: string, scene: Scene, renderTargetSize?: Vector2);
  1440. useLogarithmicDepth: boolean;
  1441. readonly refractionTexture: Nullable<RenderTargetTexture>;
  1442. readonly reflectionTexture: Nullable<RenderTargetTexture>;
  1443. addToRenderList(node: any): void;
  1444. enableRenderTargets(enable: boolean): void;
  1445. getRenderList(): Nullable<AbstractMesh[]>;
  1446. readonly renderTargetsEnabled: boolean;
  1447. needAlphaBlending(): boolean;
  1448. needAlphaTesting(): boolean;
  1449. getAlphaTestTexture(): Nullable<BaseTexture>;
  1450. isReadyForSubMesh(mesh: AbstractMesh, subMesh: SubMesh, useInstances?: boolean): boolean;
  1451. bindForSubMesh(world: Matrix, mesh: Mesh, subMesh: SubMesh): void;
  1452. private _createRenderTargets;
  1453. getAnimatables(): IAnimatable[];
  1454. getActiveTextures(): BaseTexture[];
  1455. hasTexture(texture: BaseTexture): boolean;
  1456. dispose(forceDisposeEffect?: boolean): void;
  1457. clone(name: string): WaterMaterial;
  1458. serialize(): any;
  1459. getClassName(): string;
  1460. static Parse(source: any, scene: Scene, rootUrl: string): WaterMaterial;
  1461. static CreateDefaultMesh(name: string, scene: Scene): Mesh;
  1462. }
  1463. }
  1464. declare module "babylonjs-materials/water/index" {
  1465. export * from "babylonjs-materials/water/waterMaterial";
  1466. }
  1467. declare module "babylonjs-materials/index" {
  1468. export * from "babylonjs-materials/cell/index";
  1469. export * from "babylonjs-materials/custom/index";
  1470. export * from "babylonjs-materials/fire/index";
  1471. export * from "babylonjs-materials/fur/index";
  1472. export * from "babylonjs-materials/gradient/index";
  1473. export * from "babylonjs-materials/grid/index";
  1474. export * from "babylonjs-materials/lava/index";
  1475. export * from "babylonjs-materials/mix/index";
  1476. export * from "babylonjs-materials/normal/index";
  1477. export * from "babylonjs-materials/shadowOnly/index";
  1478. export * from "babylonjs-materials/simple/index";
  1479. export * from "babylonjs-materials/sky/index";
  1480. export * from "babylonjs-materials/terrain/index";
  1481. export * from "babylonjs-materials/triPlanar/index";
  1482. export * from "babylonjs-materials/water/index";
  1483. }
  1484. declare module "babylonjs-materials/legacy/legacy-cell" {
  1485. export * from "babylonjs-materials/cell/index";
  1486. }
  1487. declare module "babylonjs-materials/legacy/legacy-custom" {
  1488. export * from "babylonjs-materials/custom/index";
  1489. }
  1490. declare module "babylonjs-materials/legacy/legacy-fire" {
  1491. export * from "babylonjs-materials/fire/index";
  1492. }
  1493. declare module "babylonjs-materials/legacy/legacy-fur" {
  1494. export * from "babylonjs-materials/fur/index";
  1495. }
  1496. declare module "babylonjs-materials/legacy/legacy-gradient" {
  1497. export * from "babylonjs-materials/gradient/index";
  1498. }
  1499. declare module "babylonjs-materials/legacy/legacy-grid" {
  1500. export * from "babylonjs-materials/grid/index";
  1501. }
  1502. declare module "babylonjs-materials/legacy/legacy-lava" {
  1503. export * from "babylonjs-materials/lava/index";
  1504. }
  1505. declare module "babylonjs-materials/legacy/legacy-mix" {
  1506. export * from "babylonjs-materials/mix/index";
  1507. }
  1508. declare module "babylonjs-materials/legacy/legacy-normal" {
  1509. export * from "babylonjs-materials/normal/index";
  1510. }
  1511. declare module "babylonjs-materials/legacy/legacy-shadowOnly" {
  1512. export * from "babylonjs-materials/shadowOnly/index";
  1513. }
  1514. declare module "babylonjs-materials/legacy/legacy-simple" {
  1515. export * from "babylonjs-materials/simple/index";
  1516. }
  1517. declare module "babylonjs-materials/legacy/legacy-sky" {
  1518. export * from "babylonjs-materials/sky/index";
  1519. }
  1520. declare module "babylonjs-materials/legacy/legacy-terrain" {
  1521. export * from "babylonjs-materials/terrain/index";
  1522. }
  1523. declare module "babylonjs-materials/legacy/legacy-triPlanar" {
  1524. export * from "babylonjs-materials/triPlanar/index";
  1525. }
  1526. declare module "babylonjs-materials/legacy/legacy-water" {
  1527. export * from "babylonjs-materials/water/index";
  1528. }
  1529. declare module "babylonjs-materials/legacy/legacy" {
  1530. export * from "babylonjs-materials/index";
  1531. }
  1532. declare module "babylonjs-materials" {
  1533. export * from "babylonjs-materials/legacy/legacy";
  1534. }
  1535. declare module BABYLON {
  1536. /** @hidden */
  1537. export var cellPixelShader: {
  1538. name: string;
  1539. shader: string;
  1540. };
  1541. }
  1542. declare module BABYLON {
  1543. /** @hidden */
  1544. export var cellVertexShader: {
  1545. name: string;
  1546. shader: string;
  1547. };
  1548. }
  1549. declare module BABYLON {
  1550. export class CellMaterial extends BABYLON.PushMaterial {
  1551. private _diffuseTexture;
  1552. diffuseTexture: BABYLON.BaseTexture;
  1553. diffuseColor: BABYLON.Color3;
  1554. _computeHighLevel: boolean;
  1555. computeHighLevel: boolean;
  1556. private _disableLighting;
  1557. disableLighting: boolean;
  1558. private _maxSimultaneousLights;
  1559. maxSimultaneousLights: number;
  1560. private _renderId;
  1561. constructor(name: string, scene: BABYLON.Scene);
  1562. needAlphaBlending(): boolean;
  1563. needAlphaTesting(): boolean;
  1564. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1565. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1566. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1567. getAnimatables(): BABYLON.IAnimatable[];
  1568. getActiveTextures(): BABYLON.BaseTexture[];
  1569. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1570. dispose(forceDisposeEffect?: boolean): void;
  1571. getClassName(): string;
  1572. clone(name: string): CellMaterial;
  1573. serialize(): any;
  1574. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): CellMaterial;
  1575. }
  1576. }
  1577. declare module BABYLON {
  1578. export class CustomShaderStructure {
  1579. FragmentStore: string;
  1580. VertexStore: string;
  1581. constructor();
  1582. }
  1583. export class ShaderSpecialParts {
  1584. constructor();
  1585. Fragment_Begin: string;
  1586. Fragment_Definitions: string;
  1587. Fragment_MainBegin: string;
  1588. Fragment_Custom_Diffuse: string;
  1589. Fragment_Before_Lights: string;
  1590. Fragment_Before_Fog: string;
  1591. Fragment_Custom_Alpha: string;
  1592. Fragment_Before_FragColor: string;
  1593. Vertex_Begin: string;
  1594. Vertex_Definitions: string;
  1595. Vertex_MainBegin: string;
  1596. Vertex_Before_PositionUpdated: string;
  1597. Vertex_Before_NormalUpdated: string;
  1598. Vertex_MainEnd: string;
  1599. }
  1600. export class CustomMaterial extends BABYLON.StandardMaterial {
  1601. static ShaderIndexer: number;
  1602. CustomParts: ShaderSpecialParts;
  1603. _isCreatedShader: boolean;
  1604. _createdShaderName: string;
  1605. _customUniform: string[];
  1606. _newUniforms: string[];
  1607. _newUniformInstances: any[];
  1608. _newSamplerInstances: BABYLON.Texture[];
  1609. FragmentShader: string;
  1610. VertexShader: string;
  1611. AttachAfterBind(mesh: BABYLON.Mesh, effect: BABYLON.Effect): void;
  1612. ReviewUniform(name: string, arr: string[]): string[];
  1613. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.StandardMaterialDefines): string;
  1614. constructor(name: string, scene: BABYLON.Scene);
  1615. AddUniform(name: string, kind: string, param: any): CustomMaterial;
  1616. Fragment_Begin(shaderPart: string): CustomMaterial;
  1617. Fragment_Definitions(shaderPart: string): CustomMaterial;
  1618. Fragment_MainBegin(shaderPart: string): CustomMaterial;
  1619. Fragment_Custom_Diffuse(shaderPart: string): CustomMaterial;
  1620. Fragment_Custom_Alpha(shaderPart: string): CustomMaterial;
  1621. Fragment_Before_Lights(shaderPart: string): CustomMaterial;
  1622. Fragment_Before_Fog(shaderPart: string): CustomMaterial;
  1623. Fragment_Before_FragColor(shaderPart: string): CustomMaterial;
  1624. Vertex_Begin(shaderPart: string): CustomMaterial;
  1625. Vertex_Definitions(shaderPart: string): CustomMaterial;
  1626. Vertex_MainBegin(shaderPart: string): CustomMaterial;
  1627. Vertex_Before_PositionUpdated(shaderPart: string): CustomMaterial;
  1628. Vertex_Before_NormalUpdated(shaderPart: string): CustomMaterial;
  1629. Vertex_MainEnd(shaderPart: string): CustomMaterial;
  1630. }
  1631. }
  1632. declare module BABYLON {
  1633. export class ShaderAlebdoParts {
  1634. constructor();
  1635. Fragment_Begin: string;
  1636. Fragment_Definitions: string;
  1637. Fragment_MainBegin: string;
  1638. Fragment_Custom_Albedo: string;
  1639. Fragment_Before_Lights: string;
  1640. Fragment_Before_Fog: string;
  1641. Fragment_Custom_Alpha: string;
  1642. Fragment_Before_FragColor: string;
  1643. Vertex_Begin: string;
  1644. Vertex_Definitions: string;
  1645. Vertex_MainBegin: string;
  1646. Vertex_Before_PositionUpdated: string;
  1647. Vertex_Before_NormalUpdated: string;
  1648. Vertex_MainEnd: string;
  1649. }
  1650. export class PBRCustomMaterial extends BABYLON.PBRMaterial {
  1651. static ShaderIndexer: number;
  1652. CustomParts: ShaderAlebdoParts;
  1653. _isCreatedShader: boolean;
  1654. _createdShaderName: string;
  1655. _customUniform: string[];
  1656. _newUniforms: string[];
  1657. _newUniformInstances: any[];
  1658. _newSamplerInstances: BABYLON.Texture[];
  1659. FragmentShader: string;
  1660. VertexShader: string;
  1661. AttachAfterBind(mesh: BABYLON.Mesh, effect: BABYLON.Effect): void;
  1662. ReviewUniform(name: string, arr: string[]): string[];
  1663. Builder(shaderName: string, uniforms: string[], uniformBuffers: string[], samplers: string[], defines: BABYLON.PBRMaterialDefines): string;
  1664. constructor(name: string, scene: BABYLON.Scene);
  1665. AddUniform(name: string, kind: string, param: any): PBRCustomMaterial;
  1666. Fragment_Begin(shaderPart: string): PBRCustomMaterial;
  1667. Fragment_Definitions(shaderPart: string): PBRCustomMaterial;
  1668. Fragment_MainBegin(shaderPart: string): PBRCustomMaterial;
  1669. Fragment_Custom_Albedo(shaderPart: string): PBRCustomMaterial;
  1670. Fragment_Custom_Alpha(shaderPart: string): PBRCustomMaterial;
  1671. Fragment_Before_Lights(shaderPart: string): PBRCustomMaterial;
  1672. Fragment_Before_Fog(shaderPart: string): PBRCustomMaterial;
  1673. Fragment_Before_FragColor(shaderPart: string): PBRCustomMaterial;
  1674. Vertex_Begin(shaderPart: string): PBRCustomMaterial;
  1675. Vertex_Definitions(shaderPart: string): PBRCustomMaterial;
  1676. Vertex_MainBegin(shaderPart: string): PBRCustomMaterial;
  1677. Vertex_Before_PositionUpdated(shaderPart: string): PBRCustomMaterial;
  1678. Vertex_Before_NormalUpdated(shaderPart: string): PBRCustomMaterial;
  1679. Vertex_MainEnd(shaderPart: string): PBRCustomMaterial;
  1680. }
  1681. }
  1682. declare module BABYLON {
  1683. /** @hidden */
  1684. export var firePixelShader: {
  1685. name: string;
  1686. shader: string;
  1687. };
  1688. }
  1689. declare module BABYLON {
  1690. /** @hidden */
  1691. export var fireVertexShader: {
  1692. name: string;
  1693. shader: string;
  1694. };
  1695. }
  1696. declare module BABYLON {
  1697. export class FireMaterial extends BABYLON.PushMaterial {
  1698. private _diffuseTexture;
  1699. diffuseTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  1700. private _distortionTexture;
  1701. distortionTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  1702. private _opacityTexture;
  1703. opacityTexture: BABYLON.Nullable<BABYLON.BaseTexture>;
  1704. diffuseColor: BABYLON.Color3;
  1705. speed: number;
  1706. private _scaledDiffuse;
  1707. private _renderId;
  1708. private _lastTime;
  1709. constructor(name: string, scene: BABYLON.Scene);
  1710. needAlphaBlending(): boolean;
  1711. needAlphaTesting(): boolean;
  1712. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1713. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1714. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1715. getAnimatables(): BABYLON.IAnimatable[];
  1716. getActiveTextures(): BABYLON.BaseTexture[];
  1717. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1718. getClassName(): string;
  1719. dispose(forceDisposeEffect?: boolean): void;
  1720. clone(name: string): FireMaterial;
  1721. serialize(): any;
  1722. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FireMaterial;
  1723. }
  1724. }
  1725. declare module BABYLON {
  1726. /** @hidden */
  1727. export var furPixelShader: {
  1728. name: string;
  1729. shader: string;
  1730. };
  1731. }
  1732. declare module BABYLON {
  1733. /** @hidden */
  1734. export var furVertexShader: {
  1735. name: string;
  1736. shader: string;
  1737. };
  1738. }
  1739. declare module BABYLON {
  1740. export class FurMaterial extends BABYLON.PushMaterial {
  1741. private _diffuseTexture;
  1742. diffuseTexture: BABYLON.BaseTexture;
  1743. private _heightTexture;
  1744. heightTexture: BABYLON.BaseTexture;
  1745. diffuseColor: BABYLON.Color3;
  1746. furLength: number;
  1747. furAngle: number;
  1748. furColor: BABYLON.Color3;
  1749. furOffset: number;
  1750. furSpacing: number;
  1751. furGravity: BABYLON.Vector3;
  1752. furSpeed: number;
  1753. furDensity: number;
  1754. furOcclusion: number;
  1755. furTexture: BABYLON.DynamicTexture;
  1756. private _disableLighting;
  1757. disableLighting: boolean;
  1758. private _maxSimultaneousLights;
  1759. maxSimultaneousLights: number;
  1760. highLevelFur: boolean;
  1761. _meshes: BABYLON.AbstractMesh[];
  1762. private _renderId;
  1763. private _furTime;
  1764. constructor(name: string, scene: BABYLON.Scene);
  1765. furTime: number;
  1766. needAlphaBlending(): boolean;
  1767. needAlphaTesting(): boolean;
  1768. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1769. updateFur(): void;
  1770. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1771. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1772. getAnimatables(): BABYLON.IAnimatable[];
  1773. getActiveTextures(): BABYLON.BaseTexture[];
  1774. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1775. dispose(forceDisposeEffect?: boolean): void;
  1776. clone(name: string): FurMaterial;
  1777. serialize(): any;
  1778. getClassName(): string;
  1779. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): FurMaterial;
  1780. static GenerateTexture(name: string, scene: BABYLON.Scene): BABYLON.DynamicTexture;
  1781. static FurifyMesh(sourceMesh: BABYLON.Mesh, quality: number): BABYLON.Mesh[];
  1782. }
  1783. }
  1784. declare module BABYLON {
  1785. /** @hidden */
  1786. export var gradientPixelShader: {
  1787. name: string;
  1788. shader: string;
  1789. };
  1790. }
  1791. declare module BABYLON {
  1792. /** @hidden */
  1793. export var gradientVertexShader: {
  1794. name: string;
  1795. shader: string;
  1796. };
  1797. }
  1798. declare module BABYLON {
  1799. export class GradientMaterial extends BABYLON.PushMaterial {
  1800. private _maxSimultaneousLights;
  1801. maxSimultaneousLights: number;
  1802. topColor: BABYLON.Color3;
  1803. topColorAlpha: number;
  1804. bottomColor: BABYLON.Color3;
  1805. bottomColorAlpha: number;
  1806. offset: number;
  1807. scale: number;
  1808. smoothness: number;
  1809. private _disableLighting;
  1810. disableLighting: boolean;
  1811. private _renderId;
  1812. constructor(name: string, scene: BABYLON.Scene);
  1813. needAlphaBlending(): boolean;
  1814. needAlphaTesting(): boolean;
  1815. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1816. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1817. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1818. getAnimatables(): BABYLON.IAnimatable[];
  1819. dispose(forceDisposeEffect?: boolean): void;
  1820. clone(name: string): GradientMaterial;
  1821. serialize(): any;
  1822. getClassName(): string;
  1823. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GradientMaterial;
  1824. }
  1825. }
  1826. declare module BABYLON {
  1827. /** @hidden */
  1828. export var gridPixelShader: {
  1829. name: string;
  1830. shader: string;
  1831. };
  1832. }
  1833. declare module BABYLON {
  1834. /** @hidden */
  1835. export var gridVertexShader: {
  1836. name: string;
  1837. shader: string;
  1838. };
  1839. }
  1840. declare module BABYLON {
  1841. /**
  1842. * The grid materials allows you to wrap any shape with a grid.
  1843. * Colors are customizable.
  1844. */
  1845. export class GridMaterial extends BABYLON.PushMaterial {
  1846. /**
  1847. * Main color of the grid (e.g. between lines)
  1848. */
  1849. mainColor: BABYLON.Color3;
  1850. /**
  1851. * Color of the grid lines.
  1852. */
  1853. lineColor: BABYLON.Color3;
  1854. /**
  1855. * The scale of the grid compared to unit.
  1856. */
  1857. gridRatio: number;
  1858. /**
  1859. * Allows setting an offset for the grid lines.
  1860. */
  1861. gridOffset: BABYLON.Vector3;
  1862. /**
  1863. * The frequency of thicker lines.
  1864. */
  1865. majorUnitFrequency: number;
  1866. /**
  1867. * The visibility of minor units in the grid.
  1868. */
  1869. minorUnitVisibility: number;
  1870. /**
  1871. * The grid opacity outside of the lines.
  1872. */
  1873. opacity: number;
  1874. /**
  1875. * Determine RBG output is premultiplied by alpha value.
  1876. */
  1877. preMultiplyAlpha: boolean;
  1878. private _opacityTexture;
  1879. opacityTexture: BABYLON.BaseTexture;
  1880. private _gridControl;
  1881. private _renderId;
  1882. /**
  1883. * constructor
  1884. * @param name The name given to the material in order to identify it afterwards.
  1885. * @param scene The scene the material is used in.
  1886. */
  1887. constructor(name: string, scene: BABYLON.Scene);
  1888. /**
  1889. * Returns wehter or not the grid requires alpha blending.
  1890. */
  1891. needAlphaBlending(): boolean;
  1892. needAlphaBlendingForMesh(mesh: BABYLON.AbstractMesh): boolean;
  1893. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1894. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1895. /**
  1896. * Dispose the material and its associated resources.
  1897. * @param forceDisposeEffect will also dispose the used effect when true
  1898. */
  1899. dispose(forceDisposeEffect?: boolean): void;
  1900. clone(name: string): GridMaterial;
  1901. serialize(): any;
  1902. getClassName(): string;
  1903. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): GridMaterial;
  1904. }
  1905. }
  1906. declare module BABYLON {
  1907. /** @hidden */
  1908. export var lavaPixelShader: {
  1909. name: string;
  1910. shader: string;
  1911. };
  1912. }
  1913. declare module BABYLON {
  1914. /** @hidden */
  1915. export var lavaVertexShader: {
  1916. name: string;
  1917. shader: string;
  1918. };
  1919. }
  1920. declare module BABYLON {
  1921. export class LavaMaterial extends BABYLON.PushMaterial {
  1922. private _diffuseTexture;
  1923. diffuseTexture: BABYLON.BaseTexture;
  1924. noiseTexture: BABYLON.BaseTexture;
  1925. fogColor: BABYLON.Color3;
  1926. speed: number;
  1927. movingSpeed: number;
  1928. lowFrequencySpeed: number;
  1929. fogDensity: number;
  1930. private _lastTime;
  1931. diffuseColor: BABYLON.Color3;
  1932. private _disableLighting;
  1933. disableLighting: boolean;
  1934. private _unlit;
  1935. unlit: boolean;
  1936. private _maxSimultaneousLights;
  1937. maxSimultaneousLights: number;
  1938. private _scaledDiffuse;
  1939. private _renderId;
  1940. constructor(name: string, scene: BABYLON.Scene);
  1941. needAlphaBlending(): boolean;
  1942. needAlphaTesting(): boolean;
  1943. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  1944. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  1945. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  1946. getAnimatables(): BABYLON.IAnimatable[];
  1947. getActiveTextures(): BABYLON.BaseTexture[];
  1948. hasTexture(texture: BABYLON.BaseTexture): boolean;
  1949. dispose(forceDisposeEffect?: boolean): void;
  1950. clone(name: string): LavaMaterial;
  1951. serialize(): any;
  1952. getClassName(): string;
  1953. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): LavaMaterial;
  1954. }
  1955. }
  1956. declare module BABYLON {
  1957. /** @hidden */
  1958. export var mixPixelShader: {
  1959. name: string;
  1960. shader: string;
  1961. };
  1962. }
  1963. declare module BABYLON {
  1964. /** @hidden */
  1965. export var mixVertexShader: {
  1966. name: string;
  1967. shader: string;
  1968. };
  1969. }
  1970. declare module BABYLON {
  1971. export class MixMaterial extends BABYLON.PushMaterial {
  1972. /**
  1973. * Mix textures
  1974. */
  1975. private _mixTexture1;
  1976. mixTexture1: BABYLON.BaseTexture;
  1977. private _mixTexture2;
  1978. mixTexture2: BABYLON.BaseTexture;
  1979. /**
  1980. * Diffuse textures
  1981. */
  1982. private _diffuseTexture1;
  1983. diffuseTexture1: BABYLON.Texture;
  1984. private _diffuseTexture2;
  1985. diffuseTexture2: BABYLON.Texture;
  1986. private _diffuseTexture3;
  1987. diffuseTexture3: BABYLON.Texture;
  1988. private _diffuseTexture4;
  1989. diffuseTexture4: BABYLON.Texture;
  1990. private _diffuseTexture5;
  1991. diffuseTexture5: BABYLON.Texture;
  1992. private _diffuseTexture6;
  1993. diffuseTexture6: BABYLON.Texture;
  1994. private _diffuseTexture7;
  1995. diffuseTexture7: BABYLON.Texture;
  1996. private _diffuseTexture8;
  1997. diffuseTexture8: BABYLON.Texture;
  1998. /**
  1999. * Uniforms
  2000. */
  2001. diffuseColor: BABYLON.Color3;
  2002. specularColor: BABYLON.Color3;
  2003. specularPower: number;
  2004. private _disableLighting;
  2005. disableLighting: boolean;
  2006. private _maxSimultaneousLights;
  2007. maxSimultaneousLights: number;
  2008. private _renderId;
  2009. constructor(name: string, scene: BABYLON.Scene);
  2010. needAlphaBlending(): boolean;
  2011. needAlphaTesting(): boolean;
  2012. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2013. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2014. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2015. getAnimatables(): BABYLON.IAnimatable[];
  2016. getActiveTextures(): BABYLON.BaseTexture[];
  2017. hasTexture(texture: BABYLON.BaseTexture): boolean;
  2018. dispose(forceDisposeEffect?: boolean): void;
  2019. clone(name: string): MixMaterial;
  2020. serialize(): any;
  2021. getClassName(): string;
  2022. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): MixMaterial;
  2023. }
  2024. }
  2025. declare module BABYLON {
  2026. /** @hidden */
  2027. export var normalPixelShader: {
  2028. name: string;
  2029. shader: string;
  2030. };
  2031. }
  2032. declare module BABYLON {
  2033. /** @hidden */
  2034. export var normalVertexShader: {
  2035. name: string;
  2036. shader: string;
  2037. };
  2038. }
  2039. declare module BABYLON {
  2040. export class NormalMaterial extends BABYLON.PushMaterial {
  2041. private _diffuseTexture;
  2042. diffuseTexture: BABYLON.BaseTexture;
  2043. diffuseColor: BABYLON.Color3;
  2044. private _disableLighting;
  2045. disableLighting: boolean;
  2046. private _maxSimultaneousLights;
  2047. maxSimultaneousLights: number;
  2048. private _renderId;
  2049. constructor(name: string, scene: BABYLON.Scene);
  2050. needAlphaBlending(): boolean;
  2051. needAlphaBlendingForMesh(mesh: BABYLON.AbstractMesh): boolean;
  2052. needAlphaTesting(): boolean;
  2053. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2054. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2055. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2056. getAnimatables(): BABYLON.IAnimatable[];
  2057. getActiveTextures(): BABYLON.BaseTexture[];
  2058. hasTexture(texture: BABYLON.BaseTexture): boolean;
  2059. dispose(forceDisposeEffect?: boolean): void;
  2060. clone(name: string): NormalMaterial;
  2061. serialize(): any;
  2062. getClassName(): string;
  2063. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): NormalMaterial;
  2064. }
  2065. }
  2066. declare module BABYLON {
  2067. /** @hidden */
  2068. export var shadowOnlyPixelShader: {
  2069. name: string;
  2070. shader: string;
  2071. };
  2072. }
  2073. declare module BABYLON {
  2074. /** @hidden */
  2075. export var shadowOnlyVertexShader: {
  2076. name: string;
  2077. shader: string;
  2078. };
  2079. }
  2080. declare module BABYLON {
  2081. export class ShadowOnlyMaterial extends BABYLON.PushMaterial {
  2082. private _renderId;
  2083. private _activeLight;
  2084. constructor(name: string, scene: BABYLON.Scene);
  2085. shadowColor: BABYLON.Color3;
  2086. needAlphaBlending(): boolean;
  2087. needAlphaTesting(): boolean;
  2088. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2089. activeLight: BABYLON.IShadowLight;
  2090. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2091. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2092. clone(name: string): ShadowOnlyMaterial;
  2093. serialize(): any;
  2094. getClassName(): string;
  2095. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): ShadowOnlyMaterial;
  2096. }
  2097. }
  2098. declare module BABYLON {
  2099. /** @hidden */
  2100. export var simplePixelShader: {
  2101. name: string;
  2102. shader: string;
  2103. };
  2104. }
  2105. declare module BABYLON {
  2106. /** @hidden */
  2107. export var simpleVertexShader: {
  2108. name: string;
  2109. shader: string;
  2110. };
  2111. }
  2112. declare module BABYLON {
  2113. export class SimpleMaterial extends BABYLON.PushMaterial {
  2114. private _diffuseTexture;
  2115. diffuseTexture: BABYLON.BaseTexture;
  2116. diffuseColor: BABYLON.Color3;
  2117. private _disableLighting;
  2118. disableLighting: boolean;
  2119. private _maxSimultaneousLights;
  2120. maxSimultaneousLights: number;
  2121. private _renderId;
  2122. constructor(name: string, scene: BABYLON.Scene);
  2123. needAlphaBlending(): boolean;
  2124. needAlphaTesting(): boolean;
  2125. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2126. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2127. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2128. getAnimatables(): BABYLON.IAnimatable[];
  2129. getActiveTextures(): BABYLON.BaseTexture[];
  2130. hasTexture(texture: BABYLON.BaseTexture): boolean;
  2131. dispose(forceDisposeEffect?: boolean): void;
  2132. clone(name: string): SimpleMaterial;
  2133. serialize(): any;
  2134. getClassName(): string;
  2135. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SimpleMaterial;
  2136. }
  2137. }
  2138. declare module BABYLON {
  2139. /** @hidden */
  2140. export var skyPixelShader: {
  2141. name: string;
  2142. shader: string;
  2143. };
  2144. }
  2145. declare module BABYLON {
  2146. /** @hidden */
  2147. export var skyVertexShader: {
  2148. name: string;
  2149. shader: string;
  2150. };
  2151. }
  2152. declare module BABYLON {
  2153. /**
  2154. * This is the sky material which allows to create dynamic and texture free effects for skyboxes.
  2155. * @see https://doc.babylonjs.com/extensions/sky
  2156. */
  2157. export class SkyMaterial extends BABYLON.PushMaterial {
  2158. /**
  2159. * Defines the overall luminance of sky in interval ]0, 1[.
  2160. */
  2161. luminance: number;
  2162. /**
  2163. * Defines the amount (scattering) of haze as opposed to molecules in atmosphere.
  2164. */
  2165. turbidity: number;
  2166. /**
  2167. * Defines the sky appearance (light intensity).
  2168. */
  2169. rayleigh: number;
  2170. /**
  2171. * Defines the mieCoefficient in interval [0, 0.1] which affects the property .mieDirectionalG.
  2172. */
  2173. mieCoefficient: number;
  2174. /**
  2175. * Defines the amount of haze particles following the Mie scattering theory.
  2176. */
  2177. mieDirectionalG: number;
  2178. /**
  2179. * Defines the distance of the sun according to the active scene camera.
  2180. */
  2181. distance: number;
  2182. /**
  2183. * Defines the sun inclination, in interval [-0.5, 0.5]. When the inclination is not 0, the sun is said
  2184. * "inclined".
  2185. */
  2186. inclination: number;
  2187. /**
  2188. * Defines the solar azimuth in interval [0, 1]. The azimuth is the angle in the horizontal plan between
  2189. * an object direction and a reference direction.
  2190. */
  2191. azimuth: number;
  2192. /**
  2193. * Defines the sun position in the sky on (x,y,z). If the property .useSunPosition is set to false, then
  2194. * the property is overriden by the inclination and the azimuth and can be read at any moment.
  2195. */
  2196. sunPosition: BABYLON.Vector3;
  2197. /**
  2198. * Defines if the sun position should be computed (inclination and azimuth) according to the given
  2199. * .sunPosition property.
  2200. */
  2201. useSunPosition: boolean;
  2202. /**
  2203. * Defines an offset vector used to get a horizon offset.
  2204. * @example skyMaterial.cameraOffset.y = camera.globalPosition.y // Set horizon relative to 0 on the Y axis
  2205. */
  2206. cameraOffset: BABYLON.Vector3;
  2207. private _cameraPosition;
  2208. private _renderId;
  2209. /**
  2210. * Instantiates a new sky material.
  2211. * This material allows to create dynamic and texture free
  2212. * effects for skyboxes by taking care of the atmosphere state.
  2213. * @see https://doc.babylonjs.com/extensions/sky
  2214. * @param name Define the name of the material in the scene
  2215. * @param scene Define the scene the material belong to
  2216. */
  2217. constructor(name: string, scene: BABYLON.Scene);
  2218. /**
  2219. * Specifies if the material will require alpha blending
  2220. * @returns a boolean specifying if alpha blending is needed
  2221. */
  2222. needAlphaBlending(): boolean;
  2223. /**
  2224. * Specifies if this material should be rendered in alpha test mode
  2225. * @returns false as the sky material doesn't need alpha testing.
  2226. */
  2227. needAlphaTesting(): boolean;
  2228. /**
  2229. * Get the texture used for alpha test purpose.
  2230. * @returns null as the sky material has no texture.
  2231. */
  2232. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2233. /**
  2234. * Get if the submesh is ready to be used and all its information available.
  2235. * Child classes can use it to update shaders
  2236. * @param mesh defines the mesh to check
  2237. * @param subMesh defines which submesh to check
  2238. * @param useInstances specifies that instances should be used
  2239. * @returns a boolean indicating that the submesh is ready or not
  2240. */
  2241. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2242. /**
  2243. * Binds the submesh to this material by preparing the effect and shader to draw
  2244. * @param world defines the world transformation matrix
  2245. * @param mesh defines the mesh containing the submesh
  2246. * @param subMesh defines the submesh to bind the material to
  2247. */
  2248. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2249. /**
  2250. * Get the list of animatables in the material.
  2251. * @returns the list of animatables object used in the material
  2252. */
  2253. getAnimatables(): BABYLON.IAnimatable[];
  2254. /**
  2255. * Disposes the material
  2256. * @param forceDisposeEffect specifies if effects should be forcefully disposed
  2257. */
  2258. dispose(forceDisposeEffect?: boolean): void;
  2259. /**
  2260. * Makes a duplicate of the material, and gives it a new name
  2261. * @param name defines the new name for the duplicated material
  2262. * @returns the cloned material
  2263. */
  2264. clone(name: string): SkyMaterial;
  2265. /**
  2266. * Serializes this material in a JSON representation
  2267. * @returns the serialized material object
  2268. */
  2269. serialize(): any;
  2270. /**
  2271. * Gets the current class name of the material e.g. "SkyMaterial"
  2272. * Mainly use in serialization.
  2273. * @returns the class name
  2274. */
  2275. getClassName(): string;
  2276. /**
  2277. * Creates a sky material from parsed material data
  2278. * @param source defines the JSON representation of the material
  2279. * @param scene defines the hosting scene
  2280. * @param rootUrl defines the root URL to use to load textures and relative dependencies
  2281. * @returns a new sky material
  2282. */
  2283. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): SkyMaterial;
  2284. }
  2285. }
  2286. declare module BABYLON {
  2287. /** @hidden */
  2288. export var terrainPixelShader: {
  2289. name: string;
  2290. shader: string;
  2291. };
  2292. }
  2293. declare module BABYLON {
  2294. /** @hidden */
  2295. export var terrainVertexShader: {
  2296. name: string;
  2297. shader: string;
  2298. };
  2299. }
  2300. declare module BABYLON {
  2301. export class TerrainMaterial extends BABYLON.PushMaterial {
  2302. private _mixTexture;
  2303. mixTexture: BABYLON.BaseTexture;
  2304. private _diffuseTexture1;
  2305. diffuseTexture1: BABYLON.Texture;
  2306. private _diffuseTexture2;
  2307. diffuseTexture2: BABYLON.Texture;
  2308. private _diffuseTexture3;
  2309. diffuseTexture3: BABYLON.Texture;
  2310. private _bumpTexture1;
  2311. bumpTexture1: BABYLON.Texture;
  2312. private _bumpTexture2;
  2313. bumpTexture2: BABYLON.Texture;
  2314. private _bumpTexture3;
  2315. bumpTexture3: BABYLON.Texture;
  2316. diffuseColor: BABYLON.Color3;
  2317. specularColor: BABYLON.Color3;
  2318. specularPower: number;
  2319. private _disableLighting;
  2320. disableLighting: boolean;
  2321. private _maxSimultaneousLights;
  2322. maxSimultaneousLights: number;
  2323. private _renderId;
  2324. constructor(name: string, scene: BABYLON.Scene);
  2325. needAlphaBlending(): boolean;
  2326. needAlphaTesting(): boolean;
  2327. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2328. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2329. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2330. getAnimatables(): BABYLON.IAnimatable[];
  2331. getActiveTextures(): BABYLON.BaseTexture[];
  2332. hasTexture(texture: BABYLON.BaseTexture): boolean;
  2333. dispose(forceDisposeEffect?: boolean): void;
  2334. clone(name: string): TerrainMaterial;
  2335. serialize(): any;
  2336. getClassName(): string;
  2337. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TerrainMaterial;
  2338. }
  2339. }
  2340. declare module BABYLON {
  2341. /** @hidden */
  2342. export var triplanarPixelShader: {
  2343. name: string;
  2344. shader: string;
  2345. };
  2346. }
  2347. declare module BABYLON {
  2348. /** @hidden */
  2349. export var triplanarVertexShader: {
  2350. name: string;
  2351. shader: string;
  2352. };
  2353. }
  2354. declare module BABYLON {
  2355. export class TriPlanarMaterial extends BABYLON.PushMaterial {
  2356. mixTexture: BABYLON.BaseTexture;
  2357. private _diffuseTextureX;
  2358. diffuseTextureX: BABYLON.BaseTexture;
  2359. private _diffuseTextureY;
  2360. diffuseTextureY: BABYLON.BaseTexture;
  2361. private _diffuseTextureZ;
  2362. diffuseTextureZ: BABYLON.BaseTexture;
  2363. private _normalTextureX;
  2364. normalTextureX: BABYLON.BaseTexture;
  2365. private _normalTextureY;
  2366. normalTextureY: BABYLON.BaseTexture;
  2367. private _normalTextureZ;
  2368. normalTextureZ: BABYLON.BaseTexture;
  2369. tileSize: number;
  2370. diffuseColor: BABYLON.Color3;
  2371. specularColor: BABYLON.Color3;
  2372. specularPower: number;
  2373. private _disableLighting;
  2374. disableLighting: boolean;
  2375. private _maxSimultaneousLights;
  2376. maxSimultaneousLights: number;
  2377. private _renderId;
  2378. constructor(name: string, scene: BABYLON.Scene);
  2379. needAlphaBlending(): boolean;
  2380. needAlphaTesting(): boolean;
  2381. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2382. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2383. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2384. getAnimatables(): BABYLON.IAnimatable[];
  2385. getActiveTextures(): BABYLON.BaseTexture[];
  2386. hasTexture(texture: BABYLON.BaseTexture): boolean;
  2387. dispose(forceDisposeEffect?: boolean): void;
  2388. clone(name: string): TriPlanarMaterial;
  2389. serialize(): any;
  2390. getClassName(): string;
  2391. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): TriPlanarMaterial;
  2392. }
  2393. }
  2394. declare module BABYLON {
  2395. /** @hidden */
  2396. export var waterPixelShader: {
  2397. name: string;
  2398. shader: string;
  2399. };
  2400. }
  2401. declare module BABYLON {
  2402. /** @hidden */
  2403. export var waterVertexShader: {
  2404. name: string;
  2405. shader: string;
  2406. };
  2407. }
  2408. declare module BABYLON {
  2409. export class WaterMaterial extends BABYLON.PushMaterial {
  2410. renderTargetSize: BABYLON.Vector2;
  2411. private _bumpTexture;
  2412. bumpTexture: BABYLON.BaseTexture;
  2413. diffuseColor: BABYLON.Color3;
  2414. specularColor: BABYLON.Color3;
  2415. specularPower: number;
  2416. private _disableLighting;
  2417. disableLighting: boolean;
  2418. private _maxSimultaneousLights;
  2419. maxSimultaneousLights: number;
  2420. /**
  2421. * @param {number}: Represents the wind force
  2422. */
  2423. windForce: number;
  2424. /**
  2425. * @param {Vector2}: The direction of the wind in the plane (X, Z)
  2426. */
  2427. windDirection: BABYLON.Vector2;
  2428. /**
  2429. * @param {number}: Wave height, represents the height of the waves
  2430. */
  2431. waveHeight: number;
  2432. /**
  2433. * @param {number}: Bump height, represents the bump height related to the bump map
  2434. */
  2435. bumpHeight: number;
  2436. /**
  2437. * @param {boolean}: Add a smaller moving bump to less steady waves.
  2438. */
  2439. private _bumpSuperimpose;
  2440. bumpSuperimpose: boolean;
  2441. /**
  2442. * @param {boolean}: Color refraction and reflection differently with .waterColor2 and .colorBlendFactor2. Non-linear (physically correct) fresnel.
  2443. */
  2444. private _fresnelSeparate;
  2445. fresnelSeparate: boolean;
  2446. /**
  2447. * @param {boolean}: bump Waves modify the reflection.
  2448. */
  2449. private _bumpAffectsReflection;
  2450. bumpAffectsReflection: boolean;
  2451. /**
  2452. * @param {number}: The water color blended with the refraction (near)
  2453. */
  2454. waterColor: BABYLON.Color3;
  2455. /**
  2456. * @param {number}: The blend factor related to the water color
  2457. */
  2458. colorBlendFactor: number;
  2459. /**
  2460. * @param {number}: The water color blended with the reflection (far)
  2461. */
  2462. waterColor2: BABYLON.Color3;
  2463. /**
  2464. * @param {number}: The blend factor related to the water color (reflection, far)
  2465. */
  2466. colorBlendFactor2: number;
  2467. /**
  2468. * @param {number}: Represents the maximum length of a wave
  2469. */
  2470. waveLength: number;
  2471. /**
  2472. * @param {number}: Defines the waves speed
  2473. */
  2474. waveSpeed: number;
  2475. protected _renderTargets: BABYLON.SmartArray<BABYLON.RenderTargetTexture>;
  2476. private _mesh;
  2477. private _refractionRTT;
  2478. private _reflectionRTT;
  2479. private _reflectionTransform;
  2480. private _lastTime;
  2481. private _lastDeltaTime;
  2482. private _renderId;
  2483. private _useLogarithmicDepth;
  2484. private _waitingRenderList;
  2485. /**
  2486. * Gets a boolean indicating that current material needs to register RTT
  2487. */
  2488. readonly hasRenderTargetTextures: boolean;
  2489. /**
  2490. * Constructor
  2491. */
  2492. constructor(name: string, scene: BABYLON.Scene, renderTargetSize?: BABYLON.Vector2);
  2493. useLogarithmicDepth: boolean;
  2494. readonly refractionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  2495. readonly reflectionTexture: BABYLON.Nullable<BABYLON.RenderTargetTexture>;
  2496. addToRenderList(node: any): void;
  2497. enableRenderTargets(enable: boolean): void;
  2498. getRenderList(): BABYLON.Nullable<BABYLON.AbstractMesh[]>;
  2499. readonly renderTargetsEnabled: boolean;
  2500. needAlphaBlending(): boolean;
  2501. needAlphaTesting(): boolean;
  2502. getAlphaTestTexture(): BABYLON.Nullable<BABYLON.BaseTexture>;
  2503. isReadyForSubMesh(mesh: BABYLON.AbstractMesh, subMesh: BABYLON.SubMesh, useInstances?: boolean): boolean;
  2504. bindForSubMesh(world: BABYLON.Matrix, mesh: BABYLON.Mesh, subMesh: BABYLON.SubMesh): void;
  2505. private _createRenderTargets;
  2506. getAnimatables(): BABYLON.IAnimatable[];
  2507. getActiveTextures(): BABYLON.BaseTexture[];
  2508. hasTexture(texture: BABYLON.BaseTexture): boolean;
  2509. dispose(forceDisposeEffect?: boolean): void;
  2510. clone(name: string): WaterMaterial;
  2511. serialize(): any;
  2512. getClassName(): string;
  2513. static Parse(source: any, scene: BABYLON.Scene, rootUrl: string): WaterMaterial;
  2514. static CreateDefaultMesh(name: string, scene: BABYLON.Scene): BABYLON.Mesh;
  2515. }
  2516. }