babylonjs.materials.module.d.ts 111 KB

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