babylonjs.materials.module.d.ts 107 KB

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