babylonjs-materials 9.4.0 → 9.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/babylon.cellMaterial.min.js +2 -2
  2. package/babylon.cellMaterial.min.js.map +1 -1
  3. package/babylon.customMaterial.min.js +2 -2
  4. package/babylon.customMaterial.min.js.map +1 -1
  5. package/babylon.fireMaterial.min.js +2 -2
  6. package/babylon.fireMaterial.min.js.map +1 -1
  7. package/babylon.furMaterial.min.js +2 -2
  8. package/babylon.furMaterial.min.js.map +1 -1
  9. package/babylon.gradientMaterial.min.js +2 -2
  10. package/babylon.gradientMaterial.min.js.map +1 -1
  11. package/babylon.gridMaterial.min.js +2 -2
  12. package/babylon.gridMaterial.min.js.map +1 -1
  13. package/babylon.lavaMaterial.min.js +2 -2
  14. package/babylon.lavaMaterial.min.js.map +1 -1
  15. package/babylon.mixMaterial.min.js +2 -2
  16. package/babylon.mixMaterial.min.js.map +1 -1
  17. package/babylon.normalMaterial.min.js +2 -2
  18. package/babylon.normalMaterial.min.js.map +1 -1
  19. package/babylon.shadowOnlyMaterial.min.js +2 -2
  20. package/babylon.shadowOnlyMaterial.min.js.map +1 -1
  21. package/babylon.simpleMaterial.min.js +2 -2
  22. package/babylon.simpleMaterial.min.js.map +1 -1
  23. package/babylon.skyMaterial.min.js +2 -2
  24. package/babylon.skyMaterial.min.js.map +1 -1
  25. package/babylon.terrainMaterial.min.js +2 -2
  26. package/babylon.terrainMaterial.min.js.map +1 -1
  27. package/babylon.triPlanarMaterial.min.js +2 -2
  28. package/babylon.triPlanarMaterial.min.js.map +1 -1
  29. package/babylon.waterMaterial.min.js +2 -2
  30. package/babylon.waterMaterial.min.js.map +1 -1
  31. package/babylonjs.materials.d.ts +293 -14
  32. package/babylonjs.materials.js +2 -2
  33. package/babylonjs.materials.js.map +1 -0
  34. package/babylonjs.materials.min.js +2 -2
  35. package/babylonjs.materials.min.js.map +1 -1
  36. package/babylonjs.materials.module.d.ts +983 -56
  37. package/package.json +5 -10
  38. package/rollup.config.umd.mjs +35 -0
  39. package/babylon.cellMaterial.js +0 -2
  40. package/babylon.customMaterial.js +0 -2
  41. package/babylon.fireMaterial.js +0 -2
  42. package/babylon.furMaterial.js +0 -2
  43. package/babylon.gradientMaterial.js +0 -2
  44. package/babylon.gridMaterial.js +0 -2
  45. package/babylon.lavaMaterial.js +0 -2
  46. package/babylon.mixMaterial.js +0 -2
  47. package/babylon.normalMaterial.js +0 -2
  48. package/babylon.shadowOnlyMaterial.js +0 -2
  49. package/babylon.simpleMaterial.js +0 -2
  50. package/babylon.skyMaterial.js +0 -2
  51. package/babylon.terrainMaterial.js +0 -2
  52. package/babylon.triPlanarMaterial.js +0 -2
  53. package/babylon.waterMaterial.js +0 -2
@@ -30,8 +30,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
30
30
  import { SubMesh } from "babylonjs/Meshes/subMesh";
31
31
  import { Mesh } from "babylonjs/Meshes/mesh";
32
32
  import { Scene } from "babylonjs/scene";
33
- import "babylonjs-materials/water/water.fragment";
34
- import "babylonjs-materials/water/water.vertex";
35
33
  import "babylonjs/Rendering/boundingBoxRenderer";
36
34
  export class WaterMaterial extends PushMaterial {
37
35
  renderTargetSize: Vector2;
@@ -123,6 +121,7 @@ export class WaterMaterial extends PushMaterial {
123
121
  private _offsetMirror;
124
122
  private _tempPlane;
125
123
  private _lastTime;
124
+ private _shadersLoaded;
126
125
  private _lastDeltaTime;
127
126
  private _waitingRenderList;
128
127
  private _imageProcessingConfiguration;
@@ -136,8 +135,9 @@ export class WaterMaterial extends PushMaterial {
136
135
  * @param name
137
136
  * @param scene
138
137
  * @param renderTargetSize
138
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
139
139
  */
140
- constructor(name: string, scene?: Scene, renderTargetSize?: Vector2);
140
+ constructor(name: string, scene?: Scene, renderTargetSize?: Vector2, forceGLSL?: boolean);
141
141
  get refractionTexture(): Nullable<RenderTargetTexture>;
142
142
  get reflectionTexture(): Nullable<RenderTargetTexture>;
143
143
  addToRenderList(node: any): void;
@@ -212,6 +212,51 @@ export const waterPixelShader: {
212
212
  declare module "babylonjs-materials/water/index" {
213
213
  export * from "babylonjs-materials/water/waterMaterial";
214
214
 
215
+ }
216
+ declare module "babylonjs-materials/water/wgsl/water.vertex" {
217
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
218
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
219
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
220
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
221
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
222
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
223
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
224
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
225
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
226
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
227
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
228
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
229
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
230
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
231
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
232
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
233
+ /** @internal */
234
+ export const waterVertexShaderWGSL: {
235
+ name: string;
236
+ shader: string;
237
+ };
238
+
239
+ }
240
+ declare module "babylonjs-materials/water/wgsl/water.fragment" {
241
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
242
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingDeclaration";
243
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingFunctions";
244
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
245
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
246
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
247
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
248
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
249
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
250
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
251
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
252
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
253
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
254
+ /** @internal */
255
+ export const waterPixelShaderWGSL: {
256
+ name: string;
257
+ shader: string;
258
+ };
259
+
215
260
  }
216
261
  declare module "babylonjs-materials/triPlanar/triplanar.vertex" {
217
262
  import "babylonjs/Shaders/ShadersInclude/helperFunctions";
@@ -271,8 +316,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
271
316
  import { SubMesh } from "babylonjs/Meshes/subMesh";
272
317
  import { Mesh } from "babylonjs/Meshes/mesh";
273
318
  import { Scene } from "babylonjs/scene";
274
- import "babylonjs-materials/triPlanar/triplanar.fragment";
275
- import "babylonjs-materials/triPlanar/triplanar.vertex";
276
319
  export class TriPlanarMaterial extends PushMaterial {
277
320
  mixTexture: BaseTexture;
278
321
  private _diffuseTextureX;
@@ -295,7 +338,14 @@ export class TriPlanarMaterial extends PushMaterial {
295
338
  disableLighting: boolean;
296
339
  private _maxSimultaneousLights;
297
340
  maxSimultaneousLights: number;
298
- constructor(name: string, scene?: Scene);
341
+ private _shadersLoaded;
342
+ /**
343
+ * Instantiates a TriPlanar Material in the given scene
344
+ * @param name The friendly name of the material
345
+ * @param scene The scene to add the material to
346
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
347
+ */
348
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
299
349
  needAlphaBlending(): boolean;
300
350
  needAlphaTesting(): boolean;
301
351
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -315,6 +365,52 @@ export class TriPlanarMaterial extends PushMaterial {
315
365
  declare module "babylonjs-materials/triPlanar/index" {
316
366
  export * from "babylonjs-materials/triPlanar/triPlanarMaterial";
317
367
 
368
+ }
369
+ declare module "babylonjs-materials/triPlanar/wgsl/triplanar.vertex" {
370
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
371
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
372
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
373
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
374
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
375
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
376
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
377
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
378
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
379
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
380
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
381
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
382
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
383
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
384
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
385
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
386
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
387
+ /** @internal */
388
+ export const triplanarVertexShaderWGSL: {
389
+ name: string;
390
+ shader: string;
391
+ };
392
+
393
+ }
394
+ declare module "babylonjs-materials/triPlanar/wgsl/triplanar.fragment" {
395
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
396
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
397
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
398
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
399
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
400
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
401
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
402
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
403
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
404
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
405
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
406
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
407
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
408
+ /** @internal */
409
+ export const triplanarPixelShaderWGSL: {
410
+ name: string;
411
+ shader: string;
412
+ };
413
+
318
414
  }
319
415
  declare module "babylonjs-materials/terrain/terrainMaterial" {
320
416
  import { Nullable } from "babylonjs/types";
@@ -328,8 +424,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
328
424
  import { SubMesh } from "babylonjs/Meshes/subMesh";
329
425
  import { Mesh } from "babylonjs/Meshes/mesh";
330
426
  import { Scene } from "babylonjs/scene";
331
- import "babylonjs-materials/terrain/terrain.fragment";
332
- import "babylonjs-materials/terrain/terrain.vertex";
333
427
  export class TerrainMaterial extends PushMaterial {
334
428
  private _mixTexture;
335
429
  mixTexture: BaseTexture;
@@ -352,7 +446,14 @@ export class TerrainMaterial extends PushMaterial {
352
446
  disableLighting: boolean;
353
447
  private _maxSimultaneousLights;
354
448
  maxSimultaneousLights: number;
355
- constructor(name: string, scene?: Scene);
449
+ private _shadersLoaded;
450
+ /**
451
+ * Instantiates a Terrain Material in the given scene
452
+ * @param name The friendly name of the material
453
+ * @param scene The scene to add the material to
454
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
455
+ */
456
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
356
457
  needAlphaBlending(): boolean;
357
458
  needAlphaTesting(): boolean;
358
459
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -418,6 +519,51 @@ export const terrainPixelShader: {
418
519
  declare module "babylonjs-materials/terrain/index" {
419
520
  export * from "babylonjs-materials/terrain/terrainMaterial";
420
521
 
522
+ }
523
+ declare module "babylonjs-materials/terrain/wgsl/terrain.vertex" {
524
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
525
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
526
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
527
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
528
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
529
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
530
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
531
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
532
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
533
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
534
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
535
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
536
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
537
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
538
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
539
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
540
+ /** @internal */
541
+ export const terrainVertexShaderWGSL: {
542
+ name: string;
543
+ shader: string;
544
+ };
545
+
546
+ }
547
+ declare module "babylonjs-materials/terrain/wgsl/terrain.fragment" {
548
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
549
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
550
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
551
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
552
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
553
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
554
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
555
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
556
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
557
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
558
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
559
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
560
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
561
+ /** @internal */
562
+ export const terrainPixelShaderWGSL: {
563
+ name: string;
564
+ shader: string;
565
+ };
566
+
421
567
  }
422
568
  declare module "babylonjs-materials/sky/skyMaterial" {
423
569
  import { Nullable } from "babylonjs/types";
@@ -429,8 +575,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
429
575
  import { SubMesh } from "babylonjs/Meshes/subMesh";
430
576
  import { Mesh } from "babylonjs/Meshes/mesh";
431
577
  import { Scene } from "babylonjs/scene";
432
- import "babylonjs-materials/sky/sky.fragment";
433
- import "babylonjs-materials/sky/sky.vertex";
434
578
  /**
435
579
  * This is the sky material which allows to create dynamic and texture free effects for skyboxes.
436
580
  * @see https://doc.babylonjs.com/toolsAndResources/assetLibraries/materialsLibrary/skyMat
@@ -495,6 +639,7 @@ export class SkyMaterial extends PushMaterial {
495
639
  dithering: boolean;
496
640
  private _cameraPosition;
497
641
  private _skyOrientation;
642
+ private _shadersLoaded;
498
643
  /**
499
644
  * Instantiates a new sky material.
500
645
  * This material allows to create dynamic and texture free
@@ -502,8 +647,9 @@ export class SkyMaterial extends PushMaterial {
502
647
  * @see https://doc.babylonjs.com/toolsAndResources/assetLibraries/materialsLibrary/skyMat
503
648
  * @param name Define the name of the material in the scene
504
649
  * @param scene Define the scene the material belong to
650
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
505
651
  */
506
- constructor(name: string, scene?: Scene);
652
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
507
653
  /**
508
654
  * Specifies if the material will require alpha blending
509
655
  * @returns a boolean specifying if alpha blending is needed
@@ -605,6 +751,36 @@ export const skyPixelShader: {
605
751
  declare module "babylonjs-materials/sky/index" {
606
752
  export * from "babylonjs-materials/sky/skyMaterial";
607
753
 
754
+ }
755
+ declare module "babylonjs-materials/sky/wgsl/sky.vertex" {
756
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
757
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
758
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
759
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
760
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
761
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
762
+ /** @internal */
763
+ export const skyVertexShaderWGSL: {
764
+ name: string;
765
+ shader: string;
766
+ };
767
+
768
+ }
769
+ declare module "babylonjs-materials/sky/wgsl/sky.fragment" {
770
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
771
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
772
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
773
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
774
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
775
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
776
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
777
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
778
+ /** @internal */
779
+ export const skyPixelShaderWGSL: {
780
+ name: string;
781
+ shader: string;
782
+ };
783
+
608
784
  }
609
785
  declare module "babylonjs-materials/simple/simpleMaterial" {
610
786
  import { Nullable } from "babylonjs/types";
@@ -617,8 +793,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
617
793
  import { SubMesh } from "babylonjs/Meshes/subMesh";
618
794
  import { Mesh } from "babylonjs/Meshes/mesh";
619
795
  import { Scene } from "babylonjs/scene";
620
- import "babylonjs-materials/simple/simple.fragment";
621
- import "babylonjs-materials/simple/simple.vertex";
622
796
  export class SimpleMaterial extends PushMaterial {
623
797
  private _diffuseTexture;
624
798
  diffuseTexture: BaseTexture;
@@ -627,7 +801,14 @@ export class SimpleMaterial extends PushMaterial {
627
801
  disableLighting: boolean;
628
802
  private _maxSimultaneousLights;
629
803
  maxSimultaneousLights: number;
630
- constructor(name: string, scene?: Scene);
804
+ private _shadersLoaded;
805
+ /**
806
+ * Instantiates a Simple Material in the given scene
807
+ * @param name The friendly name of the material
808
+ * @param scene The scene to add the material to
809
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
810
+ */
811
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
631
812
  needAlphaBlending(): boolean;
632
813
  needAlphaTesting(): boolean;
633
814
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -693,6 +874,51 @@ export const simplePixelShader: {
693
874
  declare module "babylonjs-materials/simple/index" {
694
875
  export * from "babylonjs-materials/simple/simpleMaterial";
695
876
 
877
+ }
878
+ declare module "babylonjs-materials/simple/wgsl/simple.vertex" {
879
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
880
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
881
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
882
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
883
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
884
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
885
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
886
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
887
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
888
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
889
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
890
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
891
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
892
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
893
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
894
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
895
+ /** @internal */
896
+ export const simpleVertexShaderWGSL: {
897
+ name: string;
898
+ shader: string;
899
+ };
900
+
901
+ }
902
+ declare module "babylonjs-materials/simple/wgsl/simple.fragment" {
903
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
904
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
905
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
906
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
907
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
908
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
909
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
910
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
911
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
912
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
913
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
914
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
915
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
916
+ /** @internal */
917
+ export const simplePixelShaderWGSL: {
918
+ name: string;
919
+ shader: string;
920
+ };
921
+
696
922
  }
697
923
  declare module "babylonjs-materials/shadowOnly/shadowOnlyMaterial" {
698
924
  import { Nullable } from "babylonjs/types";
@@ -705,12 +931,17 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
705
931
  import { SubMesh } from "babylonjs/Meshes/subMesh";
706
932
  import { Mesh } from "babylonjs/Meshes/mesh";
707
933
  import { Scene } from "babylonjs/scene";
708
- import "babylonjs-materials/shadowOnly/shadowOnly.fragment";
709
- import "babylonjs-materials/shadowOnly/shadowOnly.vertex";
710
934
  export class ShadowOnlyMaterial extends PushMaterial {
711
935
  private _activeLight;
712
936
  private _needAlphaBlending;
713
- constructor(name: string, scene?: Scene);
937
+ private _shadersLoaded;
938
+ /**
939
+ * Instantiates a ShadowOnly Material in the given scene
940
+ * @param name The friendly name of the material
941
+ * @param scene The scene to add the material to
942
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
943
+ */
944
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
714
945
  shadowColor: Color3;
715
946
  needAlphaBlending(): boolean;
716
947
  needAlphaTesting(): boolean;
@@ -778,6 +1009,50 @@ export const shadowOnlyPixelShader: {
778
1009
  declare module "babylonjs-materials/shadowOnly/index" {
779
1010
  export * from "babylonjs-materials/shadowOnly/shadowOnlyMaterial";
780
1011
 
1012
+ }
1013
+ declare module "babylonjs-materials/shadowOnly/wgsl/shadowOnly.vertex" {
1014
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
1015
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
1016
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
1017
+ import "babylonjs/ShadersWGSL/ShadersInclude/sceneUboDeclaration";
1018
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
1019
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1020
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
1021
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
1022
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
1023
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
1024
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
1025
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
1026
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
1027
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
1028
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
1029
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
1030
+ /** @internal */
1031
+ export const shadowOnlyVertexShaderWGSL: {
1032
+ name: string;
1033
+ shader: string;
1034
+ };
1035
+
1036
+ }
1037
+ declare module "babylonjs-materials/shadowOnly/wgsl/shadowOnly.fragment" {
1038
+ import "babylonjs/ShadersWGSL/ShadersInclude/sceneUboDeclaration";
1039
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
1040
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
1041
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
1042
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
1043
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
1044
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1045
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
1046
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
1047
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
1048
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
1049
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
1050
+ /** @internal */
1051
+ export const shadowOnlyPixelShaderWGSL: {
1052
+ name: string;
1053
+ shader: string;
1054
+ };
1055
+
781
1056
  }
782
1057
  declare module "babylonjs-materials/normal/normalMaterial" {
783
1058
  import { Nullable } from "babylonjs/types";
@@ -790,8 +1065,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
790
1065
  import { SubMesh } from "babylonjs/Meshes/subMesh";
791
1066
  import { Mesh } from "babylonjs/Meshes/mesh";
792
1067
  import { Scene } from "babylonjs/scene";
793
- import "babylonjs-materials/normal/normal.fragment";
794
- import "babylonjs-materials/normal/normal.vertex";
795
1068
  export class NormalMaterial extends PushMaterial {
796
1069
  private _diffuseTexture;
797
1070
  diffuseTexture: BaseTexture;
@@ -800,7 +1073,14 @@ export class NormalMaterial extends PushMaterial {
800
1073
  disableLighting: boolean;
801
1074
  private _maxSimultaneousLights;
802
1075
  maxSimultaneousLights: number;
803
- constructor(name: string, scene?: Scene);
1076
+ private _shadersLoaded;
1077
+ /**
1078
+ * Instantiates a Normal Material in the given scene
1079
+ * @param name The friendly name of the material
1080
+ * @param scene The scene to add the material to
1081
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
1082
+ */
1083
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
804
1084
  needAlphaBlending(): boolean;
805
1085
  needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
806
1086
  needAlphaTesting(): boolean;
@@ -866,6 +1146,50 @@ export const normalPixelShader: {
866
1146
  declare module "babylonjs-materials/normal/index" {
867
1147
  export * from "babylonjs-materials/normal/normalMaterial";
868
1148
 
1149
+ }
1150
+ declare module "babylonjs-materials/normal/wgsl/normal.vertex" {
1151
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
1152
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
1153
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
1154
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
1155
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1156
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
1157
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
1158
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
1159
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
1160
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
1161
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
1162
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
1163
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
1164
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
1165
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
1166
+ /** @internal */
1167
+ export const normalVertexShaderWGSL: {
1168
+ name: string;
1169
+ shader: string;
1170
+ };
1171
+
1172
+ }
1173
+ declare module "babylonjs-materials/normal/wgsl/normal.fragment" {
1174
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
1175
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
1176
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
1177
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
1178
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
1179
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1180
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
1181
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
1182
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
1183
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
1184
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
1185
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
1186
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
1187
+ /** @internal */
1188
+ export const normalPixelShaderWGSL: {
1189
+ name: string;
1190
+ shader: string;
1191
+ };
1192
+
869
1193
  }
870
1194
  declare module "babylonjs-materials/mix/mixMaterial" {
871
1195
  import { Nullable } from "babylonjs/types";
@@ -879,8 +1203,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
879
1203
  import { SubMesh } from "babylonjs/Meshes/subMesh";
880
1204
  import { Mesh } from "babylonjs/Meshes/mesh";
881
1205
  import { Scene } from "babylonjs/scene";
882
- import "babylonjs-materials/mix/mix.fragment";
883
- import "babylonjs-materials/mix/mix.vertex";
884
1206
  export class MixMaterial extends PushMaterial {
885
1207
  /**
886
1208
  * Mix textures
@@ -918,7 +1240,14 @@ export class MixMaterial extends PushMaterial {
918
1240
  disableLighting: boolean;
919
1241
  private _maxSimultaneousLights;
920
1242
  maxSimultaneousLights: number;
921
- constructor(name: string, scene?: Scene);
1243
+ private _shadersLoaded;
1244
+ /**
1245
+ * Instantiates a Mix Material in the given scene
1246
+ * @param name The friendly name of the material
1247
+ * @param scene The scene to add the material to
1248
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
1249
+ */
1250
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
922
1251
  needAlphaBlending(): boolean;
923
1252
  needAlphaTesting(): boolean;
924
1253
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -984,6 +1313,51 @@ export const mixPixelShader: {
984
1313
  declare module "babylonjs-materials/mix/index" {
985
1314
  export * from "babylonjs-materials/mix/mixMaterial";
986
1315
 
1316
+ }
1317
+ declare module "babylonjs-materials/mix/wgsl/mix.vertex" {
1318
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
1319
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
1320
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
1321
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
1322
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1323
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
1324
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
1325
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
1326
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
1327
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
1328
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
1329
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
1330
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
1331
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
1332
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
1333
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
1334
+ /** @internal */
1335
+ export const mixVertexShaderWGSL: {
1336
+ name: string;
1337
+ shader: string;
1338
+ };
1339
+
1340
+ }
1341
+ declare module "babylonjs-materials/mix/wgsl/mix.fragment" {
1342
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
1343
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
1344
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
1345
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
1346
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
1347
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1348
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
1349
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
1350
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
1351
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
1352
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
1353
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
1354
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
1355
+ /** @internal */
1356
+ export const mixPixelShaderWGSL: {
1357
+ name: string;
1358
+ shader: string;
1359
+ };
1360
+
987
1361
  }
988
1362
  declare module "babylonjs-materials/legacy/legacy" {
989
1363
  export * from "babylonjs-materials/index";
@@ -1060,8 +1434,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
1060
1434
  import { SubMesh } from "babylonjs/Meshes/subMesh";
1061
1435
  import { Mesh } from "babylonjs/Meshes/mesh";
1062
1436
  import { Scene } from "babylonjs/scene";
1063
- import "babylonjs-materials/lava/lava.fragment";
1064
- import "babylonjs-materials/lava/lava.vertex";
1065
1437
  export class LavaMaterial extends PushMaterial {
1066
1438
  private _diffuseTexture;
1067
1439
  diffuseTexture: BaseTexture;
@@ -1080,7 +1452,14 @@ export class LavaMaterial extends PushMaterial {
1080
1452
  private _maxSimultaneousLights;
1081
1453
  maxSimultaneousLights: number;
1082
1454
  private _scaledDiffuse;
1083
- constructor(name: string, scene?: Scene);
1455
+ private _shadersLoaded;
1456
+ /**
1457
+ * Instantiates a Lava Material in the given scene
1458
+ * @param name The friendly name of the material
1459
+ * @param scene The scene to add the material to
1460
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
1461
+ */
1462
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
1084
1463
  needAlphaBlending(): boolean;
1085
1464
  needAlphaTesting(): boolean;
1086
1465
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -1146,6 +1525,51 @@ export const lavaPixelShader: {
1146
1525
  declare module "babylonjs-materials/lava/index" {
1147
1526
  export * from "babylonjs-materials/lava/lavaMaterial";
1148
1527
 
1528
+ }
1529
+ declare module "babylonjs-materials/lava/wgsl/lava.vertex" {
1530
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
1531
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
1532
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
1533
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
1534
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1535
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
1536
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
1537
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
1538
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
1539
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
1540
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
1541
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
1542
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
1543
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
1544
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
1545
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
1546
+ /** @internal */
1547
+ export const lavaVertexShaderWGSL: {
1548
+ name: string;
1549
+ shader: string;
1550
+ };
1551
+
1552
+ }
1553
+ declare module "babylonjs-materials/lava/wgsl/lava.fragment" {
1554
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
1555
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
1556
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
1557
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
1558
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
1559
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1560
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
1561
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
1562
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
1563
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
1564
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
1565
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
1566
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
1567
+ /** @internal */
1568
+ export const lavaPixelShaderWGSL: {
1569
+ name: string;
1570
+ shader: string;
1571
+ };
1572
+
1149
1573
  }
1150
1574
  declare module "babylonjs-materials/grid/index" {
1151
1575
  export * from "babylonjs-materials/grid/gridMaterial";
@@ -1160,8 +1584,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
1160
1584
  import { SubMesh } from "babylonjs/Meshes/subMesh";
1161
1585
  import { Mesh } from "babylonjs/Meshes/mesh";
1162
1586
  import { Scene } from "babylonjs/scene";
1163
- import "babylonjs-materials/grid/grid.fragment";
1164
- import "babylonjs-materials/grid/grid.vertex";
1165
1587
  /**
1166
1588
  * The grid materials allows you to wrap any shape with a grid.
1167
1589
  * Colors are customizable.
@@ -1217,8 +1639,10 @@ export class GridMaterial extends PushMaterial {
1217
1639
  * constructor
1218
1640
  * @param name The name given to the material in order to identify it afterwards.
1219
1641
  * @param scene The scene the material is used in.
1642
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
1220
1643
  */
1221
- constructor(name: string, scene?: Scene);
1644
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
1645
+ private _shadersLoaded;
1222
1646
  /**
1223
1647
  * @returns whether or not the grid requires alpha blending.
1224
1648
  */
@@ -1270,6 +1694,38 @@ export const gridPixelShader: {
1270
1694
  shader: string;
1271
1695
  };
1272
1696
 
1697
+ }
1698
+ declare module "babylonjs-materials/grid/wgsl/grid.vertex" {
1699
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
1700
+ import "babylonjs/ShadersWGSL/ShadersInclude/sceneUboDeclaration";
1701
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1702
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
1703
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
1704
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
1705
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
1706
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
1707
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
1708
+ /** @internal */
1709
+ export const gridVertexShaderWGSL: {
1710
+ name: string;
1711
+ shader: string;
1712
+ };
1713
+
1714
+ }
1715
+ declare module "babylonjs-materials/grid/wgsl/grid.fragment" {
1716
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
1717
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1718
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
1719
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
1720
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
1721
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
1722
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
1723
+ /** @internal */
1724
+ export const gridPixelShaderWGSL: {
1725
+ name: string;
1726
+ shader: string;
1727
+ };
1728
+
1273
1729
  }
1274
1730
  declare module "babylonjs-materials/gradient/index" {
1275
1731
  export * from "babylonjs-materials/gradient/gradientMaterial";
@@ -1286,8 +1742,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
1286
1742
  import { SubMesh } from "babylonjs/Meshes/subMesh";
1287
1743
  import { Mesh } from "babylonjs/Meshes/mesh";
1288
1744
  import { Scene } from "babylonjs/scene";
1289
- import "babylonjs-materials/gradient/gradient.fragment";
1290
- import "babylonjs-materials/gradient/gradient.vertex";
1291
1745
  export class GradientMaterial extends PushMaterial {
1292
1746
  private _maxSimultaneousLights;
1293
1747
  maxSimultaneousLights: number;
@@ -1300,7 +1754,14 @@ export class GradientMaterial extends PushMaterial {
1300
1754
  smoothness: number;
1301
1755
  private _disableLighting;
1302
1756
  disableLighting: boolean;
1303
- constructor(name: string, scene?: Scene);
1757
+ private _shadersLoaded;
1758
+ /**
1759
+ * Instantiates a Gradient Material in the given scene
1760
+ * @param name The friendly name of the material
1761
+ * @param scene The scene to add the material to
1762
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
1763
+ */
1764
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
1304
1765
  needAlphaBlending(): boolean;
1305
1766
  needAlphaTesting(): boolean;
1306
1767
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -1360,6 +1821,51 @@ export const gradientPixelShader: {
1360
1821
  shader: string;
1361
1822
  };
1362
1823
 
1824
+ }
1825
+ declare module "babylonjs-materials/gradient/wgsl/gradient.vertex" {
1826
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
1827
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
1828
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
1829
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
1830
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1831
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
1832
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
1833
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
1834
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
1835
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
1836
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
1837
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
1838
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
1839
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
1840
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
1841
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
1842
+ /** @internal */
1843
+ export const gradientVertexShaderWGSL: {
1844
+ name: string;
1845
+ shader: string;
1846
+ };
1847
+
1848
+ }
1849
+ declare module "babylonjs-materials/gradient/wgsl/gradient.fragment" {
1850
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
1851
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
1852
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
1853
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
1854
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
1855
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1856
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
1857
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
1858
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
1859
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
1860
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
1861
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
1862
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
1863
+ /** @internal */
1864
+ export const gradientPixelShaderWGSL: {
1865
+ name: string;
1866
+ shader: string;
1867
+ };
1868
+
1363
1869
  }
1364
1870
  declare module "babylonjs-materials/fur/index" {
1365
1871
  export * from "babylonjs-materials/fur/furMaterial";
@@ -1377,8 +1883,6 @@ import { AbstractMesh } from "babylonjs/Meshes/abstractMesh";
1377
1883
  import { SubMesh } from "babylonjs/Meshes/subMesh";
1378
1884
  import { Mesh } from "babylonjs/Meshes/mesh";
1379
1885
  import { Scene } from "babylonjs/scene";
1380
- import "babylonjs-materials/fur/fur.fragment";
1381
- import "babylonjs-materials/fur/fur.vertex";
1382
1886
  export class FurMaterial extends PushMaterial {
1383
1887
  private _diffuseTexture;
1384
1888
  diffuseTexture: BaseTexture;
@@ -1402,7 +1906,14 @@ export class FurMaterial extends PushMaterial {
1402
1906
  highLevelFur: boolean;
1403
1907
  _meshes: AbstractMesh[];
1404
1908
  private _furTime;
1405
- constructor(name: string, scene?: Scene);
1909
+ private _shadersLoaded;
1910
+ /**
1911
+ * Instantiates a Fur Material in the given scene
1912
+ * @param name The friendly name of the material
1913
+ * @param scene The scene to add the material to
1914
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
1915
+ */
1916
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
1406
1917
  get furTime(): number;
1407
1918
  set furTime(furTime: number);
1408
1919
  needAlphaBlending(): boolean;
@@ -1469,6 +1980,51 @@ export const furPixelShader: {
1469
1980
  shader: string;
1470
1981
  };
1471
1982
 
1983
+ }
1984
+ declare module "babylonjs-materials/fur/wgsl/fur.vertex" {
1985
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
1986
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
1987
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
1988
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
1989
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
1990
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
1991
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
1992
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
1993
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
1994
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
1995
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
1996
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
1997
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
1998
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
1999
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
2000
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
2001
+ /** @internal */
2002
+ export const furVertexShaderWGSL: {
2003
+ name: string;
2004
+ shader: string;
2005
+ };
2006
+
2007
+ }
2008
+ declare module "babylonjs-materials/fur/wgsl/fur.fragment" {
2009
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
2010
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
2011
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
2012
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
2013
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
2014
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
2015
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
2016
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
2017
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
2018
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
2019
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
2020
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
2021
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
2022
+ /** @internal */
2023
+ export const furPixelShaderWGSL: {
2024
+ name: string;
2025
+ shader: string;
2026
+ };
2027
+
1472
2028
  }
1473
2029
  declare module "babylonjs-materials/fire/index" {
1474
2030
  export * from "babylonjs-materials/fire/fireMaterial";
@@ -1485,8 +2041,6 @@ import { SubMesh } from "babylonjs/Meshes/subMesh";
1485
2041
  import { Mesh } from "babylonjs/Meshes/mesh";
1486
2042
  import { Scene } from "babylonjs/scene";
1487
2043
  import { IAnimatable } from "babylonjs/Animations/animatable.interface";
1488
- import "babylonjs-materials/fire/fire.fragment";
1489
- import "babylonjs-materials/fire/fire.vertex";
1490
2044
  export class FireMaterial extends PushMaterial {
1491
2045
  private _diffuseTexture;
1492
2046
  diffuseTexture: Nullable<BaseTexture>;
@@ -1498,7 +2052,14 @@ export class FireMaterial extends PushMaterial {
1498
2052
  speed: number;
1499
2053
  private _scaledDiffuse;
1500
2054
  private _lastTime;
1501
- constructor(name: string, scene?: Scene);
2055
+ private _shadersLoaded;
2056
+ /**
2057
+ * Instantiates a Fire Material in the given scene
2058
+ * @param name The friendly name of the material
2059
+ * @param scene The scene to add the material to
2060
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
2061
+ */
2062
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
1502
2063
  needAlphaBlending(): boolean;
1503
2064
  needAlphaTesting(): boolean;
1504
2065
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -1551,6 +2112,43 @@ export const firePixelShader: {
1551
2112
  shader: string;
1552
2113
  };
1553
2114
 
2115
+ }
2116
+ declare module "babylonjs-materials/fire/wgsl/fire.vertex" {
2117
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
2118
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
2119
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
2120
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
2121
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
2122
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
2123
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
2124
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
2125
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
2126
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
2127
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
2128
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
2129
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
2130
+ /** @internal */
2131
+ export const fireVertexShaderWGSL: {
2132
+ name: string;
2133
+ shader: string;
2134
+ };
2135
+
2136
+ }
2137
+ declare module "babylonjs-materials/fire/wgsl/fire.fragment" {
2138
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
2139
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
2140
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
2141
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
2142
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
2143
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
2144
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
2145
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
2146
+ /** @internal */
2147
+ export const firePixelShaderWGSL: {
2148
+ name: string;
2149
+ shader: string;
2150
+ };
2151
+
1554
2152
  }
1555
2153
  declare module "babylonjs-materials/custom/pbrCustomMaterial" {
1556
2154
  import { Texture } from "babylonjs/Materials/Textures/texture";
@@ -2157,8 +2755,6 @@ import { SubMesh } from "babylonjs/Meshes/subMesh";
2157
2755
  import { Mesh } from "babylonjs/Meshes/mesh";
2158
2756
  import { Scene } from "babylonjs/scene";
2159
2757
  import { IAnimatable } from "babylonjs/Animations/animatable.interface";
2160
- import "babylonjs-materials/cell/cell.fragment";
2161
- import "babylonjs-materials/cell/cell.vertex";
2162
2758
  export class CellMaterial extends PushMaterial {
2163
2759
  private _diffuseTexture;
2164
2760
  diffuseTexture: BaseTexture;
@@ -2169,7 +2765,14 @@ export class CellMaterial extends PushMaterial {
2169
2765
  disableLighting: boolean;
2170
2766
  private _maxSimultaneousLights;
2171
2767
  maxSimultaneousLights: number;
2172
- constructor(name: string, scene?: Scene);
2768
+ private _shadersLoaded;
2769
+ /**
2770
+ * Instantiates a Cell Material in the given scene
2771
+ * @param name The friendly name of the material
2772
+ * @param scene The scene to add the material to
2773
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
2774
+ */
2775
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2173
2776
  needAlphaBlending(): boolean;
2174
2777
  needAlphaTesting(): boolean;
2175
2778
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -2231,6 +2834,51 @@ export const cellPixelShader: {
2231
2834
  shader: string;
2232
2835
  };
2233
2836
 
2837
+ }
2838
+ declare module "babylonjs-materials/cell/wgsl/cell.vertex" {
2839
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesDeclaration";
2840
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimationDeclaration";
2841
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesDeclaration";
2842
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertexDeclaration";
2843
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
2844
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertexDeclaration";
2845
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxFragmentDeclaration";
2846
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightVxUboDeclaration";
2847
+ import "babylonjs/ShadersWGSL/ShadersInclude/instancesVertex";
2848
+ import "babylonjs/ShadersWGSL/ShadersInclude/bonesVertex";
2849
+ import "babylonjs/ShadersWGSL/ShadersInclude/bakedVertexAnimation";
2850
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneVertex";
2851
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogVertex";
2852
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsVertex";
2853
+ import "babylonjs/ShadersWGSL/ShadersInclude/vertexColorMixing";
2854
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthVertex";
2855
+ /** @internal */
2856
+ export const cellVertexShaderWGSL: {
2857
+ name: string;
2858
+ shader: string;
2859
+ };
2860
+
2861
+ }
2862
+ declare module "babylonjs-materials/cell/wgsl/cell.fragment" {
2863
+ import "babylonjs/ShadersWGSL/ShadersInclude/helperFunctions";
2864
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightUboDeclaration";
2865
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightsFragmentFunctions";
2866
+ import "babylonjs/ShadersWGSL/ShadersInclude/shadowsFragmentFunctions";
2867
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragmentDeclaration";
2868
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthDeclaration";
2869
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragmentDeclaration";
2870
+ import "babylonjs/ShadersWGSL/ShadersInclude/clipPlaneFragment";
2871
+ import "babylonjs/ShadersWGSL/ShadersInclude/depthPrePass";
2872
+ import "babylonjs/ShadersWGSL/ShadersInclude/lightFragment";
2873
+ import "babylonjs/ShadersWGSL/ShadersInclude/logDepthFragment";
2874
+ import "babylonjs/ShadersWGSL/ShadersInclude/fogFragment";
2875
+ import "babylonjs/ShadersWGSL/ShadersInclude/imageProcessingCompatibility";
2876
+ /** @internal */
2877
+ export const cellPixelShaderWGSL: {
2878
+ name: string;
2879
+ shader: string;
2880
+ };
2881
+
2234
2882
  }
2235
2883
 
2236
2884
  declare module "babylonjs-materials" {
@@ -2331,6 +2979,7 @@ declare namespace BABYLON {
2331
2979
  private _offsetMirror;
2332
2980
  private _tempPlane;
2333
2981
  private _lastTime;
2982
+ private _shadersLoaded;
2334
2983
  private _lastDeltaTime;
2335
2984
  private _waitingRenderList;
2336
2985
  private _imageProcessingConfiguration;
@@ -2344,8 +2993,9 @@ declare namespace BABYLON {
2344
2993
  * @param name
2345
2994
  * @param scene
2346
2995
  * @param renderTargetSize
2996
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
2347
2997
  */
2348
- constructor(name: string, scene?: Scene, renderTargetSize?: Vector2);
2998
+ constructor(name: string, scene?: Scene, renderTargetSize?: Vector2, forceGLSL?: boolean);
2349
2999
  get refractionTexture(): Nullable<RenderTargetTexture>;
2350
3000
  get reflectionTexture(): Nullable<RenderTargetTexture>;
2351
3001
  addToRenderList(node: any): void;
@@ -2387,6 +3037,20 @@ declare namespace BABYLON {
2387
3037
 
2388
3038
 
2389
3039
 
3040
+ /** @internal */
3041
+ export var waterVertexShaderWGSL: {
3042
+ name: string;
3043
+ shader: string;
3044
+ };
3045
+
3046
+
3047
+ /** @internal */
3048
+ export var waterPixelShaderWGSL: {
3049
+ name: string;
3050
+ shader: string;
3051
+ };
3052
+
3053
+
2390
3054
  /** @internal */
2391
3055
  export var triplanarVertexShader: {
2392
3056
  name: string;
@@ -2423,7 +3087,14 @@ declare namespace BABYLON {
2423
3087
  disableLighting: boolean;
2424
3088
  private _maxSimultaneousLights;
2425
3089
  maxSimultaneousLights: number;
2426
- constructor(name: string, scene?: Scene);
3090
+ private _shadersLoaded;
3091
+ /**
3092
+ * Instantiates a TriPlanar Material in the given scene
3093
+ * @param name The friendly name of the material
3094
+ * @param scene The scene to add the material to
3095
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3096
+ */
3097
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2427
3098
  needAlphaBlending(): boolean;
2428
3099
  needAlphaTesting(): boolean;
2429
3100
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -2442,6 +3113,20 @@ declare namespace BABYLON {
2442
3113
 
2443
3114
 
2444
3115
 
3116
+ /** @internal */
3117
+ export var triplanarVertexShaderWGSL: {
3118
+ name: string;
3119
+ shader: string;
3120
+ };
3121
+
3122
+
3123
+ /** @internal */
3124
+ export var triplanarPixelShaderWGSL: {
3125
+ name: string;
3126
+ shader: string;
3127
+ };
3128
+
3129
+
2445
3130
  export class TerrainMaterial extends PushMaterial {
2446
3131
  private _mixTexture;
2447
3132
  mixTexture: BaseTexture;
@@ -2464,7 +3149,14 @@ declare namespace BABYLON {
2464
3149
  disableLighting: boolean;
2465
3150
  private _maxSimultaneousLights;
2466
3151
  maxSimultaneousLights: number;
2467
- constructor(name: string, scene?: Scene);
3152
+ private _shadersLoaded;
3153
+ /**
3154
+ * Instantiates a Terrain Material in the given scene
3155
+ * @param name The friendly name of the material
3156
+ * @param scene The scene to add the material to
3157
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3158
+ */
3159
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2468
3160
  needAlphaBlending(): boolean;
2469
3161
  needAlphaTesting(): boolean;
2470
3162
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -2497,6 +3189,20 @@ declare namespace BABYLON {
2497
3189
 
2498
3190
 
2499
3191
 
3192
+ /** @internal */
3193
+ export var terrainVertexShaderWGSL: {
3194
+ name: string;
3195
+ shader: string;
3196
+ };
3197
+
3198
+
3199
+ /** @internal */
3200
+ export var terrainPixelShaderWGSL: {
3201
+ name: string;
3202
+ shader: string;
3203
+ };
3204
+
3205
+
2500
3206
  /**
2501
3207
  * This is the sky material which allows to create dynamic and texture free effects for skyboxes.
2502
3208
  * @see https://doc.babylonjs.com/toolsAndResources/assetLibraries/materialsLibrary/skyMat
@@ -2561,6 +3267,7 @@ declare namespace BABYLON {
2561
3267
  dithering: boolean;
2562
3268
  private _cameraPosition;
2563
3269
  private _skyOrientation;
3270
+ private _shadersLoaded;
2564
3271
  /**
2565
3272
  * Instantiates a new sky material.
2566
3273
  * This material allows to create dynamic and texture free
@@ -2568,8 +3275,9 @@ declare namespace BABYLON {
2568
3275
  * @see https://doc.babylonjs.com/toolsAndResources/assetLibraries/materialsLibrary/skyMat
2569
3276
  * @param name Define the name of the material in the scene
2570
3277
  * @param scene Define the scene the material belong to
3278
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
2571
3279
  */
2572
- constructor(name: string, scene?: Scene);
3280
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2573
3281
  /**
2574
3282
  * Specifies if the material will require alpha blending
2575
3283
  * @returns a boolean specifying if alpha blending is needed
@@ -2654,6 +3362,20 @@ declare namespace BABYLON {
2654
3362
 
2655
3363
 
2656
3364
 
3365
+ /** @internal */
3366
+ export var skyVertexShaderWGSL: {
3367
+ name: string;
3368
+ shader: string;
3369
+ };
3370
+
3371
+
3372
+ /** @internal */
3373
+ export var skyPixelShaderWGSL: {
3374
+ name: string;
3375
+ shader: string;
3376
+ };
3377
+
3378
+
2657
3379
  export class SimpleMaterial extends PushMaterial {
2658
3380
  private _diffuseTexture;
2659
3381
  diffuseTexture: BaseTexture;
@@ -2662,7 +3384,14 @@ declare namespace BABYLON {
2662
3384
  disableLighting: boolean;
2663
3385
  private _maxSimultaneousLights;
2664
3386
  maxSimultaneousLights: number;
2665
- constructor(name: string, scene?: Scene);
3387
+ private _shadersLoaded;
3388
+ /**
3389
+ * Instantiates a Simple Material in the given scene
3390
+ * @param name The friendly name of the material
3391
+ * @param scene The scene to add the material to
3392
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3393
+ */
3394
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2666
3395
  needAlphaBlending(): boolean;
2667
3396
  needAlphaTesting(): boolean;
2668
3397
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -2695,10 +3424,31 @@ declare namespace BABYLON {
2695
3424
 
2696
3425
 
2697
3426
 
3427
+ /** @internal */
3428
+ export var simpleVertexShaderWGSL: {
3429
+ name: string;
3430
+ shader: string;
3431
+ };
3432
+
3433
+
3434
+ /** @internal */
3435
+ export var simplePixelShaderWGSL: {
3436
+ name: string;
3437
+ shader: string;
3438
+ };
3439
+
3440
+
2698
3441
  export class ShadowOnlyMaterial extends PushMaterial {
2699
3442
  private _activeLight;
2700
3443
  private _needAlphaBlending;
2701
- constructor(name: string, scene?: Scene);
3444
+ private _shadersLoaded;
3445
+ /**
3446
+ * Instantiates a ShadowOnly Material in the given scene
3447
+ * @param name The friendly name of the material
3448
+ * @param scene The scene to add the material to
3449
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3450
+ */
3451
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2702
3452
  shadowColor: Color3;
2703
3453
  needAlphaBlending(): boolean;
2704
3454
  needAlphaTesting(): boolean;
@@ -2731,6 +3481,20 @@ declare namespace BABYLON {
2731
3481
 
2732
3482
 
2733
3483
 
3484
+ /** @internal */
3485
+ export var shadowOnlyVertexShaderWGSL: {
3486
+ name: string;
3487
+ shader: string;
3488
+ };
3489
+
3490
+
3491
+ /** @internal */
3492
+ export var shadowOnlyPixelShaderWGSL: {
3493
+ name: string;
3494
+ shader: string;
3495
+ };
3496
+
3497
+
2734
3498
  export class NormalMaterial extends PushMaterial {
2735
3499
  private _diffuseTexture;
2736
3500
  diffuseTexture: BaseTexture;
@@ -2739,7 +3503,14 @@ declare namespace BABYLON {
2739
3503
  disableLighting: boolean;
2740
3504
  private _maxSimultaneousLights;
2741
3505
  maxSimultaneousLights: number;
2742
- constructor(name: string, scene?: Scene);
3506
+ private _shadersLoaded;
3507
+ /**
3508
+ * Instantiates a Normal Material in the given scene
3509
+ * @param name The friendly name of the material
3510
+ * @param scene The scene to add the material to
3511
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3512
+ */
3513
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2743
3514
  needAlphaBlending(): boolean;
2744
3515
  needAlphaBlendingForMesh(mesh: AbstractMesh): boolean;
2745
3516
  needAlphaTesting(): boolean;
@@ -2773,6 +3544,20 @@ declare namespace BABYLON {
2773
3544
 
2774
3545
 
2775
3546
 
3547
+ /** @internal */
3548
+ export var normalVertexShaderWGSL: {
3549
+ name: string;
3550
+ shader: string;
3551
+ };
3552
+
3553
+
3554
+ /** @internal */
3555
+ export var normalPixelShaderWGSL: {
3556
+ name: string;
3557
+ shader: string;
3558
+ };
3559
+
3560
+
2776
3561
  export class MixMaterial extends PushMaterial {
2777
3562
  /**
2778
3563
  * Mix textures
@@ -2810,7 +3595,14 @@ declare namespace BABYLON {
2810
3595
  disableLighting: boolean;
2811
3596
  private _maxSimultaneousLights;
2812
3597
  maxSimultaneousLights: number;
2813
- constructor(name: string, scene?: Scene);
3598
+ private _shadersLoaded;
3599
+ /**
3600
+ * Instantiates a Mix Material in the given scene
3601
+ * @param name The friendly name of the material
3602
+ * @param scene The scene to add the material to
3603
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3604
+ */
3605
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2814
3606
  needAlphaBlending(): boolean;
2815
3607
  needAlphaTesting(): boolean;
2816
3608
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -2843,6 +3635,20 @@ declare namespace BABYLON {
2843
3635
 
2844
3636
 
2845
3637
 
3638
+ /** @internal */
3639
+ export var mixVertexShaderWGSL: {
3640
+ name: string;
3641
+ shader: string;
3642
+ };
3643
+
3644
+
3645
+ /** @internal */
3646
+ export var mixPixelShaderWGSL: {
3647
+ name: string;
3648
+ shader: string;
3649
+ };
3650
+
3651
+
2846
3652
 
2847
3653
 
2848
3654
 
@@ -2891,7 +3697,14 @@ declare namespace BABYLON {
2891
3697
  private _maxSimultaneousLights;
2892
3698
  maxSimultaneousLights: number;
2893
3699
  private _scaledDiffuse;
2894
- constructor(name: string, scene?: Scene);
3700
+ private _shadersLoaded;
3701
+ /**
3702
+ * Instantiates a Lava Material in the given scene
3703
+ * @param name The friendly name of the material
3704
+ * @param scene The scene to add the material to
3705
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3706
+ */
3707
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
2895
3708
  needAlphaBlending(): boolean;
2896
3709
  needAlphaTesting(): boolean;
2897
3710
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -2924,6 +3737,20 @@ declare namespace BABYLON {
2924
3737
 
2925
3738
 
2926
3739
 
3740
+ /** @internal */
3741
+ export var lavaVertexShaderWGSL: {
3742
+ name: string;
3743
+ shader: string;
3744
+ };
3745
+
3746
+
3747
+ /** @internal */
3748
+ export var lavaPixelShaderWGSL: {
3749
+ name: string;
3750
+ shader: string;
3751
+ };
3752
+
3753
+
2927
3754
 
2928
3755
 
2929
3756
  /**
@@ -2981,8 +3808,10 @@ declare namespace BABYLON {
2981
3808
  * constructor
2982
3809
  * @param name The name given to the material in order to identify it afterwards.
2983
3810
  * @param scene The scene the material is used in.
3811
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
2984
3812
  */
2985
- constructor(name: string, scene?: Scene);
3813
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
3814
+ private _shadersLoaded;
2986
3815
  /**
2987
3816
  * @returns whether or not the grid requires alpha blending.
2988
3817
  */
@@ -3016,6 +3845,20 @@ declare namespace BABYLON {
3016
3845
  };
3017
3846
 
3018
3847
 
3848
+ /** @internal */
3849
+ export var gridVertexShaderWGSL: {
3850
+ name: string;
3851
+ shader: string;
3852
+ };
3853
+
3854
+
3855
+ /** @internal */
3856
+ export var gridPixelShaderWGSL: {
3857
+ name: string;
3858
+ shader: string;
3859
+ };
3860
+
3861
+
3019
3862
 
3020
3863
 
3021
3864
  export class GradientMaterial extends PushMaterial {
@@ -3030,7 +3873,14 @@ declare namespace BABYLON {
3030
3873
  smoothness: number;
3031
3874
  private _disableLighting;
3032
3875
  disableLighting: boolean;
3033
- constructor(name: string, scene?: Scene);
3876
+ private _shadersLoaded;
3877
+ /**
3878
+ * Instantiates a Gradient Material in the given scene
3879
+ * @param name The friendly name of the material
3880
+ * @param scene The scene to add the material to
3881
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3882
+ */
3883
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
3034
3884
  needAlphaBlending(): boolean;
3035
3885
  needAlphaTesting(): boolean;
3036
3886
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -3059,6 +3909,20 @@ declare namespace BABYLON {
3059
3909
  };
3060
3910
 
3061
3911
 
3912
+ /** @internal */
3913
+ export var gradientVertexShaderWGSL: {
3914
+ name: string;
3915
+ shader: string;
3916
+ };
3917
+
3918
+
3919
+ /** @internal */
3920
+ export var gradientPixelShaderWGSL: {
3921
+ name: string;
3922
+ shader: string;
3923
+ };
3924
+
3925
+
3062
3926
 
3063
3927
 
3064
3928
  export class FurMaterial extends PushMaterial {
@@ -3084,7 +3948,14 @@ declare namespace BABYLON {
3084
3948
  highLevelFur: boolean;
3085
3949
  _meshes: AbstractMesh[];
3086
3950
  private _furTime;
3087
- constructor(name: string, scene?: Scene);
3951
+ private _shadersLoaded;
3952
+ /**
3953
+ * Instantiates a Fur Material in the given scene
3954
+ * @param name The friendly name of the material
3955
+ * @param scene The scene to add the material to
3956
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
3957
+ */
3958
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
3088
3959
  get furTime(): number;
3089
3960
  set furTime(furTime: number);
3090
3961
  needAlphaBlending(): boolean;
@@ -3120,6 +3991,20 @@ declare namespace BABYLON {
3120
3991
  };
3121
3992
 
3122
3993
 
3994
+ /** @internal */
3995
+ export var furVertexShaderWGSL: {
3996
+ name: string;
3997
+ shader: string;
3998
+ };
3999
+
4000
+
4001
+ /** @internal */
4002
+ export var furPixelShaderWGSL: {
4003
+ name: string;
4004
+ shader: string;
4005
+ };
4006
+
4007
+
3123
4008
 
3124
4009
 
3125
4010
  export class FireMaterial extends PushMaterial {
@@ -3133,7 +4018,14 @@ declare namespace BABYLON {
3133
4018
  speed: number;
3134
4019
  private _scaledDiffuse;
3135
4020
  private _lastTime;
3136
- constructor(name: string, scene?: Scene);
4021
+ private _shadersLoaded;
4022
+ /**
4023
+ * Instantiates a Fire Material in the given scene
4024
+ * @param name The friendly name of the material
4025
+ * @param scene The scene to add the material to
4026
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
4027
+ */
4028
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
3137
4029
  needAlphaBlending(): boolean;
3138
4030
  needAlphaTesting(): boolean;
3139
4031
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -3164,6 +4056,20 @@ declare namespace BABYLON {
3164
4056
  };
3165
4057
 
3166
4058
 
4059
+ /** @internal */
4060
+ export var fireVertexShaderWGSL: {
4061
+ name: string;
4062
+ shader: string;
4063
+ };
4064
+
4065
+
4066
+ /** @internal */
4067
+ export var firePixelShaderWGSL: {
4068
+ name: string;
4069
+ shader: string;
4070
+ };
4071
+
4072
+
3167
4073
  /**
3168
4074
  * Albedo parts of the shader
3169
4075
  */
@@ -3740,7 +4646,14 @@ declare namespace BABYLON {
3740
4646
  disableLighting: boolean;
3741
4647
  private _maxSimultaneousLights;
3742
4648
  maxSimultaneousLights: number;
3743
- constructor(name: string, scene?: Scene);
4649
+ private _shadersLoaded;
4650
+ /**
4651
+ * Instantiates a Cell Material in the given scene
4652
+ * @param name The friendly name of the material
4653
+ * @param scene The scene to add the material to
4654
+ * @param forceGLSL Use the GLSL code generation for the shader (even on WebGPU). Default is false
4655
+ */
4656
+ constructor(name: string, scene?: Scene, forceGLSL?: boolean);
3744
4657
  needAlphaBlending(): boolean;
3745
4658
  needAlphaTesting(): boolean;
3746
4659
  getAlphaTestTexture(): Nullable<BaseTexture>;
@@ -3771,6 +4684,20 @@ declare namespace BABYLON {
3771
4684
  };
3772
4685
 
3773
4686
 
4687
+ /** @internal */
4688
+ export var cellVertexShaderWGSL: {
4689
+ name: string;
4690
+ shader: string;
4691
+ };
4692
+
4693
+
4694
+ /** @internal */
4695
+ export var cellPixelShaderWGSL: {
4696
+ name: string;
4697
+ shader: string;
4698
+ };
4699
+
4700
+
3774
4701
 
3775
4702
  }
3776
4703