babylonjs.materials.module.d.ts 111 KB

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