babylonjs.materials.module.d.ts 109 KB

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