babylonjs.materials.module.d.ts 109 KB

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