babylonjs.materials.module.d.ts 109 KB

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