babylonjs.materials.module.d.ts 108 KB

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