babylonjs.materials.module.d.ts 108 KB

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