babylonjs.materials.module.d.ts 106 KB

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