babylonjs.materials.module.d.ts 108 KB

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