@babylonjs/lite-compat 1.22.0-preview → 1.23.0-preview

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.
package/index.d.ts CHANGED
@@ -1754,6 +1754,10 @@ export declare const Frustum: {
1754
1754
  GetPlanesToRef(transform: Matrix, planes: Plane[]): void;
1755
1755
  };
1756
1756
 
1757
+ export declare class FSR1RenderingPipeline {
1758
+ constructor();
1759
+ }
1760
+
1757
1761
  export declare class FxaaPostProcess {
1758
1762
  constructor();
1759
1763
  }
@@ -1853,6 +1857,18 @@ export declare function GetElementPixelFromUv(): never;
1853
1857
 
1854
1858
  export declare function GetPointsCount(..._args: unknown[]): never;
1855
1859
 
1860
+ /**
1861
+ * Babylon.js `GetSupportedSimultaneousLights(scene, maxSimultaneousLights)`.
1862
+ *
1863
+ * Returns the number of simultaneous lights the engine can actually render, which
1864
+ * may be lower than the requested maximum. Engines that declare one uniform buffer
1865
+ * per light in the vertex shader (WebGPU) are bounded by
1866
+ * `maxUniformBuffersPerShaderStage`; past that limit every pipeline creation is
1867
+ * rejected by the validator and nothing renders. Engines that do not report the
1868
+ * limit leave the requested count untouched.
1869
+ */
1870
+ export declare function GetSupportedSimultaneousLights(scene: Scene, maxSimultaneousLights: number): number;
1871
+
1856
1872
  /** Shared base for compat gizmos (Babylon.js `Gizmo`). */
1857
1873
  declare abstract class GizmoBase {
1858
1874
  protected constructor(layer: UtilityLayerRenderer);
1859
1875
  abstract get attachedMesh(): AbstractMesh | null;
@@ -4676,6 +4692,14 @@ declare interface TextureLike {
4676
4692
  export declare class ThinEngine extends AbstractEngine {
4677
4693
  }
4678
4694
 
4695
+ export declare class ThinFSR1SharpenPostProcess {
4696
+ constructor();
4697
+ }
4698
+
4699
+ export declare class ThinFSR1UpscalePostProcess {
4700
+ constructor();
4701
+ }
4702
+
4679
4703
  /**
4680
4704
  * Babylon.js `ThinSprite` — a lightweight pixel-space sprite drawn by a
4681
4705
  * {@link SpriteRenderer}. Position is in screen pixels (origin bottom-left, +Y
package/index.js CHANGED
@@ -673,7 +673,7 @@ class AbstractEngine {
673
673
  * WebGPU baseline. A headless `NullEngine` has no device, so all flags are off.
674
674
  */
675
675
  getCaps() {
676
- var _a;
676
+ var _a, _b;
677
677
  const device = (_a = this._lite) == null ? void 0 : _a._device;
678
678
  const has = (name) => {
679
679
  var _a2;
@@ -694,6 +694,12 @@ class AbstractEngine {
694
694
  textureHalfFloat: true,
695
695
  textureFloatLinearFiltering: true,
696
696
  maxTextureSize: 8192,
697
+ // Maximum uniform buffers bindable to a single shader stage. BJS reports this
698
+ // only for engines that enforce it as a hard limit (WebGPU); Babylon Lite is
699
+ // WebGPU-only, so it forwards the device's reported limit, and leaves it
700
+ // undefined for a device-less NullEngine — matching BJS's "left undefined
701
+ // elsewhere" contract.
702
+ maxUniformBuffersPerShaderStage: (_b = device == null ? void 0 : device.limits) == null ? void 0 : _b.maxUniformBuffersPerShaderStage,
697
703
  instancedArrays: true,
698
704
  uintIndices: true
699
705
  };
@@ -5788,6 +5794,15 @@ class GridMaterial {
5788
5794
  dispose() {
5789
5795
  }
5790
5796
  }
5797
+ const NON_LIGHT_VERTEX_UNIFORM_BUFFER_COUNT = 4;
5798
+ function GetSupportedSimultaneousLights(scene, maxSimultaneousLights) {
5799
+ const maxUniformBuffersPerShaderStage = scene.getEngine().getCaps().maxUniformBuffersPerShaderStage;
5800
+ if (maxUniformBuffersPerShaderStage == null) {
5801
+ return maxSimultaneousLights;
5802
+ }
5803
+ const supported = Math.max(maxUniformBuffersPerShaderStage - NON_LIGHT_VERTEX_UNIFORM_BUFFER_COUNT, 0);
5804
+ return Math.min(maxSimultaneousLights, supported);
5805
+ }
5791
5806
  const EASINGMODE_EASEIN = 0;
5792
5807
  const EASINGMODE_EASEOUT = 1;
5793
5808
  const EASINGMODE_EASEINOUT = 2;
@@ -7692,6 +7707,21 @@ class SSAO2RenderingPipeline {
7692
7707
  unsupported("SSAO2RenderingPipeline", "SSAO is not implemented in Babylon Lite.");
7693
7708
  }
7694
7709
  }
7710
+ class FSR1RenderingPipeline {
7711
+ constructor() {
7712
+ unsupported("FSR1RenderingPipeline", "FSR 1 upscaling is not implemented in Babylon Lite; it has no PostProcessRenderPipeline subsystem.");
7713
+ }
7714
+ }
7715
+ class ThinFSR1UpscalePostProcess {
7716
+ constructor() {
7717
+ unsupported("ThinFSR1UpscalePostProcess", "FSR 1 (EASU) upscaling is not implemented in Babylon Lite.");
7718
+ }
7719
+ }
7720
+ class ThinFSR1SharpenPostProcess {
7721
+ constructor() {
7722
+ unsupported("ThinFSR1SharpenPostProcess", "FSR 1 (RCAS) sharpening is not implemented in Babylon Lite.");
7723
+ }
7724
+ }
7695
7725
  class ParticleHelper {
7696
7726
  constructor() {
7697
7727
  unsupported(
@@ -8225,6 +8255,7 @@ export {
8225
8255
  ExecuteCodeAction,
8226
8256
  ExponentialEase,
8227
8257
  FBXFileLoader,
8258
+ FSR1RenderingPipeline,
8228
8259
  FactorGradient,
8229
8260
  FadeInOutBehavior,
8230
8261
  FlyCamera,
@@ -8245,6 +8276,7 @@ export {
8245
8276
  GeospatialClippingBehavior,
8246
8277
  GetElementPixelFromUv,
8247
8278
  GetPointsCount,
8279
+ GetSupportedSimultaneousLights,
8248
8280
  GizmoManager,
8249
8281
  GlowLayer,
8250
8282
  GreasedLineBaseMesh,
@@ -8394,6 +8426,8 @@ export {
8394
8426
  TargetCamera,
8395
8427
  Texture,
8396
8428
  ThinEngine,
8429
+ ThinFSR1SharpenPostProcess,
8430
+ ThinFSR1UpscalePostProcess,
8397
8431
  ThinSprite,
8398
8432
  ToDegrees,
8399
8433
  ToRadians,