@navaramap/three 0.0.5 → 0.0.6

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 (58) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/fontWorker-JfTCpd38.js +2 -0
  3. package/dist/assets/fontWorker-JfTCpd38.js.map +1 -0
  4. package/dist/assets/{index-TKhRxurv.js → index-B3U_DvcP.js} +2 -2
  5. package/dist/assets/index-B3U_DvcP.js.map +1 -0
  6. package/dist/assets/{navara_wasm_font_worker_bg-Kk06ArRB.wasm → navara_wasm_font_worker_bg-DympKYVX.wasm} +0 -0
  7. package/dist/assets/{navara_wasm_worker_bg-BZjLKf4i.wasm → navara_wasm_worker_bg-Bx_l45cW.wasm} +0 -0
  8. package/dist/index.d.ts +510 -374
  9. package/dist/index.js +6150 -5810
  10. package/dist/index.js.map +1 -1
  11. package/dist/index.umd.cjs +1188 -793
  12. package/dist/index.umd.cjs.map +1 -1
  13. package/package.json +12 -12
  14. package/src/core/DescRegistry.ts +3 -2
  15. package/src/core/EffectDesc.ts +10 -0
  16. package/src/core/EffectDescRegistry.ts +14 -0
  17. package/src/core/MeshDesc.ts +39 -2
  18. package/src/core/MeshDescWithSelectiveEffect.ts +14 -2
  19. package/src/core/ViewContext.ts +116 -7
  20. package/src/device.ts +4 -2
  21. package/src/index.ts +123 -11
  22. package/src/layer.ts +7 -5
  23. package/src/layers/effect/MRTPassEffectDesc.ts +34 -3
  24. package/src/layers/effect/SelectiveEffectDesc.ts +10 -2
  25. package/src/layers/effect/TransparentPassEffectDesc.ts +5 -4
  26. package/src/layersManager.ts +32 -1
  27. package/src/material/enhancer/model/modelBaseEnhancer/shader.ts +3 -2
  28. package/src/material/enhancer/polygon/polygonBaseEnhancer/index.ts +0 -6
  29. package/src/material/enhancer/polygon/polygonBaseEnhancer/mutates.ts +0 -6
  30. package/src/material/enhancer/polygon/polygonBaseEnhancer/shader.ts +4 -10
  31. package/src/material/enhancer/polygon/polygonBaseEnhancer/state.ts +1 -4
  32. package/src/material/enhancer/polygon/polygonBaseEnhancer/types.ts +0 -9
  33. package/src/material/enhancer/sdfText/sdfTextBaseEnhancer/coverage.ts +31 -0
  34. package/src/material/enhancer/sdfText/sdfTextBaseEnhancer/shader.test.ts +75 -0
  35. package/src/material/enhancer/sdfText/sdfTextBaseEnhancer/shader.ts +26 -0
  36. package/src/material/enhancer/sdfText/sdfTextBaseEnhancer/types.ts +1 -1
  37. package/src/material/gbufferLayout.test.ts +171 -0
  38. package/src/material/gbufferLayout.ts +298 -0
  39. package/src/material/index.ts +1 -0
  40. package/src/material/macro/tileShader.test.ts +35 -33
  41. package/src/material/macro/tileShader.ts +33 -10
  42. package/src/material/overrideMaterialsForMRT.ts +113 -71
  43. package/src/mesh/DrapedMesh.test.ts +57 -0
  44. package/src/mesh/DrapedMesh.ts +82 -0
  45. package/src/mesh/model.ts +3 -0
  46. package/src/mesh/polygon.ts +3 -2
  47. package/src/mesh/polyline.ts +3 -0
  48. package/src/mesh/sdfText/layout.ts +1 -3
  49. package/src/mesh/tile/index.ts +8 -4
  50. package/src/passes/CustomRenderPass.test.ts +143 -0
  51. package/src/passes/CustomRenderPass.ts +273 -30
  52. package/src/passes/RenderTargetCopyPass.ts +6 -0
  53. package/src/plugins/AttributionPlugin/index.ts +3 -2
  54. package/src/shaders/index.ts +16 -0
  55. package/src/type/index.ts +9 -51
  56. package/dist/assets/fontWorker-OwvKiQ8o.js +0 -2
  57. package/dist/assets/fontWorker-OwvKiQ8o.js.map +0 -1
  58. package/dist/assets/index-TKhRxurv.js.map +0 -1
package/dist/index.d.ts CHANGED
@@ -114,6 +114,12 @@ export declare type AnyMeshConfig = MeshConfig;
114
114
  /** The mesh descriptor hierarchy. */
115
115
  export declare type AnyMeshDesc = MeshDesc;
116
116
 
117
+ /** Split out so `CustomRenderPass` can rebuild a target around a reused color. */
118
+ export declare function appendOptionalGBufferAttachments(renderTarget: WebGLRenderTarget, buffers: ResolvedGBufferOptions): void;
119
+
120
+ /** Applies a material's three-state `lit` option. */
121
+ export declare function applyLitOption(material: Material, lit: boolean | undefined): void;
122
+
117
123
  /** Creates the per-tile MRT trio. Injected so tests can supply fakes. */
118
124
  declare type AtlasFactory = (size: number) => CompositeAtlas;
119
125
 
@@ -737,23 +743,6 @@ declare type AVAILABLE_SHADERS_9 = typeof AVAILABLE_SHADERS_9;
737
743
 
738
744
  declare type AvailableMaterialProperty = ExtractProperties<PointMaterial & PolylineMaterial & PolygonMaterial & ModelMaterial_2 & TextMaterial>;
739
745
 
740
- export declare type B3dmLayer = WithColorSupport<Layer_2<B3dmLayerDescription & {
741
- type: "b3dm";
742
- }>>;
743
-
744
- declare class B3dmLayerDescription {
745
- private constructor();
746
- free(): void;
747
- [Symbol.dispose](): void;
748
- get crs(): string | undefined;
749
- set crs(value: string | null | undefined);
750
- data: any;
751
- get model(): ModelMaterial_2 | undefined;
752
- set model(value: ModelMaterial_2 | null | undefined);
753
- get type(): string | undefined;
754
- set type(value: string | null | undefined);
755
- }
756
-
757
746
  /** A `b3dm` source: a single Batched 3D Model tile. */
758
747
  export declare type B3dmSource = SourceBase & WithColorSupport<Layer_2<Tiles3dSourceDescription & {
759
748
  type: "b3dm";
@@ -1587,23 +1576,6 @@ declare class CameraStatus {
1587
1576
 
1588
1577
  export { CascadedShadowMaps }
1589
1578
 
1590
- export declare type Cesium3dTilesLayer = WithColorSupport<Layer_2<Cesium3dTilesLayerDescription & {
1591
- type: "cesium3dtiles";
1592
- }>>;
1593
-
1594
- declare class Cesium3dTilesLayerDescription {
1595
- private constructor();
1596
- free(): void;
1597
- [Symbol.dispose](): void;
1598
- get crs(): string | undefined;
1599
- set crs(value: string | null | undefined);
1600
- data: any;
1601
- get model(): ModelMaterial_2 | undefined;
1602
- set model(value: ModelMaterial_2 | null | undefined);
1603
- get type(): string | undefined;
1604
- set type(value: string | null | undefined);
1605
- }
1606
-
1607
1579
  export declare const CLOUD_LOCAL_WEATHER_URL: string;
1608
1580
 
1609
1581
  export declare const CLOUD_SHAPE_DETAIL_URL: string;
@@ -1832,6 +1804,12 @@ declare type CompositeOutputs = {
1832
1804
  normal: Texture;
1833
1805
  };
1834
1806
 
1807
+ /** Defines enabling the optional outputs and carrying their locations. */
1808
+ export declare function computeGBufferDefines(buffers: ResolvedGBufferOptions): Readonly<Record<string, number>>;
1809
+
1810
+ /** Computes the attachment indices for resolved `buffers` options. */
1811
+ export declare function computeGBufferTextureIndex(buffers: ResolvedGBufferOptions): GBufferTextureIndex;
1812
+
1835
1813
  declare type ConcurrencyManager = {
1836
1814
  /** Total concurrency */
1837
1815
  total: number;
@@ -2169,6 +2147,12 @@ export declare function createFullscreenQuad(): {
2169
2147
  geometry: PlaneGeometry;
2170
2148
  };
2171
2149
 
2150
+ /**
2151
+ * Allocates the extra attachments in {@link computeGBufferTextureIndex} order.
2152
+ * Disabled buffers get no placeholder texture.
2153
+ */
2154
+ export declare function createGBufferAttachments(renderTarget: WebGLRenderTarget, buffers: ResolvedGBufferOptions): void;
2155
+
2172
2156
  /**
2173
2157
  * Factory function to create the instancedSprite material enhancer.
2174
2158
  *
@@ -2406,12 +2390,64 @@ export declare class CustomRenderPass extends RenderPass {
2406
2390
  private shadowScene;
2407
2391
  private dummyShadowRenderTarget;
2408
2392
  private debugNormalCopyPass?;
2393
+ private readonly gbufferScenes;
2394
+ private readonly forwardScenes;
2395
+ private readonly stampScenes;
2409
2396
  private allowTransparent;
2397
+ private buffers;
2398
+ private sceneLit;
2399
+ private inputBufferTemplate;
2400
+ /**
2401
+ * Attachment indices of `gbufferRenderTarget.textures` for this view.
2402
+ * Recomputed by {@link setBuffers}.
2403
+ */
2404
+ textureIndex: GBufferTextureIndex;
2405
+ private gbufferDefines;
2406
+ private gbufferDefinesStamped;
2407
+ private litStamped;
2408
+ private stampDirty;
2409
+ private globeNormalActive;
2410
+ private readonly globeNormalUniform;
2411
+ private width;
2412
+ private height;
2413
+ private lastProgramCount;
2414
+ private readonly lastSceneChildCounts;
2410
2415
  constructor(scenes: Scenes, camera: PerspectiveCamera, inputBuffer: WebGLRenderTarget, globe: Globe, options?: CustomRenderPassOptions);
2416
+ /**
2417
+ * Re-points the copy passes at the normal attachment. The attachment is
2418
+ * freshly allocated on every {@link setBuffers}, so the reference cannot be
2419
+ * captured once.
2420
+ */
2421
+ private bindNormalTexture;
2411
2422
  protected _renderWithLight(renderer: WebGLRenderer, scene: Scene): void;
2423
+ /**
2424
+ * Applies a new derived buffer configuration. Attachment locations may have
2425
+ * shifted, so every material is re-stamped and its shader recompiled.
2426
+ */
2427
+ setBuffers(buffers: ResolvedGBufferOptions): void;
2428
+ /** Applies a new scene-level `lit` default (`view.lit` changed). */
2429
+ setLit(lit: boolean): void;
2430
+ /**
2431
+ * O(1) gate keeping the stamping traversal off the per-frame path. The
2432
+ * program count catches deeply-nested async additions (a glTF populating a
2433
+ * scene-resident group): a material must compile before it can render, so
2434
+ * the traversal converges one frame later.
2435
+ */
2436
+ private shouldStampGBufferDefines;
2437
+ private stampGBufferDefines;
2438
+ private forEachMaterial;
2439
+ private stampGBufferDefine;
2440
+ /** Per-material `lit` (NVR_LIT / NVR_UNLIT) wins over this in the shader. */
2441
+ private stampLitDefine;
2412
2442
  render(renderer: WebGLRenderer, inputBuffer: WebGLRenderTarget | null, _outputBuffer: WebGLRenderTarget | null): void;
2413
2443
  setDepthTexture(): void;
2414
2444
  setSize(width: number, height: number): void;
2445
+ /**
2446
+ * Grows the globe-normal copy target only while something consumes it, and
2447
+ * shrinks it back to 1x1 otherwise — at full resolution it is a screen-sized
2448
+ * RGBA16F target, the same cost again as the G-buffer's normal attachment.
2449
+ */
2450
+ private setGlobeNormalActive;
2415
2451
  protected _renderDrapedMesh(renderer: WebGLRenderer): void;
2416
2452
  }
2417
2453
 
@@ -2422,6 +2458,14 @@ export declare type CustomRenderPassOptions = {
2422
2458
  debugNormal?: boolean;
2423
2459
  disableShadow?: boolean;
2424
2460
  allowTransparent?: boolean;
2461
+ /** G-buffer attachment configuration. Defaults to all optional buffers disabled. */
2462
+ buffers?: ResolvedGBufferOptions;
2463
+ /**
2464
+ * Scene-level default of the `lit` material option (`view.lit`). When
2465
+ * `false`, materials without an explicit `lit` output plain albedo.
2466
+ * @defaultValue true
2467
+ */
2468
+ lit?: boolean;
2425
2469
  };
2426
2470
 
2427
2471
  declare class DataRequesterRemovedEvent {
@@ -2717,6 +2761,12 @@ declare class DelegatedWorkerTasksResult {
2717
2761
  set upsample_terrain_mesh(value: UpsampleTerrainMeshResult | null | undefined);
2718
2762
  }
2719
2763
 
2764
+ /**
2765
+ * Three's `packing` chunk, for the MRT pass's packed depth buffers – check
2766
+ * `depthBufferPacking` / `globeDepthBufferPacking` for the packing in use.
2767
+ */
2768
+ export declare const DEPTH_PACKING_SHADER: string;
2769
+
2720
2770
  /**
2721
2771
  * Base abstract class for all registry types in the Navara system.
2722
2772
  * Provides common functionality for registering, creating, and managing different types of components.
@@ -2761,9 +2811,10 @@ export declare abstract class DescRegistry<TConstructor, TInstance, TConfig exte
2761
2811
  */
2762
2812
  findTypeFromConfig(config: Record<string, unknown>): string | null;
2763
2813
  /**
2764
- * Get constructor by name (protected method for subclasses)
2814
+ * Get constructor by name. Public so `ViewContext.findLight`/`findMesh`
2815
+ * can resolve a registered key to its descriptor class.
2765
2816
  */
2766
- protected getConstructor(name: string): TConstructor | undefined;
2817
+ getConstructor(name: string): TConstructor | undefined;
2767
2818
  }
2768
2819
 
2769
2820
  declare type Description = {
@@ -2806,6 +2857,13 @@ export declare class DrapedMesh<TGeometry extends BufferGeometry = BufferGeometr
2806
2857
  * Run the stencil-test draping passes for this mesh.
2807
2858
  * The caller supplies a `render` callback that performs the actual draw call
2808
2859
  * (e.g. `renderer.render(scene, camera)`).
2860
+ *
2861
+ * The final pass draws every back face with the depth test off, so a pixel
2862
+ * can be covered several times where the volume folds over a peak. The
2863
+ * shading must therefore not depend on world position, or the far face
2864
+ * shows through the near one — hence the screen-space normal from
2865
+ * {@link setupMaterialForDrape} and the forced-off `receiveShadow`. The
2866
+ * terrain underneath keeps its own shadows; only the drape stays lit.
2809
2867
  */
2810
2868
  process(render: () => void): void;
2811
2869
  }
@@ -3035,6 +3093,15 @@ export declare abstract class EffectDesc<Config extends EffectConfig = EffectCon
3035
3093
  static insertBefore?: string[];
3036
3094
  /** Set to `true` to allow multiple instances of this effect in the pipeline. */
3037
3095
  static allowDuplication?: boolean;
3096
+ /**
3097
+ * Optional G-buffer attachments this effect reads. The view derives its
3098
+ * G-buffer configuration as the union of these across active effects:
3099
+ * adding an effect allocates what it needs, removing the last effect that
3100
+ * needs a buffer releases it. Changing the configuration reallocates
3101
+ * attachments and recompiles shaders, so add effects once and tune them
3102
+ * via `update()` instead of re-adding.
3103
+ */
3104
+ static requiredBuffers?: readonly GBufferName[];
3038
3105
  private instanceId;
3039
3106
  constructor(view: ThreeView, ctx: ViewContext, config?: Config);
3040
3107
  /**
@@ -3081,6 +3148,11 @@ export declare class EffectDescRegistry extends DescRegistry<EffectDescConstruct
3081
3148
  * Find mesh type from config (alias for findTypeFromConfig for backward compatibility)
3082
3149
  */
3083
3150
  findEffectType(config: Record<string, unknown>): string | null;
3151
+ /**
3152
+ * Optional G-buffer attachments the effect type declares via the
3153
+ * `requiredBuffers` static (empty when it declares none).
3154
+ */
3155
+ getRequiredBuffers(effectType: string): readonly GBufferName[];
3084
3156
  }
3085
3157
 
3086
3158
  export declare type EffectEvents = {
@@ -3700,6 +3772,133 @@ export { FontFamily }
3700
3772
 
3701
3773
  export { FontWorkerMemoryStats }
3702
3774
 
3775
+ /**
3776
+ * The subset backed by an MRT attachment. `globeNormal` is not one of them —
3777
+ * it is a separate copy target — so it must not take an attachment slot, a
3778
+ * `*_LOCATION` define, or a `MAX_DRAW_BUFFERS` slot.
3779
+ */
3780
+ export declare const GBUFFER_ATTACHMENT_NAMES: readonly ["normal", "selectiveEffect", "emissive", "shadow"];
3781
+
3782
+ /** Stampers iterate this so defines of disabled buffers are cleared, not left stale. */
3783
+ export declare const GBUFFER_DEFINE_NAMES: readonly ["GBUFFER_NORMAL_LOCATION", "USE_GBUFFER_SELECTIVE_EFFECT", "GBUFFER_EFFECT_ID_LOCATION", "USE_GBUFFER_EMISSIVE", "GBUFFER_EMISSIVE_LOCATION", "USE_GBUFFER_SHADOW", "GBUFFER_SHADOW_LOCATION"];
3784
+
3785
+ /** Output location of the effectIds buffer. Mirrored in the GLSL chunk. */
3786
+ export declare const GBUFFER_EFFECT_ID_LOCATION_DEFINE = "GBUFFER_EFFECT_ID_LOCATION";
3787
+
3788
+ /**
3789
+ * Selective-effect writes for built-in `ShaderLib` materials. The tile mesh
3790
+ * replaces this by exact string match with
3791
+ * `TILE_EMISSIVE_EFFECT_BUFFER_REPLACEMENT`.
3792
+ *
3793
+ * Effect writes are always macro invocations: the macros own the alpha, which
3794
+ * is the per-attachment blend factor rather than data (see the pars chunk).
3795
+ */
3796
+ export declare const GBUFFER_EFFECT_WRITE_BUILTIN = "GBUFFER_WRITE_EFFECT(uEffectIdsMask, diffuseColor.rgb * uEmissiveIntensity + emissive)";
3797
+
3798
+ /**
3799
+ * Selective-effect writes for materials that support the effect-id mask but
3800
+ * not emissive (LineMaterial, sprite, points).
3801
+ */
3802
+ export declare const GBUFFER_EFFECT_WRITE_ID_ONLY = "GBUFFER_WRITE_EFFECT_ID_ONLY(uEffectIdsMask)";
3803
+
3804
+ /**
3805
+ * Selective-effect writes for custom `ShaderMaterial`
3806
+ * (emissive = (fragColor + uEmissiveColor) × intensity).
3807
+ */
3808
+ export declare const GBUFFER_EFFECT_WRITE_SHADER_MATERIAL = "GBUFFER_WRITE_EFFECT(uEffectIdsMask, (gl_FragColor.rgb + uEmissiveColor) * uEmissiveIntensity)";
3809
+
3810
+ /** Non-selective default — A=0.0, so a blended mesh keeps what is behind it. */
3811
+ export declare const GBUFFER_EFFECT_WRITE_ZERO = "GBUFFER_WRITE_EFFECT_ZERO";
3812
+
3813
+ /** Output location of the emissive buffer. Mirrored in the GLSL chunk. */
3814
+ export declare const GBUFFER_EMISSIVE_LOCATION_DEFINE = "GBUFFER_EMISSIVE_LOCATION";
3815
+
3816
+ /** Output location of the normal buffer. Mirrored in the GLSL chunk. */
3817
+ export declare const GBUFFER_NORMAL_LOCATION_DEFINE = "GBUFFER_NORMAL_LOCATION";
3818
+
3819
+ /**
3820
+ * `normalBuffer` write for non-physical materials (basic/lambert/phong).
3821
+ * `polygonBaseEnhancer` matches/replaces this exact string.
3822
+ */
3823
+ export declare const GBUFFER_NORMAL_WRITE_BASIC = "GBUFFER_WRITE_NORMAL(normal, reflectivity, roughnessFactor)";
3824
+
3825
+ /**
3826
+ * `normalBuffer` write for physically-based materials (standard/physical).
3827
+ * `modelBaseEnhancer` matches/replaces this exact string.
3828
+ */
3829
+ export declare const GBUFFER_NORMAL_WRITE_PHYSICAL = "GBUFFER_WRITE_NORMAL(normal, metalnessFactor, roughnessFactor)";
3830
+
3831
+ /**
3832
+ * Inject once near the top of any fragment shader rendering into the
3833
+ * G-buffer. Raw `.glsl` shaders `#include` the chunk instead.
3834
+ */
3835
+ export declare const GBUFFER_PARS_FRAGMENT: string;
3836
+
3837
+ /** Output location of the shadow buffer. Mirrored in the GLSL chunk. */
3838
+ export declare const GBUFFER_SHADOW_LOCATION_DEFINE = "GBUFFER_SHADOW_LOCATION";
3839
+
3840
+ /** The only attachment that always exists. The rest are packed after it. */
3841
+ export declare const GBUFFER_TEXTURE_INDEX: {
3842
+ readonly color: 0;
3843
+ };
3844
+
3845
+ /** Names an effect can declare in `requiredBuffers`. */
3846
+ export declare type GBufferName = "normal" | "selectiveEffect" | "emissive" | "shadow" | "globeNormal";
3847
+
3848
+ /**
3849
+ * Per-view buffer configuration. Not set by the user - derived as the union
3850
+ * of the active effects' `requiredBuffers`. A disabled buffer costs nothing:
3851
+ * neither the storage nor the shader-side writes exist. Only
3852
+ * {@link GBUFFER_ATTACHMENT_NAMES} are MRT attachments.
3853
+ */
3854
+ export declare type GBufferOptions = {
3855
+ /**
3856
+ * The view-space normal buffer (RG=octahedral normal, B=metalness or
3857
+ * reflectivity, A=roughness *and* the blend factor). Required by every
3858
+ * normal-reading effect (aerial perspective, SSR, fog light) and, via
3859
+ * {@link globeNormal}, by draped meshes.
3860
+ */
3861
+ normal?: boolean;
3862
+ /**
3863
+ * The selective-effect id buffer (R=bitmask), required by buffer-based
3864
+ * selective effects (`selectiveBloom`, `selectiveOutline`).
3865
+ */
3866
+ selectiveEffect?: boolean;
3867
+ /**
3868
+ * The HDR emissive buffer (RGB=emissive), required by `selectiveBloom`
3869
+ * extraction.
3870
+ */
3871
+ emissive?: boolean;
3872
+ /**
3873
+ * The shadow buffer (R=directional/CSM shadow amount, 0=lit,
3874
+ * 1=fully shadowed). No built-in effect requires it – declare it from a
3875
+ * custom effect's `requiredBuffers` to read per-pixel shadowing.
3876
+ */
3877
+ shadow?: boolean;
3878
+ /**
3879
+ * The globe normal copy (the terrain's view-space normal, sampled in screen
3880
+ * space). Kept at 1x1 unless a draped mesh needs it, so an effect reading
3881
+ * `getGlobeNormalTexture()` has to declare it.
3882
+ */
3883
+ globeNormal?: boolean;
3884
+ };
3885
+
3886
+ /**
3887
+ * Attachment indices for one view. A disabled buffer is absent rather than a
3888
+ * placeholder, so these shift — never hardcode them.
3889
+ */
3890
+ export declare type GBufferTextureIndex = {
3891
+ color: typeof GBUFFER_TEXTURE_INDEX.color;
3892
+ /** Present only when `buffers.normal` is enabled. */
3893
+ normal?: number;
3894
+ /** Present only when `buffers.selectiveEffect` is enabled. */
3895
+ effectIds?: number;
3896
+ /** Present only when `buffers.emissive` is enabled. */
3897
+ emissive?: number;
3898
+ /** Present only when `buffers.shadow` is enabled. */
3899
+ shadow?: number;
3900
+ };
3901
+
3703
3902
  /**
3704
3903
  * Goes after `#include <common>` in the fragment shader. Declares the three
3705
3904
  * atlas samplers + the per-slot uniform arrays we still index by winning
@@ -3717,7 +3916,7 @@ export declare function generateTileCommonInjection(numTextures: number): string
3717
3916
  * generateTileEmissiveBuffer below to decide what gets written to the
3718
3917
  * emissive/effect MRT attachments).
3719
3918
  */
3720
- export declare function generateTileMapFragment(maxTextures: number): string;
3919
+ export declare function generateTileMapFragment(maxTextures: number, features: TileShaderFeatures): string;
3721
3920
 
3722
3921
  /**
3723
3922
  * Goes in place of `#include <normal_fragment_maps>`. When the atlas carries
@@ -3741,52 +3940,6 @@ export declare function geodeticSurfaceNormal(lle: LatLngHeight): Vector3;
3741
3940
  */
3742
3941
  export declare function geodeticToVector3(lle: LatLngHeight): Vector3;
3743
3942
 
3744
- export declare type GeoJsonLayer = WithColorSupport<Layer_2<GeoJsonLayerDescription & {
3745
- type: "geojson";
3746
- }>>;
3747
-
3748
- /**
3749
- * GeoJSON layer description for configuring feature rendering.
3750
- *
3751
- * **Note**: Model appearance is intentionally not supported for GeoJSON layers.
3752
- * The batched feature pipeline requires per-batch coordinate transforms (model matrices)
3753
- * and animation support, which are incompatible with the current GeoJSON batching approach.
3754
- * For 3D model rendering at geographic coordinates, use a mesh description (e.g. `GLTFModelDesc`)
3755
- * instead.
3756
- */
3757
- declare class GeoJsonLayerDescription {
3758
- private constructor();
3759
- free(): void;
3760
- [Symbol.dispose](): void;
3761
- get billboard(): BillboardMaterial | undefined;
3762
- set billboard(value: BillboardMaterial | null | undefined);
3763
- get crs(): string | undefined;
3764
- set crs(value: string | null | undefined);
3765
- data: any;
3766
- /**
3767
- * Per-layer horizon dynamic-SSE relaxation strength for the tiled render
3768
- * path (`0.0` off … `1.0` raster-equivalent). Omit for a content-based
3769
- * default.
3770
- */
3771
- get dynamicSseScale(): number | undefined;
3772
- /**
3773
- * Per-layer horizon dynamic-SSE relaxation strength for the tiled render
3774
- * path (`0.0` off … `1.0` raster-equivalent). Omit for a content-based
3775
- * default.
3776
- */
3777
- set dynamicSseScale(value: number | null | undefined);
3778
- get point(): PointMaterial | undefined;
3779
- set point(value: PointMaterial | null | undefined);
3780
- get polygon(): PolygonMaterial | undefined;
3781
- set polygon(value: PolygonMaterial | null | undefined);
3782
- get polyline(): PolylineMaterial | undefined;
3783
- set polyline(value: PolylineMaterial | null | undefined);
3784
- get text(): TextMaterial | undefined;
3785
- set text(value: TextMaterial | null | undefined);
3786
- get type(): string | undefined;
3787
- set type(value: string | null | undefined);
3788
- }
3789
-
3790
3943
  /** A `geojson` source: inline GeoJSON, or GeoJSON fetched from a `url`. */
3791
3944
  export declare type GeoJsonSource = SourceBase & Omit<WithColorSupport<Layer_2<GeoJsonSourceDescription & {
3792
3945
  type: "geojson";
@@ -4722,12 +4875,14 @@ export declare type LatLngHeight = Required<NormalizeWASMClass<LLE>>;
4722
4875
  *
4723
4876
  * @example
4724
4877
  * ```typescript
4725
- * // Add a GeoJSON layer
4726
- * const geoJsonLayer = view.addLayer({
4878
+ * // Register a GeoJSON source, then render it with a vector layer
4879
+ * const geoJsonSource = view.addSource({
4727
4880
  * type: "geojson",
4728
- * data: {
4729
- * url: "https://example.com/data.geojson",
4730
- * },
4881
+ * url: "https://example.com/data.geojson",
4882
+ * });
4883
+ * const geoJsonLayer = view.addLayer({
4884
+ * type: "vector",
4885
+ * source: geoJsonSource,
4731
4886
  * point: { color: 0xff0000 }
4732
4887
  * });
4733
4888
  *
@@ -4776,7 +4931,7 @@ export declare class Layer extends EventHandler<LayerEvent> {
4776
4931
 
4777
4932
  declare type Layer_2<LD> = NormalizeWASMClass<LD>;
4778
4933
 
4779
- export declare type LayerDescription = TilesLayer | TerrainLayer | GeoJsonLayer | B3dmLayer | PntsLayer | Cesium3dTilesLayer | MvtLayer | VectorLayer | RasterLayer | TerrainSourceLayer | Tiles3dLayer;
4934
+ export declare type LayerDescription = VectorLayer | RasterLayer | TerrainSourceLayer | Tiles3dLayer;
4780
4935
 
4781
4936
  /**
4782
4937
  * Events emitted by Layer. Subscribe using `layer.on(eventName, callback)`.
@@ -4808,6 +4963,8 @@ declare class LayersManager {
4808
4963
  emitAll<K extends keyof LayerEvent>(k: K, ...args: Parameters<LayerEvent[K]>): void;
4809
4964
  getResourceLayers(): Generator<Layer, void, unknown>;
4810
4965
  getEffectDescs(): Generator<EffectHandle>;
4966
+ getLightDescs(): Generator<LightHandle>;
4967
+ getMeshDescs(): Generator<MeshHandle>;
4811
4968
  }
4812
4969
 
4813
4970
  declare type LayoutOptions = {
@@ -4821,178 +4978,6 @@ declare type LayoutOptions = {
4821
4978
  textAlign: number;
4822
4979
  };
4823
4980
 
4824
- declare class LegacyElevationHeatmapMaterial {
4825
- private constructor();
4826
- free(): void;
4827
- [Symbol.dispose](): void;
4828
- get elevationDecoder(): ElevationDecoder | undefined;
4829
- set elevationDecoder(value: ElevationDecoder | null | undefined);
4830
- get logBoundary(): number | undefined;
4831
- set logBoundary(value: number | null | undefined);
4832
- get logarithmic(): boolean | undefined;
4833
- set logarithmic(value: boolean | null | undefined);
4834
- get maxHeight(): number | undefined;
4835
- set maxHeight(value: number | null | undefined);
4836
- get minHeight(): number | undefined;
4837
- set minHeight(value: number | null | undefined);
4838
- }
4839
-
4840
- declare class LegacyEllipsoidTerrainMaterial {
4841
- private constructor();
4842
- free(): void;
4843
- [Symbol.dispose](): void;
4844
- get castShadow(): boolean | undefined;
4845
- set castShadow(value: boolean | null | undefined);
4846
- get maxZoom(): number | undefined;
4847
- set maxZoom(value: number | null | undefined);
4848
- get minZoom(): number | undefined;
4849
- set minZoom(value: number | null | undefined);
4850
- get receiveShadow(): boolean | undefined;
4851
- set receiveShadow(value: boolean | null | undefined);
4852
- get showBoundingBox(): boolean | undefined;
4853
- set showBoundingBox(value: boolean | null | undefined);
4854
- }
4855
-
4856
- declare class LegacyHillshadeMaterial {
4857
- private constructor();
4858
- free(): void;
4859
- [Symbol.dispose](): void;
4860
- get elevationDecoder(): ElevationDecoder | undefined;
4861
- set elevationDecoder(value: ElevationDecoder | null | undefined);
4862
- /**
4863
- * Exaggeration factor for hillshade effect (default: 1.0)
4864
- */
4865
- get exaggeration(): number | undefined;
4866
- /**
4867
- * Exaggeration factor for hillshade effect (default: 1.0)
4868
- */
4869
- set exaggeration(value: number | null | undefined);
4870
- }
4871
-
4872
- declare class LegacyQuantizedMeshTerrainMaterial {
4873
- private constructor();
4874
- free(): void;
4875
- [Symbol.dispose](): void;
4876
- get castShadow(): boolean | undefined;
4877
- set castShadow(value: boolean | null | undefined);
4878
- get geographic(): boolean | undefined;
4879
- set geographic(value: boolean | null | undefined);
4880
- get maxZoom(): number | undefined;
4881
- set maxZoom(value: number | null | undefined);
4882
- get minZoom(): number | undefined;
4883
- set minZoom(value: number | null | undefined);
4884
- get overscaledMaxZoom(): number | undefined;
4885
- set overscaledMaxZoom(value: number | null | undefined);
4886
- get receiveShadow(): boolean | undefined;
4887
- set receiveShadow(value: boolean | null | undefined);
4888
- get requestVertexNormals(): boolean | undefined;
4889
- set requestVertexNormals(value: boolean | null | undefined);
4890
- get requestWaterMask(): boolean | undefined;
4891
- set requestWaterMask(value: boolean | null | undefined);
4892
- get showBoundingBox(): boolean | undefined;
4893
- set showBoundingBox(value: boolean | null | undefined);
4894
- get show(): boolean | undefined;
4895
- set show(value: boolean | null | undefined);
4896
- get skirtExaggeration(): number | undefined;
4897
- set skirtExaggeration(value: number | null | undefined);
4898
- get skirt(): boolean | undefined;
4899
- set skirt(value: boolean | null | undefined);
4900
- get tms(): boolean | undefined;
4901
- set tms(value: boolean | null | undefined);
4902
- get token(): string | undefined;
4903
- set token(value: string | null | undefined);
4904
- }
4905
-
4906
- declare class LegacyRasterTerrainMaterial {
4907
- private constructor();
4908
- free(): void;
4909
- [Symbol.dispose](): void;
4910
- get castShadow(): boolean | undefined;
4911
- set castShadow(value: boolean | null | undefined);
4912
- get elevationDecoder(): ElevationDecoder | undefined;
4913
- set elevationDecoder(value: ElevationDecoder | null | undefined);
4914
- get maxZoom(): number | undefined;
4915
- set maxZoom(value: number | null | undefined);
4916
- get minZoom(): number | undefined;
4917
- set minZoom(value: number | null | undefined);
4918
- get overscaledMaxZoom(): number | undefined;
4919
- set overscaledMaxZoom(value: number | null | undefined);
4920
- get receiveShadow(): boolean | undefined;
4921
- set receiveShadow(value: boolean | null | undefined);
4922
- get showBoundingBox(): boolean | undefined;
4923
- set showBoundingBox(value: boolean | null | undefined);
4924
- get show(): boolean | undefined;
4925
- set show(value: boolean | null | undefined);
4926
- get skirtExaggeration(): number | undefined;
4927
- set skirtExaggeration(value: number | null | undefined);
4928
- get skirt(): boolean | undefined;
4929
- set skirt(value: boolean | null | undefined);
4930
- get tileSize(): number | undefined;
4931
- set tileSize(value: number | null | undefined);
4932
- }
4933
-
4934
- declare class LegacyRasterTileMaterial {
4935
- private constructor();
4936
- free(): void;
4937
- [Symbol.dispose](): void;
4938
- get color(): number | undefined;
4939
- set color(value: number | null | undefined);
4940
- get maxZoom(): number | undefined;
4941
- set maxZoom(value: number | null | undefined);
4942
- get minZoom(): number | undefined;
4943
- set minZoom(value: number | null | undefined);
4944
- get opacity(): number | undefined;
4945
- set opacity(value: number | null | undefined);
4946
- get overscaledMaxZoom(): number | undefined;
4947
- set overscaledMaxZoom(value: number | null | undefined);
4948
- get showBoundingBox(): boolean | undefined;
4949
- set showBoundingBox(value: boolean | null | undefined);
4950
- get show(): boolean | undefined;
4951
- set show(value: boolean | null | undefined);
4952
- get tms(): boolean | undefined;
4953
- set tms(value: boolean | null | undefined);
4954
- }
4955
-
4956
- declare class LegacyVectorTileMaterial {
4957
- private constructor();
4958
- free(): void;
4959
- [Symbol.dispose](): void;
4960
- get castShadow(): boolean | undefined;
4961
- set castShadow(value: boolean | null | undefined);
4962
- /**
4963
- * Per-layer horizon dynamic-SSE relaxation strength (`0.0` off … `1.0`
4964
- * raster-equivalent). Omit for a content-based default.
4965
- */
4966
- get dynamicSseScale(): number | undefined;
4967
- /**
4968
- * Per-layer horizon dynamic-SSE relaxation strength (`0.0` off … `1.0`
4969
- * raster-equivalent). Omit for a content-based default.
4970
- */
4971
- set dynamicSseScale(value: number | null | undefined);
4972
- /**
4973
- * Sub-layer filter (MapLibre's `source-layer`). This is the only render-side
4974
- * field; the rest is fetch config carried onto the implicit source.
4975
- */
4976
- get layers(): string[] | undefined;
4977
- /**
4978
- * Sub-layer filter (MapLibre's `source-layer`). This is the only render-side
4979
- * field; the rest is fetch config carried onto the implicit source.
4980
- */
4981
- set layers(value: string[] | null | undefined);
4982
- get maxSse(): number | undefined;
4983
- set maxSse(value: number | null | undefined);
4984
- get maxZoom(): number | undefined;
4985
- set maxZoom(value: number | null | undefined);
4986
- get minZoom(): number | undefined;
4987
- set minZoom(value: number | null | undefined);
4988
- get overscaledMaxZoom(): number | undefined;
4989
- set overscaledMaxZoom(value: number | null | undefined);
4990
- get receiveShadow(): boolean | undefined;
4991
- set receiveShadow(value: boolean | null | undefined);
4992
- get show(): boolean | undefined;
4993
- set show(value: boolean | null | undefined);
4994
- }
4995
-
4996
4981
  export declare type Light = {
4997
4982
  ambient?: {
4998
4983
  enabled?: boolean;
@@ -5458,6 +5443,13 @@ export declare type MeshConfig = {
5458
5443
  * Disables Three.js's auto matrix-world update.
5459
5444
  */
5460
5445
  matrixWorld?: Matrix4;
5446
+ /**
5447
+ * Lighting override for every material of the mesh. `false` outputs albedo
5448
+ * only, while normals and the shadow G-buffer keep being written.
5449
+ * `undefined` follows `view.lit` — passing it to `update()` resets a mesh
5450
+ * to inheriting again.
5451
+ */
5452
+ lit?: boolean;
5461
5453
  } & BaseDescConfig;
5462
5454
 
5463
5455
  export declare type MeshConfigWithSelectiveEffect = MeshConfig & {
@@ -5608,8 +5600,15 @@ export declare abstract class MeshDesc<Config extends MeshConfig = MeshConfig, U
5608
5600
  rotation?: XYZ;
5609
5601
  matrix?: Matrix4;
5610
5602
  matrixWorld?: Matrix4;
5603
+ /** Three-state `lit` override (see {@link MeshConfig.lit}). */
5604
+ lit?: boolean;
5611
5605
  private prevPassKey?;
5612
5606
  constructor(view: ThreeView, ctx: ViewContext, config?: Config);
5607
+ /**
5608
+ * Applies {@link lit} to every material under the mesh. Subclasses that
5609
+ * attach materials asynchronously (glTF) call it again once they exist.
5610
+ */
5611
+ protected applyLit(): void;
5613
5612
  /**
5614
5613
  * Determines which render scene the mesh is added to.
5615
5614
  * Override this to change the rendering pass for your mesh.
@@ -5689,6 +5688,7 @@ export declare abstract class MeshDescWithSelectiveEffect<Config extends MeshCon
5689
5688
  }, CustomEvent extends BaseEventMap = BaseEventMap, Instance extends MeshBaseInstance<InstanceObj> = MeshBaseInstance<InstanceObj>> extends MeshDesc<Config, UpdateConfig, InstanceObj, CustomEvent, Instance> {
5690
5689
  protected _effectIds: string[];
5691
5690
  private _onSlotsChanged;
5691
+ private _onGBufferChanged;
5692
5692
  constructor(view: ThreeView, ctx: ViewContext, config?: Config);
5693
5693
  protected getPassKey(): PassKey;
5694
5694
  onCreate(): void;
@@ -5721,7 +5721,7 @@ declare type MeshHandler = {
5721
5721
  setTileMeshPrepared: (handle: bigint) => void;
5722
5722
  };
5723
5723
 
5724
- export declare type MeshUpdate = Pick<MeshConfig, "position" | "scale" | "rotation" | "matrix" | "matrixWorld"> & BaseDescConfigUpdate;
5724
+ export declare type MeshUpdate = Pick<MeshConfig, "position" | "scale" | "rotation" | "matrix" | "matrixWorld" | "lit"> & BaseDescConfigUpdate;
5725
5725
 
5726
5726
  export declare type MeshUpdateWithSelectiveEffect = MeshUpdate & {
5727
5727
  effectIds?: string[];
@@ -5865,6 +5865,18 @@ declare class ModelMaterial_2 {
5865
5865
  set height(value: number | null | undefined);
5866
5866
  get ior(): number | undefined;
5867
5867
  set ior(value: number | null | undefined);
5868
+ /**
5869
+ * Applies the lighting equation to the color output. When `false` the
5870
+ * material outputs plain albedo (for deferred lighting) while normals and
5871
+ * the shadow G-buffer keep being written.
5872
+ */
5873
+ get lit(): boolean | undefined;
5874
+ /**
5875
+ * Applies the lighting equation to the color output. When `false` the
5876
+ * material outputs plain albedo (for deferred lighting) while normals and
5877
+ * the shadow G-buffer keep being written.
5878
+ */
5879
+ set lit(value: boolean | null | undefined);
5868
5880
  get maxSse(): number | undefined;
5869
5881
  set maxSse(value: number | null | undefined);
5870
5882
  get metalness(): number | undefined;
@@ -6158,8 +6170,21 @@ export declare class MRTPassEffectDesc extends EffectDesc<MRTPassConfig, MRTPass
6158
6170
  constructor(view: ThreeView, ctx: ViewContext, config: MRTPassConfig);
6159
6171
  createPass(): CustomRenderPass;
6160
6172
  get normalBuffer(): Texture | undefined;
6173
+ /**
6174
+ * Selective-effect bitmask buffer (R=bitmask).
6175
+ * `undefined` when the view disabled `buffers.selectiveEffect`.
6176
+ */
6161
6177
  get effectIdsBuffer(): Texture | undefined;
6178
+ /**
6179
+ * Emissive RGB buffer (HDR).
6180
+ * `undefined` when the view disabled `buffers.emissive`.
6181
+ */
6162
6182
  get emissiveBuffer(): Texture | undefined;
6183
+ /**
6184
+ * Shadow buffer (R=shadow amount, 0=lit..1=fully shadowed).
6185
+ * `undefined` unless an active effect requires the `shadow` buffer.
6186
+ */
6187
+ get shadowBuffer(): Texture | undefined;
6163
6188
  get depthBuffer(): Texture | undefined;
6164
6189
  get depthBufferPacking(): DepthPackingStrategies | undefined;
6165
6190
  get globeNormalBuffer(): Texture | undefined;
@@ -6183,32 +6208,12 @@ export declare type Mutates<States, Uniforms extends ShaderUniforms, Methods ext
6183
6208
  updateUniforms: (uniforms: Uniforms, states: States) => void;
6184
6209
  } & Methods;
6185
6210
 
6186
- export declare type MvtLayer = WithColorSupport<Layer_2<MvtLayerDescription & {
6187
- type: "mvt";
6188
- }>>;
6189
-
6190
- declare class MvtLayerDescription {
6191
- private constructor();
6192
- free(): void;
6193
- [Symbol.dispose](): void;
6194
- get billboard(): BillboardMaterial | undefined;
6195
- set billboard(value: BillboardMaterial | null | undefined);
6196
- get crs(): string | undefined;
6197
- set crs(value: string | null | undefined);
6198
- data: any;
6199
- get point(): PointMaterial | undefined;
6200
- set point(value: PointMaterial | null | undefined);
6201
- get polygon(): PolygonMaterial | undefined;
6202
- set polygon(value: PolygonMaterial | null | undefined);
6203
- get polyline(): PolylineMaterial | undefined;
6204
- set polyline(value: PolylineMaterial | null | undefined);
6205
- get text(): TextMaterial | undefined;
6206
- set text(value: TextMaterial | null | undefined);
6207
- get type(): string | undefined;
6208
- set type(value: string | null | undefined);
6209
- get vectorTile(): LegacyVectorTileMaterial | undefined;
6210
- set vectorTile(value: LegacyVectorTileMaterial | null | undefined);
6211
- }
6211
+ /**
6212
+ * Codec for the normal buffer's RG channels, which are **octahedral**, not a
6213
+ * plain `xy * 2 - 1`: decode with `unpackVec2ToNormal`. Prepend to shaders
6214
+ * that cannot use `#include` resolution (postprocessing effect fragments).
6215
+ */
6216
+ export declare const NORMAL_PACKING_SHADER: string;
6212
6217
 
6213
6218
  /**
6214
6219
  * A pass that copies normal buffer contents to a render target.
@@ -6253,6 +6258,23 @@ export declare function northWestUpToFixedFrame(origin: Vector3): Matrix4;
6253
6258
 
6254
6259
  export declare type Nullable<T> = T | null | undefined;
6255
6260
 
6261
+ /**
6262
+ * Stamped from `material.transparent`. Under blending, `normalBuffer.a` is
6263
+ * the attachment's blend factor, so a blended material must write 1.0 there
6264
+ * instead of roughness or it keeps the normal of whatever lies behind.
6265
+ */
6266
+ export declare const NVR_BLENDED_DEFINE = "NVR_BLENDED";
6267
+
6268
+ /** `lit: true` – wins over {@link NVR_UNLIT_SCENE_DEFINE}. */
6269
+ export declare const NVR_LIT_DEFINE = "NVR_LIT";
6270
+
6271
+ /** `lit: false` – only the lighting equation is bypassed; the lit pipeline
6272
+ * still runs, so normals and the shadow G-buffer keep being written. */
6273
+ export declare const NVR_UNLIT_DEFINE = "NVR_UNLIT";
6274
+
6275
+ /** Scene-level default, stamped by `CustomRenderPass` from `view.lit`. */
6276
+ export declare const NVR_UNLIT_SCENE_DEFINE = "NVR_UNLIT_SCENE";
6277
+
6256
6278
  declare class ObjectTransformEvent {
6257
6279
  private constructor();
6258
6280
  free(): void;
@@ -6649,23 +6671,6 @@ declare abstract class Plugin_2<TView = unknown, TCtx = unknown> {
6649
6671
  }
6650
6672
  export { Plugin_2 as Plugin }
6651
6673
 
6652
- export declare type PntsLayer = WithColorSupport<Layer_2<PntsLayerDescription & {
6653
- type: "pnts";
6654
- }>>;
6655
-
6656
- declare class PntsLayerDescription {
6657
- private constructor();
6658
- free(): void;
6659
- [Symbol.dispose](): void;
6660
- get crs(): string | undefined;
6661
- set crs(value: string | null | undefined);
6662
- data: any;
6663
- get model(): ModelMaterial_2 | undefined;
6664
- set model(value: ModelMaterial_2 | null | undefined);
6665
- get type(): string | undefined;
6666
- set type(value: string | null | undefined);
6667
- }
6668
-
6669
6674
  /** A `pnts` source: a single Point Cloud tile. */
6670
6675
  export declare type PntsSource = SourceBase & WithColorSupport<Layer_2<Tiles3dSourceDescription & {
6671
6676
  type: "pnts";
@@ -6812,11 +6817,6 @@ declare type PolygonBaseMutates = Mutates<PolygonBaseState, PolygonBaseUniforms,
6812
6817
  * This is needed because batchDataTexture is an external ref passed via props.
6813
6818
  */
6814
6819
  setBatchDataTexture: (texture: UniformValue<Texture | null>) => void;
6815
- /**
6816
- * Set the globe normal texture ref.
6817
- * This is needed because globeNormalTexture is an external ref passed via props.
6818
- */
6819
- setGlobeNormalTexture: (texture: UniformValue<Texture | null>) => void;
6820
6820
  }>;
6821
6821
 
6822
6822
  /**
@@ -6838,7 +6838,6 @@ declare type PolygonBaseProps = {
6838
6838
  roughness?: number;
6839
6839
  emissiveColor?: number;
6840
6840
  emissiveIntensity?: number;
6841
- globeNormalTexture?: UniformValue<Texture | null>;
6842
6841
  batchDataTexture?: UniformValue<Texture | null>;
6843
6842
  batchColorEnabled?: boolean;
6844
6843
  useRTE?: boolean;
@@ -6863,7 +6862,6 @@ declare type PolygonBaseRefs = {
6863
6862
  reflectivity: UniformValue<number>;
6864
6863
  roughness: UniformValue<number>;
6865
6864
  batchDataTexture?: UniformValue<Texture | null>;
6866
- uGlobeNormal?: UniformValue<Texture | null>;
6867
6865
  modelViewMatrixRTE?: UniformValue<Matrix4>;
6868
6866
  u_cameraPositionHigh?: UniformValue<Vector3>;
6869
6867
  u_cameraPositionLow?: UniformValue<Vector3>;
@@ -6947,6 +6945,18 @@ declare class PolygonMaterial {
6947
6945
  set height(value: number | null | undefined);
6948
6946
  get ior(): number | undefined;
6949
6947
  set ior(value: number | null | undefined);
6948
+ /**
6949
+ * Applies the lighting equation to the color output. When `false` the
6950
+ * material outputs plain albedo (for deferred lighting) while normals and
6951
+ * the shadow G-buffer keep being written.
6952
+ */
6953
+ get lit(): boolean | undefined;
6954
+ /**
6955
+ * Applies the lighting equation to the color output. When `false` the
6956
+ * material outputs plain albedo (for deferred lighting) while normals and
6957
+ * the shadow G-buffer keep being written.
6958
+ */
6959
+ set lit(value: boolean | null | undefined);
6950
6960
  /**
6951
6961
  * Need to enable `transparent`.
6952
6962
  */
@@ -7449,6 +7459,18 @@ declare class PolylineMaterial {
7449
7459
  set emissiveIntensity(value: number | null | undefined);
7450
7460
  get height(): number | undefined;
7451
7461
  set height(value: number | null | undefined);
7462
+ /**
7463
+ * Applies the lighting equation to the color output. When `false` the
7464
+ * material outputs plain albedo (for deferred lighting) while normals and
7465
+ * the shadow G-buffer keep being written.
7466
+ */
7467
+ get lit(): boolean | undefined;
7468
+ /**
7469
+ * Applies the lighting equation to the color output. When `false` the
7470
+ * material outputs plain albedo (for deferred lighting) while normals and
7471
+ * the shadow G-buffer keep being written.
7472
+ */
7473
+ set lit(value: boolean | null | undefined);
7452
7474
  /**
7453
7475
  * Maximum line width in pixels, clamping the rendered width regardless of zoom level.
7454
7476
  * Smaller values are cheaper to render as they reduce fragment shader overdraw.
@@ -7701,17 +7723,11 @@ declare class RasterLayerDescription {
7701
7723
  /**
7702
7724
  * Imagery rendering options for the raster texture. Parallel to `hillshade`
7703
7725
  * and `elevationHeatmap`; `show`/`color`/etc. apply only to the imagery.
7704
- * Accepts the legacy `rasterTile` key too so old-API tile layers can still
7705
- * be updated (extra legacy fields like `maxZoom`/`tms` are ignored here —
7706
- * they live on the source).
7707
7726
  */
7708
7727
  get raster(): RasterMaterial | undefined;
7709
7728
  /**
7710
7729
  * Imagery rendering options for the raster texture. Parallel to `hillshade`
7711
7730
  * and `elevationHeatmap`; `show`/`color`/etc. apply only to the imagery.
7712
- * Accepts the legacy `rasterTile` key too so old-API tile layers can still
7713
- * be updated (extra legacy fields like `maxZoom`/`tms` are ignored here —
7714
- * they live on the source).
7715
7731
  */
7716
7732
  set raster(value: RasterMaterial | null | undefined);
7717
7733
  get source(): string | undefined;
@@ -7770,6 +7786,18 @@ declare class RasterTileInternalMaterial {
7770
7786
  isElevationHeatmaps: Uint8Array;
7771
7787
  isHillshades: Uint8Array;
7772
7788
  layerReproject: Uint8Array;
7789
+ /**
7790
+ * Applies the lighting equation to the color output. When `false` the
7791
+ * material outputs plain albedo (for deferred lighting) while normals and
7792
+ * the shadow G-buffer keep being written.
7793
+ */
7794
+ get lit(): boolean | undefined;
7795
+ /**
7796
+ * Applies the lighting equation to the color output. When `false` the
7797
+ * material outputs plain albedo (for deferred lighting) while normals and
7798
+ * the shadow G-buffer keep being written.
7799
+ */
7800
+ set lit(value: boolean | null | undefined);
7773
7801
  logBoundary: number;
7774
7802
  logarithmic: boolean;
7775
7803
  opacities: Float32Array;
@@ -8038,6 +8066,8 @@ export declare class RenderTargetCopyPass extends Pass_2 {
8038
8066
  get autoResize(): boolean;
8039
8067
  set autoResize(value: boolean);
8040
8068
  setTexture(texture: Texture): void;
8069
+ /** Points the pass at a rebuilt render target (same-purpose replacement). */
8070
+ setRenderTarget(renderTarget: WebGLRenderTarget): void;
8041
8071
  /**
8042
8072
  * When a depth texture is set, the pass copies its depth into the target's
8043
8073
  * depth buffer via gl_FragDepth. Depth test must be enabled (with AlwaysDepth)
@@ -8075,6 +8105,12 @@ declare class Replacer {
8075
8105
  replaceWithCondition(search: string | RegExp, replace: string, condition: boolean, errorMessage?: string): Replacer;
8076
8106
  }
8077
8107
 
8108
+ /** {@link GBufferOptions} with defaults applied. */
8109
+ export declare type ResolvedGBufferOptions = Readonly<Required<GBufferOptions>>;
8110
+
8111
+ /** Applies defaults (all disabled) to a partial configuration. */
8112
+ export declare function resolveGBufferOptions(options?: GBufferOptions): ResolvedGBufferOptions;
8113
+
8078
8114
  declare class ReturnedTransferablePolygonBatchedFeature {
8079
8115
  private constructor();
8080
8116
  free(): void;
@@ -8300,6 +8336,12 @@ export declare type SelectiveEffectConfig = {
8300
8336
  * Subclasses implement {@link createPass}.
8301
8337
  */
8302
8338
  export declare abstract class SelectiveEffectDesc<Config extends SelectiveEffectConfig = SelectiveEffectConfig, UpdateConfig extends SelectiveEffectUpdate = SelectiveEffectUpdate> extends EffectDesc<Config, UpdateConfig> {
8339
+ /**
8340
+ * Buffer-based selective effects read the effectIds bitmask buffer.
8341
+ * Subclasses that also read the emissive buffer (e.g. bloom) override this
8342
+ * with `["selectiveEffect", "emissive"]`.
8343
+ */
8344
+ static requiredBuffers: readonly GBufferName[];
8303
8345
  protected config: Config;
8304
8346
  constructor(view: ThreeView, ctx: ViewContext, config: Config);
8305
8347
  /** ViewContext for accessing scenes, renderer, registry, etc. */
@@ -8308,9 +8350,9 @@ export declare abstract class SelectiveEffectDesc<Config extends SelectiveEffect
8308
8350
  get layerConfig(): Config;
8309
8351
  onCreate(): void;
8310
8352
  onDestroy(): void;
8311
- /** Emissive RGB buffer (MRT attachment[3]). */
8353
+ /** Emissive RGB buffer. */
8312
8354
  getEmissiveBuffer(): Texture | null;
8313
- /** EffectIds bitmask buffer (MRT attachment[2]). NearestFilter, discrete data. */
8355
+ /** EffectIds bitmask buffer (R=bitmask). NearestFilter, discrete data. */
8314
8356
  getEffectIdsBuffer(): Texture | null;
8315
8357
  /** Slot bit index for this effect instance in the EffectIds Buffer. -1 if unregistered. */
8316
8358
  getEffectSlot(): number;
@@ -8376,6 +8418,23 @@ export declare function setRTCPosition<T extends Object3D>(mesh: T, position: Fl
8376
8418
  */
8377
8419
  export declare function setRTEPosition<T extends Object3D>(mesh: T, positionHigh: Float32Array<ArrayBufferLike> | null | undefined, positionLow: Float32Array<ArrayBufferLike> | null | undefined, posIdx: number, transform: Transform_2): void;
8378
8420
 
8421
+ /**
8422
+ * Shades a draped material with the terrain's normal instead of its own. The
8423
+ * visible fragments are the back faces of a volume clipped to the ground by
8424
+ * {@link DrapedMesh.process}, so the mesh's own normals point in an arbitrary
8425
+ * direction while the ground's normal is what the lighting should use.
8426
+ *
8427
+ * The decoder (`unpackVec2ToNormal`) comes from the packing helpers that
8428
+ * `overrideMaterialsForMRT` puts in every `ShaderLib` material, so a custom
8429
+ * `ShaderMaterial` in the draped scene needs to bring its own. Idempotent.
8430
+ *
8431
+ * @param globeNormal - Uniform ref for the globe normal copy, kept alive by
8432
+ * the caller (see `CustomRenderPass`).
8433
+ */
8434
+ export declare function setupMaterialForDrape(material: Material, globeNormal: {
8435
+ value: Texture | null;
8436
+ }): void;
8437
+
8379
8438
  /**
8380
8439
  * Wire a custom material into Navara's MRT G-buffer so depth/normal-based
8381
8440
  * effects (SSAO, SSR, outline, aerial perspective, clouds) and SelectiveEffect
@@ -8752,24 +8811,6 @@ declare class TerrainHeightUpdatedEvent {
8752
8811
  lle: LLE;
8753
8812
  }
8754
8813
 
8755
- export declare type TerrainLayer = Layer_2<TerrainLayerDescription & {
8756
- type: "terrain";
8757
- }>;
8758
-
8759
- declare class TerrainLayerDescription {
8760
- private constructor();
8761
- free(): void;
8762
- [Symbol.dispose](): void;
8763
- data: any;
8764
- get ellipsoid(): LegacyEllipsoidTerrainMaterial | undefined;
8765
- set ellipsoid(value: LegacyEllipsoidTerrainMaterial | null | undefined);
8766
- get quantizedMesh(): LegacyQuantizedMeshTerrainMaterial | undefined;
8767
- set quantizedMesh(value: LegacyQuantizedMeshTerrainMaterial | null | undefined);
8768
- get rasterTerrain(): LegacyRasterTerrainMaterial | undefined;
8769
- set rasterTerrain(value: LegacyRasterTerrainMaterial | null | undefined);
8770
- type: string;
8771
- }
8772
-
8773
8814
  /**
8774
8815
  * Render-only appearance for a `terrain` layer's mesh, regardless of the
8775
8816
  * referenced source's data format (raster-dem, quantized-mesh, or the
@@ -8782,6 +8823,18 @@ declare class TerrainMaterial {
8782
8823
  [Symbol.dispose](): void;
8783
8824
  get castShadow(): boolean | undefined;
8784
8825
  set castShadow(value: boolean | null | undefined);
8826
+ /**
8827
+ * Applies the lighting equation to the color output. When `false` the
8828
+ * material outputs plain albedo (for deferred lighting) while normals and
8829
+ * the shadow G-buffer keep being written.
8830
+ */
8831
+ get lit(): boolean | undefined;
8832
+ /**
8833
+ * Applies the lighting equation to the color output. When `false` the
8834
+ * material outputs plain albedo (for deferred lighting) while normals and
8835
+ * the shadow G-buffer keep being written.
8836
+ */
8837
+ set lit(value: boolean | null | undefined);
8785
8838
  get receiveShadow(): boolean | undefined;
8786
8839
  set receiveShadow(value: boolean | null | undefined);
8787
8840
  get showBoundingBox(): boolean | undefined;
@@ -8811,9 +8864,14 @@ declare class TerrainMaterial {
8811
8864
  }
8812
8865
 
8813
8866
  /**
8814
- * A `terrain` layer renders a `raster-dem` or `quantized-mesh` source as the globe surface.
8867
+ * A `terrain` layer renders a `raster-dem` or `quantized-mesh` source as the
8868
+ * globe surface. Alternatively, omit `source` and pass `ellipsoid` to render a
8869
+ * flat ellipsoid surface (e.g. to drape clamp-to-ground data on).
8815
8870
  */
8816
- export declare type TerrainSourceLayer = SourceLayerBase<TerrainSourceLayerBase>;
8871
+ export declare type TerrainSourceLayer = SourceLayerBase<TerrainSourceLayerBase> & {
8872
+ /** Render a source-less flat ellipsoid surface. Mutually exclusive with `source`. */
8873
+ ellipsoid?: TerrainSourceLayerBase["terrain"];
8874
+ };
8817
8875
 
8818
8876
  declare type TerrainSourceLayerBase = WithColorSupport<Layer_2<TerrainSourceLayerDescription & {
8819
8877
  type: "terrain";
@@ -8833,17 +8891,15 @@ declare class TerrainSourceLayerDescription {
8833
8891
  /**
8834
8892
  * Terrain mesh rendering options. Nested like the other layers' render
8835
8893
  * inputs (`raster`, `model`, ...); all fetch/geometry config lives on the
8836
- * referenced source. Accepts the legacy terrain material keys too so
8837
- * old-API terrain layers can still be updated (extra legacy fetch fields
8838
- * are ignored — they live on the source).
8894
+ * referenced source. A source-less terrain layer (a flat ellipsoid surface
8895
+ * to drape clamp-to-ground data on) is written with the `ellipsoid` key.
8839
8896
  */
8840
8897
  get terrain(): TerrainMaterial | undefined;
8841
8898
  /**
8842
8899
  * Terrain mesh rendering options. Nested like the other layers' render
8843
8900
  * inputs (`raster`, `model`, ...); all fetch/geometry config lives on the
8844
- * referenced source. Accepts the legacy terrain material keys too so
8845
- * old-API terrain layers can still be updated (extra legacy fetch fields
8846
- * are ignored — they live on the source).
8901
+ * referenced source. A source-less terrain layer (a flat ellipsoid surface
8902
+ * to drape clamp-to-ground data on) is written with the `ellipsoid` key.
8847
8903
  */
8848
8904
  set terrain(value: TerrainMaterial | null | undefined);
8849
8905
  get type(): string | undefined;
@@ -9211,6 +9267,13 @@ declare class ThreeView<D extends Descriptions = EmptyDescriptions> extends Even
9211
9267
  private plugins;
9212
9268
  /** Built-in attribution UI; unset when disabled or in a worker (no DOM). */
9213
9269
  private _attribution?;
9270
+ /**
9271
+ * Derived G-buffer attachment configuration — the union of the
9272
+ * `requiredBuffers` declared by the active effects.
9273
+ */
9274
+ private _buffers;
9275
+ /** Scene-level default of the `lit` material option (see {@link lit}). */
9276
+ private _lit;
9214
9277
  private pixelRatioMatchedMedia?;
9215
9278
  private fixedGpuBytesReportScheduled;
9216
9279
  private fixedGpuBytesResyncPending;
@@ -9222,6 +9285,21 @@ declare class ThreeView<D extends Descriptions = EmptyDescriptions> extends Even
9222
9285
  * credits with `view.attribution?.add([...])`.
9223
9286
  */
9224
9287
  get attribution(): AttributionPlugin | undefined;
9288
+ /**
9289
+ * Buffers currently allocated. Not configurable — derived as the union of
9290
+ * the active effects' `requiredBuffers`. All but `globeNormal` are G-buffer
9291
+ * attachments.
9292
+ */
9293
+ get buffers(): ResolvedGBufferOptions;
9294
+ /**
9295
+ * Scene-level default of the `lit` material option. `false` makes every
9296
+ * material without an explicit `lit` output plain albedo, while normals and
9297
+ * the shadow G-buffer keep being written – the input for deferred lighting.
9298
+ * Toggling recompiles the affected shaders once.
9299
+ * @defaultValue true
9300
+ */
9301
+ get lit(): boolean;
9302
+ set lit(value: boolean);
9225
9303
  constructor(options?: Options);
9226
9304
  /**
9227
9305
  * Convert a mouse event to a MapMouseEvent by adding map coordinates
@@ -9397,6 +9475,17 @@ declare class ThreeView<D extends Descriptions = EmptyDescriptions> extends Even
9397
9475
  * @returns An EffectHandle for controlling the added effect
9398
9476
  */
9399
9477
  addEffect<L extends EffectDesc = EffectDesc>(config: OmitType<BuiltInEffectDescription | EffectConfig | NonNullable<D["effect"]>>): EffectHandle<L>;
9478
+ /**
9479
+ * Re-derives the G-buffer configuration from the union of the active
9480
+ * effects' `requiredBuffers` and applies it to the MRT pass when changed.
9481
+ */
9482
+ private _syncGBuffers;
9483
+ /**
9484
+ * Throws when enabling `effectType`'s required G-buffers would push the
9485
+ * attachment count (color + normal + optional buffers) past the device's
9486
+ * `MAX_DRAW_BUFFERS` limit.
9487
+ */
9488
+ private _assertGBufferCapacity;
9400
9489
  /**
9401
9490
  * Finds a resource layer by its ID.
9402
9491
  * Only returns resource layers added via `addLayer()` (not mesh, light, or
@@ -9683,18 +9772,19 @@ declare class ThreeViewCamera extends EventHandler<CameraEvent> {
9683
9772
  }
9684
9773
 
9685
9774
  /**
9686
- * `effectIdBuffer = …; emissiveBuffer = …;` replacement. Only the
9687
- * texturized-layer pixels write effect/emissive; raster pixels stay 0 so they
9688
- * don't perturb downstream effect-mask passes.
9775
+ * Effect/emissive write replacement, via the `GBUFFER_WRITE_EFFECT*` macros
9776
+ * from the pars chunk (each buffer's write is compiled out when the view
9777
+ * disables it). Only the texturized-layer pixels write effect/emissive;
9778
+ * raster pixels stay 0 so they don't perturb downstream effect-mask passes.
9689
9779
  */
9690
- export declare const TILE_EMISSIVE_EFFECT_BUFFER_REPLACEMENT = "\nif (isTexturizedLayer) {\n effectIdBuffer = vec4(tileEffectIdsMask, 0.0, 0.0, 1.0);\n emissiveBuffer = vec4(diffuseColor.rgb * tileEmissiveIntensity + tileEmissiveColor, 1.0);\n} else {\n effectIdBuffer = vec4(0.0);\n emissiveBuffer = vec4(0.0);\n}\n";
9780
+ export declare const TILE_EMISSIVE_EFFECT_BUFFER_REPLACEMENT = "\nif (isTexturizedLayer) {\n GBUFFER_WRITE_EFFECT(tileEffectIdsMask, diffuseColor.rgb * tileEmissiveIntensity + tileEmissiveColor)\n} else {\n GBUFFER_WRITE_EFFECT_ZERO\n}\n";
9691
9781
 
9692
9782
  /**
9693
9783
  * `normalBuffer = …` replacement for the MRT pass. Identical to legacy
9694
9784
  * behaviour: applyWaterNormals mixes the perturbed normal into the geometric
9695
9785
  * one before packing.
9696
9786
  */
9697
- export declare const TILE_NORMAL_BUFFER_REPLACEMENT = "\nvec3 finalNormal = mix(origNormal, normalize(origNormal * 0.7 + normal), applyWaterNormals);\nnormalBuffer = vec4(packNormalToVec2(finalNormal), tileReflectivity, tileRoughness);\n";
9787
+ export declare const TILE_NORMAL_BUFFER_REPLACEMENT = "\nvec3 finalNormal = mix(origNormal, normalize(origNormal * 0.7 + normal), applyWaterNormals);\nGBUFFER_WRITE_NORMAL(finalNormal, tileReflectivity, tileRoughness)\n";
9698
9788
 
9699
9789
  /**
9700
9790
  * Final-stage pick override. Injected immediately AFTER
@@ -9745,21 +9835,6 @@ declare type TileHandler = {
9745
9835
  mercatorY: (lat: number) => number;
9746
9836
  };
9747
9837
 
9748
- declare class TileLayerDescription {
9749
- private constructor();
9750
- free(): void;
9751
- [Symbol.dispose](): void;
9752
- data: any;
9753
- get elevationHeatmap(): LegacyElevationHeatmapMaterial | undefined;
9754
- set elevationHeatmap(value: LegacyElevationHeatmapMaterial | null | undefined);
9755
- get hillshade(): LegacyHillshadeMaterial | undefined;
9756
- set hillshade(value: LegacyHillshadeMaterial | null | undefined);
9757
- get rasterTile(): LegacyRasterTileMaterial | undefined;
9758
- set rasterTile(value: LegacyRasterTileMaterial | null | undefined);
9759
- get type(): string | undefined;
9760
- set type(value: string | null | undefined);
9761
- }
9762
-
9763
9838
  export declare type TileMapByHandle = Map<TileHandle, TileMesh>;
9764
9839
 
9765
9840
  export declare type TileMaterial = MeshBasicMaterial | MeshLambertMaterial;
@@ -9904,12 +9979,13 @@ export declare type TileShaderFeatures = {
9904
9979
  hasHillshade: boolean;
9905
9980
  /** Some layer uses Water material → emit the water specular branch. */
9906
9981
  hasWater: boolean;
9982
+ /**
9983
+ * Quantized-mesh watermask is present (source requested `requestWaterMask`).
9984
+ * Emits the ocean reflectivity fallback in the map fragment.
9985
+ */
9986
+ hasWatermask: boolean;
9907
9987
  };
9908
9988
 
9909
- export declare type TilesLayer = WithColorSupport<Layer_2<TileLayerDescription & {
9910
- type: "tiles";
9911
- }>>;
9912
-
9913
9989
  /**
9914
9990
  * Pure cache layer for per-tile composite atlases.
9915
9991
  *
@@ -10353,6 +10429,12 @@ declare type UniformValue<T> = {
10353
10429
  value: T;
10354
10430
  };
10355
10431
 
10432
+ /**
10433
+ * Derives the buffer configuration for a set of effect requirements
10434
+ * (`EffectDesc.requiredBuffers` of every active effect).
10435
+ */
10436
+ export declare function unionGBufferRequirements(requirements: Iterable<readonly GBufferName[]>): ResolvedGBufferOptions;
10437
+
10356
10438
  export declare class UnknownTypeError extends Error {
10357
10439
  constructor(type: Exclude<(EffectConfig | MeshConfig | LightConfig)["type"], undefined>, config: EffectConfig | MeshConfig | LightConfig);
10358
10440
  }
@@ -10407,6 +10489,15 @@ export declare class UnknownTypeError extends Error {
10407
10489
  set watermask(value: number | null | undefined);
10408
10490
  }
10409
10491
 
10492
+ /** Enables the emissive output. Mirrored in the GLSL chunk. */
10493
+ export declare const USE_GBUFFER_EMISSIVE_DEFINE = "USE_GBUFFER_EMISSIVE";
10494
+
10495
+ /** Enables the effectIds output. Mirrored in the GLSL chunk. */
10496
+ export declare const USE_GBUFFER_SELECTIVE_EFFECT_DEFINE = "USE_GBUFFER_SELECTIVE_EFFECT";
10497
+
10498
+ /** Enables the shadow output. Mirrored in the GLSL chunk. */
10499
+ export declare const USE_GBUFFER_SHADOW_DEFINE = "USE_GBUFFER_SHADOW";
10500
+
10410
10501
  /**
10411
10502
  * Array of valid geometry type values for runtime validation.
10412
10503
  */
@@ -10586,6 +10677,7 @@ export declare class UnknownTypeError extends Error {
10586
10677
  private _meshes;
10587
10678
  private _selectiveEffectRegistry;
10588
10679
  private _renderPass?;
10680
+ private _registries?;
10589
10681
  constructor(
10590
10682
  /** Scene containers for different rendering passes. */
10591
10683
  _scenes: Scenes, layersManager: LayersManager, renderPassOrchestrator: RenderPassOrchestrator,
@@ -10611,6 +10703,9 @@ export declare class UnknownTypeError extends Error {
10611
10703
  /** Get the input buffer from the effect composer. */
10612
10704
  getInputBuffer(): WebGLRenderTarget<Texture<unknown, TextureEventMap>>;
10613
10705
  /* Excluded from this release type: _setRenderPass */
10706
+ /* Excluded from this release type: _setRegistries */
10707
+ /* Excluded from this release type: _setGBufferOptions */
10708
+ /* Excluded from this release type: _setLit */
10614
10709
  /**
10615
10710
  * Gets the globe depth texture for post-processing effects.
10616
10711
  */
@@ -10626,16 +10721,41 @@ export declare class UnknownTypeError extends Error {
10626
10721
  /**
10627
10722
  * Gets the scene normal texture from the G-buffer.
10628
10723
  */
10629
- getNormalTexture(): Texture<unknown, TextureEventMap>;
10724
+ getNormalTexture(): Texture<unknown, TextureEventMap> | undefined;
10630
10725
  /**
10631
10726
  * Gets the effect IDs texture from the G-buffer.
10727
+ * `undefined` when the view disabled `buffers.selectiveEffect`.
10632
10728
  */
10633
- getEffectIdsTexture(): Texture<unknown, TextureEventMap>;
10729
+ getEffectIdsTexture(): Texture | undefined;
10634
10730
  /**
10635
10731
  * Gets the emissive texture from the G-buffer.
10732
+ * `undefined` when the view disabled `buffers.emissive`.
10733
+ */
10734
+ getEmissiveTexture(): Texture | undefined;
10735
+ /**
10736
+ * Gets the shadow texture (R=shadow amount, 0=lit..1=fully shadowed) from
10737
+ * the G-buffer. `undefined` unless an active effect requires the `shadow`
10738
+ * buffer.
10636
10739
  */
10637
- getEmissiveTexture(): Texture<unknown, TextureEventMap>;
10740
+ getShadowTexture(): Texture | undefined;
10638
10741
  /* Excluded from this release type: _getEffects */
10742
+ /* Excluded from this release type: _getLights */
10743
+ /* Excluded from this release type: _getMeshes */
10744
+ /**
10745
+ * Finds an active effect descriptor by its `key` (e.g. `"mrt"`,
10746
+ * `"selectiveBloom"`). Returns the first match, or `undefined`.
10747
+ */
10748
+ findEffect<T extends EffectDesc = EffectDesc>(key: string): T | undefined;
10749
+ /**
10750
+ * Finds the first active light descriptor registered under `key` (e.g.
10751
+ * `"sun"`), for inheriting the scene's lighting in a custom effect.
10752
+ */
10753
+ findLight<T extends LightDesc = LightDesc>(key: string): T | undefined;
10754
+ /**
10755
+ * Finds an active mesh descriptor by its registered key (e.g. `"box"`,
10756
+ * `"gltfModel"`). Returns the first match, or `undefined`.
10757
+ */
10758
+ findMesh<T extends MeshDesc = MeshDesc>(key: string): T | undefined;
10639
10759
  /**
10640
10760
  * Register a material for CSM shadow rendering.
10641
10761
  * @experimental This API may change or be removed in future versions.
@@ -10682,6 +10802,18 @@ export declare class UnknownTypeError extends Error {
10682
10802
  * Listeners should recompute effectIdsMask to stay in sync.
10683
10803
  */
10684
10804
  effectSlotsChanged: () => void;
10805
+ /**
10806
+ * Emitted when the derived G-buffer configuration changes. Meshes re-evaluate
10807
+ * their pass placement: outside the MRT pass they would leave the G-buffer
10808
+ * holding whatever lies behind them.
10809
+ */
10810
+ gbufferChanged: () => void;
10811
+ /**
10812
+ * Emitted when a mesh moves between render scenes. The view re-derives the
10813
+ * buffer configuration from it: draped meshes need the globe normal but,
10814
+ * not being effects, cannot declare `requiredBuffers` themselves.
10815
+ */
10816
+ meshPassKeyChanged: () => void;
10685
10817
  };
10686
10818
 
10687
10819
  /**
@@ -10722,6 +10854,10 @@ export declare class UnknownTypeError extends Error {
10722
10854
 
10723
10855
  export declare const WATER_NORMAL_URL: string;
10724
10856
 
10857
+ export declare const WATERMASK_OCEAN_REFLECTIVITY = 0.02;
10858
+
10859
+ export declare const WATERMASK_OCEAN_ROUGHNESS = 0.2;
10860
+
10725
10861
  /**
10726
10862
  * Mutation functions for the water enhancer (internal only).
10727
10863
  */
@@ -10764,7 +10900,7 @@ export declare class UnknownTypeError extends Error {
10764
10900
 
10765
10901
  /**
10766
10902
  * Helper type to enable Navara Color objects in all color-related fields.
10767
- * This applies to model, point, billboard, text, polyline, polygon, rasterTile, etc.
10903
+ * This applies to model, point, billboard, text, polyline, polygon, raster, etc.
10768
10904
  * Both number and Navara Color objects are accepted for backward compatibility.
10769
10905
  */
10770
10906
  declare type WithColorSupport<T> = ConvertColorFields<T>;