babylonjs.materials.module.d.ts 111 KB

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