babylonjs.materials.module.d.ts 109 KB

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