hilo3d 2.0.0-alpha.7 → 2.0.0-alpha.9

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/dist/Hilo3d.d.ts CHANGED
@@ -2622,229 +2622,189 @@ declare class Ray {
2622
2622
  private pointAt;
2623
2623
  }
2624
2624
 
2625
- declare const STATE_TYPES: Readonly<{
2626
- TRANSLATE: "Translation";
2627
- POSITION: "Translation";
2628
- TRANSLATION: "Translation";
2629
- SCALE: "Scale";
2630
- ROTATE: "Rotation";
2631
- ROTATION: "Rotation";
2632
- QUATERNION: "Quaternion";
2633
- WEIGHTS: "Weights";
2634
- }>;
2635
- type BuiltInAnimationStateType = (typeof STATE_TYPES)[keyof typeof STATE_TYPES];
2636
- type AnimationStateType = BuiltInAnimationStateType | (string & {});
2637
- type AnimationStateHandler = (node: Node, state: unknown) => void;
2638
- type AnimationInterpolationType = 'LINEAR' | 'STEP' | 'CUBICSPLINE';
2639
- interface AnimationStatesParameters {
2640
- nodeName?: string;
2641
- type?: AnimationStateType;
2642
- interpolationType?: AnimationInterpolationType;
2643
- keyTime?: number[];
2644
- states?: unknown[];
2645
- }
2646
- type InterpolatedValue = number | number[] | Vector3 | Quaternion;
2647
- type InterpolationFunction = (first: unknown, second?: unknown, ratio?: number, timeRange?: number) => InterpolatedValue;
2648
- /** A typed animation channel targeting one property of a scene node. */
2649
- declare class AnimationStates {
2650
- static readonly interpolation: Record<AnimationInterpolationType, InterpolationFunction>;
2651
- static readonly StateType: Readonly<{
2652
- TRANSLATE: "Translation";
2653
- POSITION: "Translation";
2654
- TRANSLATION: "Translation";
2655
- SCALE: "Scale";
2656
- ROTATE: "Rotation";
2657
- ROTATION: "Rotation";
2658
- QUATERNION: "Quaternion";
2659
- WEIGHTS: "Weights";
2660
- }>;
2661
- private static readonly extraTypes;
2662
- private static readonly extraHandlers;
2663
- static getType(name: string): AnimationStateType;
2664
- static registerStateHandler(name: string, handler: AnimationStateHandler): void;
2665
- readonly id: string;
2666
- readonly isAnimationStates = true;
2667
- readonly className = "AnimationStates";
2668
- nodeName: string;
2669
- type: AnimationStateType;
2670
- interpolationType: AnimationInterpolationType;
2671
- keyTime: number[];
2672
- states: unknown[];
2673
- private originalWeightIndices;
2674
- constructor(params?: AnimationStatesParameters);
2675
- findIndexByTime(time: number): [number, number];
2676
- getStateByIndex(index: number): unknown;
2677
- private convertRotationState;
2678
- getState(time: number): unknown;
2679
- interpolation(first: unknown, second?: unknown, ratio?: number, timeRange?: number): InterpolatedValue;
2680
- updateNodeTranslation(node: Node, value: unknown): void;
2681
- updateNodeScale(node: Node, value: unknown): void;
2682
- updateNodeQuaternion(node: Node, value: unknown): void;
2683
- updateNodeWeights(node: Node, value: unknown): void;
2684
- updateNodeState(time: number, node?: Node): void;
2685
- clone(): AnimationStates;
2686
- }
2687
-
2688
- interface AnimationClip {
2689
- start: number;
2690
- end: number;
2691
- animStatesList?: AnimationStates[];
2625
+ /** Properties supported by the numeric pose mixer. Custom channels use an explicit binding. */
2626
+ type AnimationProperty = 'translation' | 'rotation' | 'scale' | 'weights' | `custom:${string}`;
2627
+ /** glTF interpolation modes. Cubic data is laid out as in-tangent/value/out-tangent per key. */
2628
+ type AnimationInterpolation = 'LINEAR' | 'STEP' | 'CUBICSPLINE';
2629
+ /** Flat, numeric animation channel authoring data. Times are in seconds. */
2630
+ interface AnimationTrackParameters {
2631
+ target: string;
2632
+ property: AnimationProperty;
2633
+ times: ArrayLike<number>;
2634
+ values: ArrayLike<number>;
2635
+ components?: number;
2636
+ interpolation?: AnimationInterpolation;
2637
+ }
2638
+ /** Validated immutable channel data, shared by every character playing the clip. */
2639
+ declare class AnimationTrack {
2640
+ readonly target: string;
2641
+ readonly property: AnimationProperty;
2642
+ readonly components: number;
2643
+ readonly interpolation: AnimationInterpolation;
2644
+ readonly startTime: number;
2645
+ readonly endTime: number;
2646
+ private readonly times;
2647
+ private readonly values;
2648
+ constructor(params: AnimationTrackParameters);
2649
+ /** Samples into caller-owned storage without mutating keys or allocating scratch arrays. */
2650
+ sample(time: number, output: Float32Array): void;
2651
+ }
2652
+
2653
+ /** A semantic marker for footsteps, effects, sounds or interaction timing. Time is in clip-source seconds. */
2654
+ interface AnimationMarker {
2655
+ name: string;
2656
+ time: number;
2692
2657
  }
2693
- interface AnimationParameters {
2694
- paused?: boolean;
2695
- currentLoopCount?: number;
2696
- loop?: number;
2697
- currentTime?: number;
2698
- timeScale?: number;
2699
- startTime?: number;
2700
- endTime?: number;
2701
- rootNode?: Node | null;
2702
- animStatesList?: AnimationStates[];
2703
- validAnimationIds?: Readonly<Record<string, boolean>> | null;
2704
- clips?: Record<string, AnimationClip | null>;
2658
+ /** Immutable clip descriptor. Optional start/end select a window of the shared tracks. */
2659
+ interface AnimationClipParameters {
2660
+ name: string;
2661
+ tracks: readonly AnimationTrack[];
2662
+ start?: number;
2663
+ end?: number;
2664
+ markers?: readonly AnimationMarker[];
2705
2665
  }
2706
- interface AnimationTimeRange {
2707
- startTime: number;
2708
- endTime: number;
2666
+ /** Shareable animation asset; playback clocks and pose bindings live on the Animation instance. */
2667
+ declare class AnimationClip {
2668
+ readonly name: string;
2669
+ readonly tracks: readonly AnimationTrack[];
2670
+ readonly start: number;
2671
+ readonly end: number;
2672
+ readonly duration: number;
2673
+ readonly markers: readonly AnimationMarker[];
2674
+ constructor(params: AnimationClipParameters);
2709
2675
  }
2710
- /**
2711
- * 动画类
2712
- */
2713
- declare class Animation extends EventDispatcher {
2714
- static readonly _anims: Animation[];
2715
- /**
2716
- * tick
2717
- * @param dt - 一帧时间
2718
- */
2719
- static tick(dt: number): void;
2720
- isAnimation: boolean;
2721
- className: string;
2722
- /**
2723
- * 动画是否暂停
2724
- */
2676
+
2677
+ /** Custom numeric channel adapter. Capture the reference value once; write receives reusable storage. */
2678
+ interface AnimationPropertyBinding {
2679
+ reference: ArrayLike<number>;
2680
+ write: (value: Float32Array) => void;
2681
+ }
2682
+ /** Resolve application channels while binding a character, never during pose evaluation. */
2683
+ type AnimationBindingResolver = (node: Node, property: AnimationProperty, components: number) => AnimationPropertyBinding;
2684
+
2685
+ /** A threshold on a scalar parameter, such as character speed in metres per second. */
2686
+ interface AnimationBlendSample {
2687
+ threshold: number;
2688
+ clip: AnimationClip;
2689
+ }
2690
+ /** Immutable 1D motion asset. Adjacent clips share normalized gait phase, including unequal durations. */
2691
+ declare class AnimationBlendTree1D {
2692
+ readonly name: string;
2693
+ readonly parameter: string;
2694
+ readonly samples: readonly AnimationBlendSample[];
2695
+ constructor(name: string, parameter: string, samples: readonly AnimationBlendSample[]);
2696
+ }
2697
+ /** A state can play one clip or a continuously parameterized locomotion blend. */
2698
+ type AnimationMotion = AnimationClip | AnimationBlendTree1D;
2699
+
2700
+ /** Semantic events are emitted only by the transition destination, after pose writeback. */
2701
+ interface AnimationEvent {
2702
+ type: 'marker' | 'finished';
2703
+ layer: string;
2704
+ motion: string;
2705
+ name: string;
2706
+ /** Number of crossings coalesced into this event when a large delta spans multiple cycles. */
2707
+ count: number;
2708
+ }
2709
+ /** Layer configuration. Masks are exact track target identifiers; unspecified targets have zero weight. */
2710
+ interface AnimationLayerParameters {
2711
+ name: string;
2712
+ motions: readonly AnimationMotion[];
2713
+ weight?: number;
2714
+ mode?: 'override' | 'additive';
2715
+ mask?: Readonly<Record<string, number>>;
2716
+ onEvent?: (event: AnimationEvent) => void;
2717
+ }
2718
+ /** Transition duration is in seconds. Synchronize transfers the current normalized phase. */
2719
+ interface AnimationPlayOptions {
2720
+ fade?: number;
2721
+ synchronize?: boolean;
2722
+ loop?: boolean;
2723
+ }
2724
+ /** Per-character layer handle, created by Animation.addLayer(). */
2725
+ interface AnimationLayer {
2726
+ /** Layer identifier. */
2727
+ readonly name: string;
2728
+ /** Composition rule. */
2729
+ readonly mode: 'override' | 'additive';
2730
+ /** Overall influence in [0, 1]. */
2731
+ weight: number;
2732
+ /** Nonnegative clock multiplier for this layer's motions. */
2733
+ playbackRate: number;
2734
+ /** Current transition destination. */
2735
+ readonly currentMotion: string | undefined;
2736
+ /** Unwrapped normalized destination clock. */
2737
+ readonly normalizedTime: number;
2738
+ /** Whether a one-shot is holding its terminal pose. */
2739
+ readonly finished: boolean;
2740
+ /** Select a motion, optionally fading from all current contributions. */
2741
+ play(name: string, options?: AnimationPlayOptions): this;
2742
+ /** Remove layer motion contributions over the given seconds. */
2743
+ stop(fade?: number): void;
2744
+ /** Seek without dispatching crossed events. */
2745
+ seek(phase: number): void;
2746
+ }
2747
+
2748
+ /** Character animation configuration. All clocks use seconds except the Ticker-compatible tick(). */
2749
+ interface AnimationParameters {
2750
+ rootNode?: Node;
2751
+ clips?: readonly AnimationClip[];
2752
+ resolveBinding?: AnimationBindingResolver;
2753
+ }
2754
+ /** Character-local pose mixer. Assets are shared; bindings, clocks, layers and scratch storage are isolated. */
2755
+ declare class Animation {
2756
+ private static readonly active;
2757
+ private static serial;
2758
+ private lastTick;
2759
+ /** Advances automatically playing characters from a Ticker (milliseconds). */
2760
+ static tick(milliseconds: number): void;
2761
+ readonly isAnimation = true;
2762
+ readonly className = "Animation";
2763
+ private root;
2764
+ private readonly clipAssets;
2765
+ private readonly resolver;
2766
+ private readonly bindings;
2767
+ private readonly boundClips;
2768
+ private readonly layerList;
2769
+ private readonly layerDescriptors;
2770
+ private readonly parameters;
2771
+ private base;
2772
+ private rate;
2773
+ private destroyed;
2725
2774
  paused: boolean;
2726
- /**
2727
- * 动画当前播放次数
2728
- */
2729
- currentLoopCount: number;
2730
- /**
2731
- * 动画需要播放的次数,默认值为 Infinity 表示永远循环
2732
- */
2733
- loop: number;
2734
- /**
2735
- * 动画当前时间
2736
- */
2737
- currentTime: number;
2738
- /**
2739
- * 动画播放速度
2740
- */
2741
- timeScale: number;
2742
- /**
2743
- * 动画开始时间
2744
- */
2745
- startTime: number;
2746
- /**
2747
- * 动画结束时间,初始化后会根据 AnimationStates 来自动获取,也可以通过 play 来改变
2748
- */
2749
- endTime: number;
2750
- /**
2751
- * 动画整体的最小时间,初始化后会根据 AnimationStates 来自动获取
2752
- */
2753
- clipStartTime: number;
2754
- /**
2755
- * 动画整体的最大时间,初始化后会根据 AnimationStates 来自动获取
2756
- */
2757
- clipEndTime: number;
2758
- readonly id: string;
2759
- clips: Record<string, AnimationClip | null>;
2760
- nodeNameMap: Record<string, Node>;
2761
- private _rootNode;
2762
- /**
2763
- * 动画根节点,不指定根节点将无法正常播放动画
2764
- */
2765
- get rootNode(): Node | null;
2766
- /**
2767
- * 动画根节点,不指定根节点将无法正常播放动画
2768
- */
2769
- set rootNode(value: Node | null);
2770
- private _animStatesList;
2771
- /**
2772
- * 动画状态列表
2773
- */
2774
- get animStatesList(): AnimationStates[];
2775
- /**
2776
- * 动画状态列表
2777
- */
2778
- set animStatesList(value: AnimationStates[]);
2779
- /**
2780
- * AnimationId集合
2781
- */
2782
- validAnimationIds: Readonly<Record<string, boolean>> | null;
2783
- /**
2784
- * @param params - 创建对象的属性参数。可包含此类的所有属性。
2785
- */
2786
2775
  constructor(params?: AnimationParameters);
2787
- /**
2788
- * 添加动画剪辑
2789
- * @param name - 剪辑名字
2790
- * @param start - 动画开始时间
2791
- * @param end - 动画结束时间
2792
- * @param animStatesList - 动画帧列表
2793
- */
2794
- addClip(name: string, start: number, end: number, animStatesList: AnimationStates[]): void;
2795
- /**
2796
- * 移除动画剪辑
2797
- * @param name - 需要移除的剪辑名字
2798
- */
2799
- removeClip(name: string): void;
2800
- /**
2801
- * 获取动画列表的时间信息
2802
- * @param animStatesList - 动画列表
2803
- * @returns result `{ startTime, endTime }` 时间信息
2804
- */
2805
- getAnimStatesListTimeInfo(animStatesList: AnimationStates[]): AnimationTimeRange;
2806
- /**
2807
- * 初始化 clip time
2808
- */
2809
- private _initClipTime;
2810
- /**
2811
- * 初始化 node name map
2812
- */
2813
- _initNodeNameMap(): void;
2814
- /**
2815
- * tick
2816
- * @param dt -
2817
- */
2818
- tick(dt: number): void;
2819
- /**
2820
- * 更新动画状态
2821
- * @returns this
2822
- */
2823
- updateAnimStates(): this;
2824
- /**
2825
- * 播放动画(剪辑)
2826
- * @param startOrClipName - 动画开始时间,或者动画剪辑名字
2827
- * @param end - 动画结束时间,如果是剪辑的话不需要传
2828
- */
2829
- play(startOrClipName?: number | string, end?: number): void;
2830
- /**
2831
- * 停止动画,这个会将动画从Ticker中移除,需要重新调用play才能再次播放
2832
- */
2833
- stop(): void;
2834
- /**
2835
- * 暂停动画,这个不会将动画从Ticker中移除
2836
- */
2776
+ /** Shared clip assets. To author additional motions use addLayer(). */
2777
+ get clips(): readonly AnimationClip[];
2778
+ /** Binding root. Rebinding a live mixer requires creating a new Animation or clone(). */
2779
+ get rootNode(): Node | undefined;
2780
+ set rootNode(value: Node | undefined);
2781
+ /** Playback rate, including transitions; zero freezes time while allowing explicit pose evaluation. */
2782
+ get timeScale(): number;
2783
+ set timeScale(value: number);
2784
+ /** Set a blend parameter immediately, or exponentially damp it using a half-life and elapsed seconds. */
2785
+ setParameter(name: string, value: number, halfLife?: number, seconds?: number): void;
2786
+ /** Current scalar parameter value, defaulting to zero. */
2787
+ getParameter(name: string): number;
2788
+ /** Append a layer in composition order. Resolve nodes and capture reference properties once. */
2789
+ addLayer(params: AnimationLayerParameters): AnimationLayer;
2790
+ private createLayer;
2791
+ /** Play or crossfade a loaded clip on the default base layer and enroll in Animation.tick(). */
2792
+ play(name?: string, options?: AnimationPlayOptions): AnimationLayer;
2793
+ /** Advance from a millisecond Ticker. Manually controlled characters can call update(seconds). */
2794
+ tick(milliseconds: number): void;
2795
+ /** Evaluate one pose and write each bound property once. Call before physics/render transform collection. */
2796
+ update(seconds: number): void;
2797
+ /** Suspend automatic ticking, retaining the displayed pose and playback state. */
2837
2798
  pause(): void;
2838
- /**
2839
- * 恢复动画播放,只能针对 pause 暂停后恢复
2840
- */
2799
+ /** Enroll in automatic ticking. Do not also update manually in the same frame. */
2841
2800
  resume(): void;
2842
- /**
2843
- * clone动画
2844
- * @param rootNode - 目标动画根节点
2845
- * @returns clone的动画对象
2846
- */
2801
+ /** Stop all motions and automatic ticking, optionally restoring captured reference properties. */
2802
+ stop(restore?: boolean): void;
2803
+ /** Release node references and remove this instance from automatic ticking. Shared assets remain valid. */
2804
+ destroy(): void;
2805
+ /** Clone configuration with fresh clocks and bindings. Reference poses are copied from the source mixer. */
2847
2806
  clone(rootNode: Node): Animation;
2807
+ private assertAlive;
2848
2808
  }
2849
2809
 
2850
2810
  /**
@@ -5811,6 +5771,12 @@ interface RendererContract {
5811
5771
  /** Record resource-ready renderer passes in one synchronous backend frame boundary. */
5812
5772
  renderFrame(callback: RendererFrameCallback): void;
5813
5773
  supportsTextureCompression(format: TextureCompressionFormat): boolean;
5774
+ /**
5775
+ * Upload or refresh managed textures through one Render Graph submission without drawing.
5776
+ * Resolves after submission completion. Call outside an active render frame; failed frames
5777
+ * leave backend revisions uncommitted. Source content must remain stable until this resolves.
5778
+ */
5779
+ uploadTextures(textures: readonly Texture<unknown>[]): Promise<void>;
5814
5780
  /** Create a WebGPU renderer-owned storage buffer. WebGL 2 rejects this operation. */
5815
5781
  createStorageBuffer(descriptor: Readonly<StorageBufferDescriptor>): StorageBuffer;
5816
5782
  createRenderTarget(parameters: RenderTargetParameters): RenderTarget;
@@ -5823,6 +5789,7 @@ interface RendererContract {
5823
5789
  waitForIdle(): Promise<void>;
5824
5790
  /** Explicit opt-in access to a backend extension; unknown names return null. */
5825
5791
  getExtension(name: string): object | null;
5792
+ /** Release renderer caches and emit rhiResourcesReleased after fresh caches are available. */
5826
5793
  releaseGPUResources(): void;
5827
5794
  destroy(): void;
5828
5795
  on(type: string, listener: EventListener, once?: boolean): this;
@@ -5872,9 +5839,13 @@ type RendererListQueue = 'opaque' | 'transparent' | 'all';
5872
5839
  /**
5873
5840
  * Stable renderer-list sorting policy.
5874
5841
  *
5875
- * `material-front-to-back` is valid for opaque/all queues and preserves camera ordering for the
5876
- * transparent subqueue of `all`. `back-to-front` is valid for transparent queues. `none` retains
5877
- * collection order within each draw class while explicit instancing may still group meshes.
5842
+ * `material-front-to-back` groups opaque meshes by renderOrder, material, and geometry, then sorts
5843
+ * their world origins by increasing camera-view distance within each group, with stable identity
5844
+ * ties. Explicit instance batches keep their membership, sort their members front-to-back, and use
5845
+ * the nearest member to order the batch among matching direct draws and batches. This policy is
5846
+ * valid for opaque/all queues and preserves camera ordering for the transparent subqueue of `all`.
5847
+ * `back-to-front` is valid for transparent queues. `none` retains collection order within each draw
5848
+ * class while explicit instancing may still group meshes.
5878
5849
  */
5879
5850
  type RendererListSorting = 'material-front-to-back' | 'back-to-front' | 'none';
5880
5851
  /** Immutable selection used to prepare one or more scene draw ranges. */
@@ -5897,6 +5868,25 @@ interface RendererListDescriptor {
5897
5868
  */
5898
5869
  readonly excludeMeshes?: readonly Mesh[];
5899
5870
  }
5871
+ /** Explicit mesh selection whose draw order is preserved across all material queues. */
5872
+ interface OrderedRendererListDescriptor {
5873
+ /** Current-frame results supplying the camera and lights, without restricting membership. */
5874
+ readonly cullingResults: CullingResultsHandle;
5875
+ /**
5876
+ * Meshes to draw in the supplied order. Membership is snapshotted when the list is created;
5877
+ * duplicate, destroyed, or incomplete meshes are rejected. Visibility, camera layers, frustum
5878
+ * rejection, display sorting and planner-owned `useInstanced` batching are bypassed.
5879
+ *
5880
+ * World matrices follow the normal scene update contract. For meshes outside the invocation
5881
+ * scene, update their root's world matrices before recording the list. Explicit per-mesh
5882
+ * `instanceCount` and per-instance geometry streams remain supported.
5883
+ */
5884
+ readonly meshes: readonly Mesh[];
5885
+ /** Optional material used for every selected mesh. */
5886
+ readonly overrideMaterial?: MaterialInstance;
5887
+ /** Semantic material pass compiled for every selected draw. Defaults to `forward`. */
5888
+ readonly materialPass?: MaterialPassRole;
5889
+ }
5900
5890
 
5901
5891
  /** Physical dimension of a scriptable render-pipeline texture. */
5902
5892
  type RenderPipelineTextureDimension = '1d' | '2d' | '3d';
@@ -6191,7 +6181,11 @@ interface ScriptableRenderGraph {
6191
6181
  importRenderTarget(target: RenderTarget): RenderPipelineTargetResources;
6192
6182
  /** Acquire a renderer-local persistent target keyed by runtime-owned object identity. */
6193
6183
  acquirePersistentTarget(key: object, descriptor: Readonly<RenderPipelinePersistentTargetDescriptor>): RenderPipelineTargetResources;
6194
- /** Acquire one renderer-owned history ring; it rotates only after a successful write frame. */
6184
+ /**
6185
+ * Acquire one renderer-owned history ring. Only a submitted, live write retaining complete
6186
+ * contents rotates the ring; a final discard invalidates the current slot and keeps the last
6187
+ * stored history.
6188
+ */
6195
6189
  acquireHistoryTexture(key: object, descriptor: Readonly<RenderPipelineHistoryTextureDescriptor>): RenderPipelineHistoryTextureResources;
6196
6190
  /** Invalidate submitted history before acquiring it in the active frame. */
6197
6191
  invalidateHistoryTexture(key: object): boolean;
@@ -6445,8 +6439,21 @@ interface RenderPipelineRequirements {
6445
6439
  /** Required texture-format roles. */
6446
6440
  readonly requiredTextureFormats?: readonly Readonly<RenderPipelineTextureRequirement>[];
6447
6441
  }
6442
+ /** Static camera and invocation constraints enforced before a pipeline records graph work. */
6443
+ interface RenderPipelineInvocationPolicy {
6444
+ /** Accepted camera class; `any` includes perspective, orthographic, and custom cameras. */
6445
+ readonly cameraType: 'any' | 'perspective';
6446
+ /**
6447
+ * Maximum calls to record() in one application frame, or `null` for no host-imposed limit.
6448
+ * A renderFrame() callback shares this budget across surface and render-target invocations.
6449
+ * This does not imply simultaneous GPU multiview rendering or independent temporal histories.
6450
+ */
6451
+ readonly maxInvocationsPerFrame: number | null;
6452
+ }
6448
6453
  /** Immutable creation inputs for one renderer-local pipeline runtime. */
6449
6454
  interface RenderPipelineCreateContext {
6455
+ /** Create a renderer-owned target for a runtime; the runtime must destroy it on teardown. */
6456
+ createRenderTarget(parameters: Readonly<RenderTargetParameters>): RenderTarget;
6450
6457
  /** Capabilities for the selected device generation. */
6451
6458
  readonly capabilities: RenderPipelineCapabilities;
6452
6459
  /**
@@ -6603,6 +6610,14 @@ interface RenderPipelineShadowOptions {
6603
6610
  }
6604
6611
  /** Frame-scoped recording context; retaining it after record() returns is an error. */
6605
6612
  interface RenderPipelineContext {
6613
+ /**
6614
+ * Record an auxiliary camera into a renderer-owned target in the same graph/submission.
6615
+ * Call before this context's first cull or shadow recording. The callback is synchronous,
6616
+ * receives its own camera/light/graph-handle scope, and cannot nest recordView(). The parent
6617
+ * context is suspended during the callback. Failure aborts the complete application frame.
6618
+ * This does not invoke the configured main-view pipeline or advance its temporal history.
6619
+ */
6620
+ recordView(camera: Camera, target: RenderTarget, record: (context: RenderPipelineContext) => unknown): void;
6606
6621
  /** Monotonic application frame index. */
6607
6622
  readonly frameIndex: number;
6608
6623
  /** Scene supplied to the current renderer invocation. */
@@ -6627,6 +6642,8 @@ interface RenderPipelineContext {
6627
6642
  cull(options?: Readonly<CullingOptions>): CullingResultsHandle;
6628
6643
  /** Select and sort a reusable draw list from current-frame culling results. */
6629
6644
  createRendererList(descriptor: Readonly<RendererListDescriptor>): RendererListHandle;
6645
+ /** Draw an explicit mesh sequence through shared preparation without sorting or regrouping. */
6646
+ createOrderedRendererList(descriptor: Readonly<OrderedRendererListDescriptor>): RendererListHandle;
6630
6647
  /**
6631
6648
  * Record the shared directional, spot, and point-light shadow atlas for these results.
6632
6649
  * Returns the exact graph texture and packed sampling data, or `null` when no shadow slice is
@@ -6671,6 +6688,12 @@ interface RenderPipelineFactory {
6671
6688
  readonly name: string;
6672
6689
  /** Static constraints snapshotted before asynchronous renderer creation. */
6673
6690
  readonly requirements?: Readonly<RenderPipelineRequirements>;
6691
+ /**
6692
+ * Camera and per-application-frame invocation constraints, snapshotted before creation.
6693
+ * Omission accepts any camera with no host-imposed invocation limit. Violations abort the
6694
+ * entire application frame before submission, even when the caller catches the error.
6695
+ */
6696
+ readonly invocationPolicy?: Readonly<RenderPipelineInvocationPolicy>;
6674
6697
  /** Create independent state for one Renderer. */
6675
6698
  create(context: RenderPipelineCreateContext): RenderPipeline | Promise<RenderPipeline>;
6676
6699
  }
@@ -6793,6 +6816,8 @@ declare class Renderer<Backend extends RendererBackend = RendererBackend> implem
6793
6816
  readonly renderToTarget: RendererContract['renderToTarget'];
6794
6817
  readonly onInit: (callback: (renderer: this) => void) => void;
6795
6818
  readonly waitForIdle: RendererContract['waitForIdle'];
6819
+ /** Upload managed textures through a graph submission and await its fence, without drawing. */
6820
+ readonly uploadTextures: RendererContract['uploadTextures'];
6796
6821
  readonly getExtension: RendererContract['getExtension'];
6797
6822
  readonly releaseGPUResources: RendererContract['releaseGPUResources'];
6798
6823
  readonly destroy: RendererContract['destroy'];
@@ -6864,6 +6889,8 @@ interface NodeParameters {
6864
6889
  sortingLayer?: number;
6865
6890
  /** Fine 2D display order within `sortingLayer`. Higher values render later. */
6866
6891
  zIndex?: number;
6892
+ /** Keep this node's transparent subtree together in automatic renderer-list sorting. */
6893
+ sortingGroup?: boolean;
6867
6894
  pointerEnabled?: boolean;
6868
6895
  pointerChildren?: boolean;
6869
6896
  useHandCursor?: boolean;
@@ -6901,6 +6928,7 @@ interface NodeParameters {
6901
6928
  * ```
6902
6929
  */
6903
6930
  declare class Node extends EventDispatcher {
6931
+ #private;
6904
6932
  static readonly typeName: string;
6905
6933
  id: string;
6906
6934
  up: Vector3;
@@ -6979,6 +7007,7 @@ declare class Node extends EventDispatcher {
6979
7007
  layer: number;
6980
7008
  private sortingLayerValue;
6981
7009
  private zIndexValue;
7010
+ private sortingGroupValue;
6982
7011
  /**
6983
7012
  * 可视对象是否接受交互事件。默认为接受交互事件,即true。
6984
7013
  */
@@ -7250,6 +7279,14 @@ declare class Node extends EventDispatcher {
7250
7279
  /** Fine 2D display order within `sortingLayer`. Higher values render later. */
7251
7280
  get zIndex(): number;
7252
7281
  set zIndex(value: number);
7282
+ /**
7283
+ * Treat this transparent subtree as one external sorting unit. Defaults to false.
7284
+ * Groups sort by their own sortingLayer/zIndex, camera-view depth and stable scene order;
7285
+ * descendant renderOrder values apply only inside the group. Nested groups remain atomic.
7286
+ * Opaque queues and explicit ordered or unsorted renderer lists are unaffected.
7287
+ */
7288
+ get sortingGroup(): boolean;
7289
+ set sortingGroup(value: boolean);
7253
7290
  /**
7254
7291
  * x轴坐标
7255
7292
  */
@@ -7382,7 +7419,8 @@ declare class Node extends EventDispatcher {
7382
7419
  /** 冒泡指针事件,并维护各 pointerId 的进入/离开状态。 */
7383
7420
  _firePointerEvent(event: NodePointerEvent): void;
7384
7421
  /**
7385
- * 销毁 Node 资源
7422
+ * Destroy this hierarchy, invoking each child node's destroy override once.
7423
+ * Child failures are aggregated after remaining descendants have been released and detached.
7386
7424
  * @param renderer - stage时可以不传
7387
7425
  * @param destroyTextures - 是否销毁材质的贴图,默认不销毁
7388
7426
  * @returns this
@@ -7441,8 +7479,167 @@ declare class SphericalHarmonics3 {
7441
7479
  copy(other: SphericalHarmonics3): this;
7442
7480
  }
7443
7481
 
7482
+ type CubeTextureImage = (TextureImageSource | null)[];
7483
+ interface CubeTextureParameters extends Omit<TextureParameters<CubeTextureImage>, 'target'> {
7484
+ image?: CubeTextureImage | null;
7485
+ }
7486
+ /**
7487
+ * 立方体纹理
7488
+ * @example
7489
+ * ```ts
7490
+ * const loadQueue = new Hilo3d.LoadQueue([{
7491
+ * src: './textures/cube/right.jpg'
7492
+ * }, {
7493
+ * src: './textures/cube/left.jpg'
7494
+ * }, {
7495
+ * src: './textures/cube/top.jpg'
7496
+ * }, {
7497
+ * src: './textures/cube/bottom.jpg'
7498
+ * }, {
7499
+ * src: './textures/cube/front.jpg'
7500
+ * }, {
7501
+ * src: './textures/cube/back.jpg'
7502
+ * }]).on('complete', function () {
7503
+ * const result = loadQueue.getAllContent();
7504
+ * const skyboxMap = new Hilo3d.CubeTexture({
7505
+ * image: result
7506
+ * });
7507
+ * const skybox = new Hilo3d.Mesh({
7508
+ * geometry: new Hilo3d.BoxGeometry(),
7509
+ * material: new Hilo3d.BasicMaterial({
7510
+ * lightType: 'NONE',
7511
+ * diffuse: skyboxMap
7512
+ * })
7513
+ * });
7514
+ * stage.addChild(skybox);
7515
+ * });
7516
+ * ```
7517
+ */
7518
+ declare class CubeTexture extends Texture<CubeTextureImage> {
7519
+ isCubeTexture: boolean;
7520
+ readonly className: string;
7521
+ /**
7522
+ * @param params - 初始化参数,所有params都会复制到实例上
7523
+ * - `params.image`: 图片列表,共6张
7524
+ */
7525
+ constructor(params?: CubeTextureParameters);
7526
+ private getImage;
7527
+ private setImage;
7528
+ /**
7529
+ * 右侧的图片
7530
+ */
7531
+ get right(): HTMLImageElement | undefined;
7532
+ /**
7533
+ * 右侧的图片
7534
+ */
7535
+ set right(img: HTMLImageElement | undefined);
7536
+ /**
7537
+ * 左侧的图片
7538
+ */
7539
+ get left(): HTMLImageElement | undefined;
7540
+ /**
7541
+ * 左侧的图片
7542
+ */
7543
+ set left(img: HTMLImageElement | undefined);
7544
+ /**
7545
+ * 顶部的图片
7546
+ */
7547
+ get top(): HTMLImageElement | undefined;
7548
+ /**
7549
+ * 顶部的图片
7550
+ */
7551
+ set top(img: HTMLImageElement | undefined);
7552
+ /**
7553
+ * 底部的图片
7554
+ */
7555
+ get bottom(): HTMLImageElement | undefined;
7556
+ /**
7557
+ * 底部的图片
7558
+ */
7559
+ set bottom(img: HTMLImageElement | undefined);
7560
+ /**
7561
+ * 朝前的图片
7562
+ */
7563
+ get front(): HTMLImageElement | undefined;
7564
+ /**
7565
+ * 朝前的图片
7566
+ */
7567
+ set front(img: HTMLImageElement | undefined);
7568
+ /**
7569
+ * 朝后的图片
7570
+ */
7571
+ get back(): HTMLImageElement | undefined;
7572
+ /**
7573
+ * 朝后的图片
7574
+ */
7575
+ set back(img: HTMLImageElement | undefined);
7576
+ }
7577
+
7578
+ /** Static inputs for an axis-aligned local specular reflection volume. */
7579
+ interface ReflectionProbeOptions {
7580
+ /** World-space capture position, strictly inside the projection box. Copied at construction. */
7581
+ readonly position: Readonly<Vector3>;
7582
+ /** World-space minimum corner of the projection/influence box. Copied at construction. */
7583
+ readonly boxMin: Readonly<Vector3>;
7584
+ /** World-space maximum corner of the projection/influence box. Copied at construction. */
7585
+ readonly boxMax: Readonly<Vector3>;
7586
+ /** GGX-prefiltered cubemap. Omit to create a dynamic probe for ReflectionProbePipelineFactory. */
7587
+ readonly texture?: CubeTexture;
7588
+ /** Texture encoding; static RGBD inputs divide RGB by alpha. Defaults to linear. */
7589
+ readonly encoding?: 'linear' | 'rgbd';
7590
+ /** Width of the inward boundary fade in world units; defaults to 10% of the shortest side. */
7591
+ readonly blendDistance?: number;
7592
+ /** Non-negative radiance multiplier. Defaults to one. */
7593
+ readonly intensity?: number;
7594
+ /** Optional diagnostic name. */
7595
+ readonly name?: string;
7596
+ }
7597
+ /** Immutable publication status for a local reflection probe. */
7598
+ interface ReflectionProbeDiagnostics {
7599
+ /** Whether a complete static or submitted dynamic reflection is available. */
7600
+ readonly ready: boolean;
7601
+ /** Number of complete dynamic captures published, excluding discarded work. */
7602
+ readonly captures: number;
7603
+ /** Monotonic requested capture revision; changes only through requestUpdate(). */
7604
+ readonly requestedRevision: number;
7605
+ /** Last complete capture's requested revision. */
7606
+ readonly capturedRevision: number;
7607
+ }
7608
+ /**
7609
+ * Bounded world-space specular probe. Materials explicitly bind at most two probes and blend them
7610
+ * per pixel. A dynamic probe belongs to one live capture runtime; authored cubemaps remain owned
7611
+ * by the application. Probe transport is independent of diffuse DDGI.
7612
+ */
7613
+ declare class ReflectionProbe {
7614
+ #private;
7615
+ /** Diagnostic label used for capture resources. */
7616
+ readonly name: string;
7617
+ /** Copied world-space capture position, ordered X/Y/Z. */
7618
+ readonly position: readonly [number, number, number];
7619
+ /** Copied world-space minimum corner, ordered X/Y/Z. */
7620
+ readonly boxMin: readonly [number, number, number];
7621
+ /** Copied world-space maximum corner, ordered X/Y/Z. */
7622
+ readonly boxMax: readonly [number, number, number];
7623
+ /** Inward smooth boundary-fade width in world units. */
7624
+ readonly blendDistance: number;
7625
+ /** Authored radiance encoding; dynamic capture always uses linear HDR. */
7626
+ readonly encoding: 'linear' | 'rgbd';
7627
+ /** Whether this probe needs a capture runtime instead of an authored cubemap. */
7628
+ readonly dynamic: boolean;
7629
+ constructor(options: Readonly<ReflectionProbeOptions>);
7630
+ /** Radiance multiplier; zero disables this probe's contribution. */
7631
+ get intensity(): number;
7632
+ set intensity(value: number);
7633
+ /** Request a complete new dynamic capture. In-progress captures finish before newer work. */
7634
+ requestUpdate(): void;
7635
+ /** Return immutable publication counters; partial captures never become ready results. */
7636
+ getDiagnostics(): Readonly<ReflectionProbeDiagnostics>;
7637
+ }
7638
+
7444
7639
  type PBRMaterialTextureInput = Texture<unknown> | MaterialTextureSlotInput | null;
7445
7640
  interface PBRMaterialParameters extends MaterialInstanceParameters {
7641
+ /** One or two local specular volumes, blended per pixel with the environment fallback. */
7642
+ readonly reflectionProbes?: readonly ReflectionProbe[];
7446
7643
  /** Compile the standard surface without lighting. */
7447
7644
  readonly unlit?: boolean;
7448
7645
  readonly baseColor?: Color;
@@ -7507,6 +7704,8 @@ declare class PBRMaterialBuilder {
7507
7704
  /** Physically based standard-surface material with immutable shader topology. */
7508
7705
  declare class PBRMaterial extends MaterialInstance {
7509
7706
  #private;
7707
+ /** Immutable membership of this material's local reflection volumes. */
7708
+ readonly reflectionProbes: readonly ReflectionProbe[];
7510
7709
  readonly isPBRMaterial = true;
7511
7710
  readonly className: string;
7512
7711
  readonly baseColor: Color;
@@ -8140,7 +8339,6 @@ type GLTFExtensionHandlerRegistry = Record<string, GLTFExtensionHandler>;
8140
8339
  interface GLTFParserParameters {
8141
8340
  src?: string;
8142
8341
  defaultScene?: GLTFIndex;
8143
- isMultiAnim?: boolean;
8144
8342
  isProgressive?: boolean;
8145
8343
  isUnQuantizeInShader?: boolean;
8146
8344
  isLoadAllTextures?: boolean;
@@ -8168,7 +8366,6 @@ declare class GLTFParser {
8168
8366
  json: GLTFRoot;
8169
8367
  src: string;
8170
8368
  defaultScene: GLTFIndex | undefined;
8171
- isMultiAnim: boolean;
8172
8369
  isProgressive: boolean;
8173
8370
  isUnQuantizeInShader: boolean;
8174
8371
  isLoadAllTextures: boolean;
@@ -8267,7 +8464,6 @@ declare class GLTFParser {
8267
8464
  private requireScalarAccessor;
8268
8465
  private validateKeyTimes;
8269
8466
  private validateAnimationOutput;
8270
- private animationRange;
8271
8467
  parseScene(): GLTFModel;
8272
8468
  getDefaultSceneName(): GLTFIndex;
8273
8469
  parseSkins(): void;
@@ -8278,10 +8474,10 @@ declare const WEB3D_quantized_attributes: {
8278
8474
  parse(extensionData: unknown, parser: GLTFParser, result: unknown, options: GLTFExtensionOptions): GeometryData;
8279
8475
  };
8280
8476
  declare const HILO_animation_clips: {
8281
- parseOnEnd(extensionData: unknown, parser: GLTFParser, result: unknown): GLTFModel;
8477
+ parseOnEnd(extensionData: unknown, _parser: GLTFParser, result: unknown): GLTFModel;
8282
8478
  };
8283
8479
  declare const ALI_animation_clips: {
8284
- parseOnEnd(extensionData: unknown, parser: GLTFParser, result: unknown): GLTFModel;
8480
+ parseOnEnd(extensionData: unknown, _parser: GLTFParser, result: unknown): GLTFModel;
8285
8481
  };
8286
8482
  declare const ALI_bounding_box: {
8287
8483
  parseOnEnd(extensionData: unknown, _parser: GLTFParser, result: unknown): GLTFModel;
@@ -8554,6 +8750,7 @@ interface StagePointerEvent extends NodePointerEvent {
8554
8750
  * ```
8555
8751
  */
8556
8752
  declare class Stage<Backend extends RendererBackend = RendererBackend> extends Node {
8753
+ #private;
8557
8754
  static readonly typeName: string;
8558
8755
  isStage: boolean;
8559
8756
  className: string;
@@ -8709,6 +8906,7 @@ declare class Stage<Backend extends RendererBackend = RendererBackend> extends N
8709
8906
  * @param eventMode -
8710
8907
  */
8711
8908
  getMeshResultAtPoint(x: number, y: number, eventMode?: boolean): NodeRaycastInfo | null;
8909
+ private grouped2DHit;
8712
8910
  private sortCameras;
8713
8911
  /**
8714
8912
  * 释放当前图形后端资源。
@@ -9996,12 +10194,88 @@ declare const UNIFORM_BLOCK_BINDINGS: Readonly<{
9996
10194
  readonly SkinningBlock: 7;
9997
10195
  readonly MorphBlock: 8;
9998
10196
  readonly MaterialTextureBlock: 9;
10197
+ readonly ReflectionProbeBlock: 10;
9999
10198
  }>;
10000
- declare const BUILTIN_UNIFORM_BLOCK_BINDING_COUNT = 10;
10199
+ declare const BUILTIN_UNIFORM_BLOCK_BINDING_COUNT = 11;
10001
10200
  /** Register an application block before linking programs. Binding points must be globally stable. */
10002
10201
  declare function registerUniformBlockBinding(name: string, bindingPoint?: number): number;
10003
10202
  declare function getUniformBlockBinding(name: string): number;
10004
10203
 
10204
+ /** WebGPU dynamic diffuse global illumination using a bounded world-space probe volume. */
10205
+ interface DynamicGlobalIlluminationOptions {
10206
+ /** Position of the first probe. Defaults to (-4, 0, -4). */
10207
+ readonly origin?: Readonly<Vector3>;
10208
+ /** Positive world-space separation on each axis. Defaults to (1, 1, 1). */
10209
+ readonly spacing?: Readonly<Vector3>;
10210
+ /** Probe counts on X/Y/Z, each at least two; total limited to 4096. Defaults to [9, 5, 9]. */
10211
+ readonly probeCounts?: readonly [number, number, number];
10212
+ /** Uniform spherical rays per updated probe, one of 64, 128, 256. Defaults to 128. */
10213
+ readonly raysPerProbe?: 64 | 128 | 256;
10214
+ /** Strict maximum number of probes traced per frame. Defaults to 32. */
10215
+ readonly maxProbesPerFrame?: number;
10216
+ /** Maximum old-irradiance contribution in [0, 0.98]. Scene and light edits restart accumulation. */
10217
+ readonly hysteresis?: number;
10218
+ /** Diffuse indirect illumination multiplier in [0, 8]. Defaults to one. */
10219
+ readonly intensity?: number;
10220
+ /** World-space surface-normal visibility bias. Defaults to 0.08. */
10221
+ readonly normalBias?: number;
10222
+ /** World-space receiver-to-camera visibility bias. Defaults to 0.04. */
10223
+ readonly viewBias?: number;
10224
+ /** Maximum primary and directional-shadow ray distance. Defaults to 32 world units. */
10225
+ readonly maxRayDistance?: number;
10226
+ /** Linear RGB radiance for rays that miss the complete offscreen scene. */
10227
+ readonly environment?: Readonly<Color>;
10228
+ /** Fraction of the previously submitted diffuse bounce reused at hits, in [0, 0.95]. Defaults to 0.7. */
10229
+ readonly bounceStrength?: number;
10230
+ /** Clamp per-ray radiance before temporal integration to control fireflies. Defaults to 32. */
10231
+ readonly maxRayRadiance?: number;
10232
+ /** Relocate probes away from surfaces and out of solids within 45% of cell spacing. Defaults to true. */
10233
+ readonly relocation?: boolean;
10234
+ /** Maximum triangles in the CPU BVH and GPU ray scene. Defaults to 65536. */
10235
+ readonly maxTriangles?: number;
10236
+ /** Maximum world-space point, spot and directional lights; overflow fails clearly. Defaults to 32. */
10237
+ readonly maxLights?: number;
10238
+ /** Unsupported geometry/material handling. Defaults to error. */
10239
+ readonly unsupported?: 'error' | 'exclude';
10240
+ /** Texture handling for ray-hit diffuse/emissive factors. Defaults to error. */
10241
+ readonly texturePolicy?: 'error' | 'exclude' | 'material-factor';
10242
+ }
10243
+ /** CPU-known counts for the last submitted DDGI frame; no implicit GPU readback. */
10244
+ interface DynamicGlobalIlluminationDiagnostics {
10245
+ /** Total number of probes in the volume. */
10246
+ readonly probeCount: number;
10247
+ /** Scheduled probes whose ray updates were submitted. */
10248
+ readonly updatedProbeCount: number;
10249
+ /** Submitted primary rays; secondary light-visibility rays are not included. */
10250
+ readonly tracedRayCount: number;
10251
+ /** Current complete offscreen ray-scene triangle count. */
10252
+ readonly sceneTriangleCount: number;
10253
+ /** Current complete offscreen BVH node count. */
10254
+ readonly sceneNodeCount: number;
10255
+ /** Unsupported scene meshes deliberately omitted under the selected policy. */
10256
+ readonly excludedMeshCount: number;
10257
+ /** Textured meshes encountered during extraction; texturePolicy and excludedMeshCount describe their treatment. */
10258
+ readonly texturedMeshCount: number;
10259
+ /** Meshes changed during the last extraction. */
10260
+ readonly changedMeshCount: number;
10261
+ /** Last CPU scene update operation. */
10262
+ readonly sceneUpdate: 'rebuild' | 'refit' | 'material';
10263
+ /** Allocated persistent buffer bytes, including both probe-history slots. */
10264
+ readonly residentBytes: number;
10265
+ /** CPU bytes uploaded by the last successful frame, including parameters and lights. */
10266
+ readonly uploadedBytes: number;
10267
+ /** Subset of uploadedBytes used for changed triangles and BVH nodes. */
10268
+ readonly sceneUploadedBytes: number;
10269
+ /** Number of successful probe-update submissions. */
10270
+ readonly submittedFrameCount: number;
10271
+ /** Number of scheduled frames needed to visit every probe. */
10272
+ readonly updateCycleFrames: number;
10273
+ /** Exact light count included in ray-hit direct illumination. */
10274
+ readonly lightCount: number;
10275
+ /** Unsupported lights omitted only under the explicit exclude policy. */
10276
+ readonly excludedLightCount: number;
10277
+ }
10278
+
10005
10279
  /** Stable stages at which a forward feature may synchronously record graph work. */
10006
10280
  type ForwardRenderInjectionPoint = 'before-shadow' | 'after-shadow' | 'before-opaque' | 'after-opaque' | 'before-transparent' | 'after-transparent' | 'before-post-process' | 'after-post-process' | 'before-output';
10007
10281
  /** Static resource and device requirements declared before backend selection. */
@@ -10125,6 +10399,8 @@ declare class ForwardRenderPipelineFactory implements RenderPipelineFactory {
10125
10399
  #private;
10126
10400
  /** Stable factory name. */
10127
10401
  readonly name = "forward";
10402
+ /** Accepts every camera class and repeated invocations within one application frame. */
10403
+ readonly invocationPolicy: Readonly<RenderPipelineInvocationPolicy>;
10128
10404
  /** Merged static requirements from every feature configuration. */
10129
10405
  readonly requirements: Readonly<RenderPipelineRequirements>;
10130
10406
  /** Constructor-snapshotted feature configurations in insertion order. */
@@ -10138,1188 +10414,1217 @@ declare class ForwardRenderPipelineFactory implements RenderPipelineFactory {
10138
10414
  create(context: RenderPipelineCreateContext): RenderPipeline;
10139
10415
  }
10140
10416
 
10141
- /** GPU-time-driven dynamic-resolution controls. */
10142
- interface DynamicResolutionOptions {
10143
- /** Lowest internal resolution scale. Defaults to 0.5. */
10144
- readonly minScale?: number;
10145
- /** Highest internal resolution scale. Defaults to 1. */
10146
- readonly maxScale?: number;
10147
- /** Initial scale before enough GPU samples are available. Defaults to `maxScale`. */
10148
- readonly initialScale?: number;
10149
- /** Target summed profiled Render Graph render/compute duration in milliseconds. Defaults to 16.667. */
10150
- readonly targetFrameTimeMs?: number;
10151
- /** Symmetric no-change band around the target, as a ratio. Defaults to 0.1. */
10152
- readonly hysteresis?: number;
10153
- /** EWMA contribution of the newest GPU sample. Defaults to 0.2. */
10154
- readonly response?: number;
10155
- /** Quantized scale adjustment applied at each decision. Defaults to 0.05. */
10156
- readonly scaleStep?: number;
10157
- /** Successful GPU samples required before the first decision. Defaults to 6. */
10158
- readonly warmupFrames?: number;
10159
- /** Minimum GPU samples between scale changes. Defaults to 8. */
10160
- readonly settlingFrames?: number;
10161
- }
10162
- /** Temporal anti-aliasing, temporal upscaling, and optional dynamic-resolution controls. */
10163
- interface TemporalAAOptions {
10164
- /**
10165
- * Internal scene resolution relative to the output. Values below one enable TAAU. When
10166
- * `dynamicResolution` is present this overrides that object's initial scale.
10167
- * Defaults to 1 and is constrained to the inclusive range 0.5–1.
10168
- */
10169
- readonly renderScale?: number;
10170
- /** GPU timestamp driven dynamic resolution. Omit or use false for a fixed render scale. */
10171
- readonly dynamicResolution?: Readonly<DynamicResolutionOptions> | false;
10172
- /** Maximum accepted history contribution after rejection. Defaults to 0.92. */
10173
- readonly historyWeight?: number;
10174
- /** Maximum relative previous-view-depth error. Defaults to 0.02. */
10175
- readonly depthThreshold?: number;
10176
- /** Standard-deviation extent used by YCoCg variance clipping. Defaults to 1.25. */
10177
- readonly varianceGamma?: number;
10178
- /** Resolve-only contrast restoration; history remains unsharpened. Defaults to 0.08. */
10179
- readonly sharpness?: number;
10417
+ /** One graph-buffer range consumed by a storage binding. */
10418
+ interface ComputeBufferBinding {
10419
+ /** Frame-scoped graph buffer handle. */
10420
+ readonly buffer: RenderGraphBufferHandle;
10421
+ /** Four-byte-aligned offset into the buffer, defaulting to zero. */
10422
+ readonly byteOffset?: number;
10423
+ /** Four-byte-aligned bound range, defaulting to the remaining buffer. */
10424
+ readonly byteLength?: number;
10180
10425
  }
10181
- /** Stable adaptive-resolution telemetry for renderer diagnostics. */
10182
- interface DynamicResolutionDiagnostics {
10183
- /** Current internal scene resolution relative to the output. */
10184
- readonly renderScale: number;
10185
- /** EWMA of accepted profiled Render Graph GPU work, or null before the first sample. */
10186
- readonly smoothedGPUFrameTimeMs: number | null;
10187
- /** Number of distinct ready GPU timeline samples accepted by this controller. */
10188
- readonly sampledFrameCount: number;
10426
+ /** One graph texture consumed by a sampled- or storage-texture binding. */
10427
+ interface ComputeTextureBinding {
10428
+ /** Complete single-sample two-dimensional graph texture subresource. */
10429
+ readonly texture: RenderGraphTextureAccessHandle;
10430
+ }
10431
+ /** A whole std140 uniform buffer or one explicitly selected range. */
10432
+ type ComputeUniformBufferBinding = UniformBuffer | UniformBufferRange;
10433
+ /** Direct or GPU-authored indirect dispatch dimensions. */
10434
+ type ComputeDispatch = Readonly<{
10435
+ x: number;
10436
+ y?: number;
10437
+ z?: number;
10438
+ }> | Readonly<{
10439
+ indirectBuffer: RenderGraphBufferHandle;
10440
+ indirectOffset?: number;
10441
+ }>;
10442
+ /** Frame-scoped binding resources and dispatch parameters for one compute pass. */
10443
+ interface ComputeRenderPassParameters {
10444
+ /** std140 uniform resources in sorted uniform-binding order. */
10445
+ readonly uniformBuffers?: readonly ComputeUniformBufferBinding[];
10446
+ /** Storage resources in sorted storage-buffer-binding order. */
10447
+ readonly buffers: readonly ComputeBufferBinding[];
10448
+ /** Texture resources in sorted sampled/storage-texture-binding order. */
10449
+ readonly textures: readonly ComputeTextureBinding[];
10450
+ /** Immutable samplers in sorted sampler-binding order. */
10451
+ readonly samplers?: readonly ComputeSampler[];
10452
+ /** Direct dimensions or an indirect argument buffer. */
10453
+ readonly dispatch: ComputeDispatch;
10189
10454
  }
10190
10455
  /**
10191
- * Temporal anti-aliasing, temporal upscaling, and GPU-time dynamic-resolution feature.
10456
+ * Stable WebGPU compute pass backed by one immutable {@link ComputeKernel}.
10192
10457
  *
10193
- * The feature records built-in opaque/masked motion and logarithmic view-depth data after opaque
10194
- * shading, resolves only opaque scene color, then lets transparent rendering and Bloom compose
10195
- * afterward. History uses submission-aware double buffers and is reset by camera cuts, resize,
10196
- * projection discontinuities, visibility gaps, or device recovery.
10458
+ * Binding arrays are positional within their resource category and follow the shader ABI after
10459
+ * sorting by `(group, binding)`. Setup derives graph access directly from that ABI; callers cannot
10460
+ * downgrade a writable storage binding to a read dependency.
10197
10461
  */
10198
- declare class TemporalAA implements ForwardRenderPipelineFeature {
10199
- #private;
10200
- readonly name = "temporal-aa";
10201
- readonly injectionPoint: "after-opaque";
10202
- readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
10203
- constructor(options?: Readonly<TemporalAAOptions>);
10204
- create(): ForwardRenderPipelineFeatureRuntime;
10205
- /** Read adaptive-resolution state when this feature is attached to exactly one live Renderer. */
10206
- readDynamicResolutionDiagnostics(): Readonly<DynamicResolutionDiagnostics>;
10462
+ declare class ComputeRenderPass implements ScriptableRenderPass<ComputeRenderPassParameters> {
10463
+ /** Stable diagnostic pass name. */
10464
+ readonly name: string;
10465
+ /** Immutable compute pipeline and shader identity. */
10466
+ readonly kernel: ComputeKernel;
10467
+ constructor(kernel: ComputeKernel, name?: string);
10468
+ /** Declare storage, texture, and indirect dependencies from the immutable shader ABI. */
10469
+ setup(builder: ScriptableRenderPassBuilder, parameters: ComputeRenderPassParameters): void;
10470
+ /** Command emission is supplied by the framework after the pass callback returns. */
10471
+ execute(_context: ScriptableRenderPassContext, _parameters: ComputeRenderPassParameters): void;
10207
10472
  }
10208
10473
 
10209
- /** Production controls for the WebGPU high-end hierarchical screen-space reflection path. */
10210
- interface ScreenSpaceReflectionsOptions {
10211
- /** Reflection trace resolution relative to the internal scene. Defaults to 0.5. */
10212
- readonly resolutionScale?: number;
10213
- /** Maximum view-space ray length. Defaults to 80. */
10214
- readonly maxRayDistance?: number;
10215
- /** View-space surface thickness accepted as a hit. Defaults to 0.2. */
10216
- readonly thickness?: number;
10217
- /** Minimum view-space distance advanced by the finest hierarchy level. Defaults to 0.12. */
10218
- readonly stride?: number;
10219
- /** Maximum hierarchical iterations per reflected pixel. Defaults to 64. */
10220
- readonly maxSteps?: number;
10221
- /** Surfaces at or above this perceptual roughness stop tracing. Defaults to 0.85. */
10222
- readonly roughnessCutoff?: number;
10223
- /** Width of the screen-edge confidence fade in normalized coordinates. Defaults to 0.08. */
10224
- readonly edgeFade?: number;
10225
- /** Maximum accepted temporal history contribution. Defaults to 0.9. */
10226
- readonly historyWeight?: number;
10227
- /** Maximum relative reprojected view-depth error. Defaults to 0.03. */
10228
- readonly depthThreshold?: number;
10229
- /** Linear HDR multiplier applied to SSR radiance, without scaling fallback removal. Defaults to 1. */
10230
- readonly intensity?: number;
10474
+ /** A keyed cache with optional object-identity lookup. */
10475
+ declare class Cache<Value = unknown> {
10476
+ private readonly entries;
10477
+ private objectIds;
10478
+ /** @internal Renderer diagnostics only; not part of the public cache contract. */
10479
+ get size(): number;
10480
+ get(id: string): Value | undefined;
10481
+ getObject(object: object): Value | undefined;
10482
+ add(id: string, value: Value): void;
10483
+ remove(id: string): void;
10484
+ removeObject(object: object): void;
10485
+ removeAll(): void;
10486
+ each(callback: (value: Value, id: string) => void): void;
10231
10487
  }
10232
10488
 
10233
- /** Quality preset used when an individual GTAO sampling control is omitted. */
10234
- type GroundTruthAmbientOcclusionQuality = 'low' | 'medium' | 'high' | 'ultra';
10235
- /** Normal source used for GTAO horizon integration and edge rejection. */
10236
- type GroundTruthAmbientOcclusionNormalSource = 'material' | 'geometry' | 'hybrid';
10237
- /** Production controls for ground-truth ambient occlusion. */
10238
- interface GroundTruthAmbientOcclusionOptions {
10239
- /** Sampling preset. Individual resolution/direction/step controls override it. Defaults to high. */
10240
- readonly quality?: GroundTruthAmbientOcclusionQuality;
10241
- /** Internal AO resolution relative to opaque rendering. Defaults to the quality preset. */
10242
- readonly resolutionScale?: number;
10243
- /** View-space horizon-search radius. Defaults to 2. */
10244
- readonly radius?: number;
10245
- /** Fraction of the radius at which distance falloff begins. Defaults to 0.6. */
10246
- readonly falloffStart?: number;
10247
- /** View-space self-intersection rejection distance. Defaults to 0.05. */
10248
- readonly thickness?: number;
10249
- /** Blend between a thin depth field and a solid occluder. Defaults to 0.5. */
10250
- readonly thicknessBlend?: number;
10251
- /** Number of rotated horizon slices per pixel. Defaults to the quality preset. */
10252
- readonly directionCount?: 2 | 3 | 4 | 6 | 8;
10253
- /** Samples evaluated on each side of a horizon slice. Defaults to the quality preset. */
10254
- readonly stepCount?: 3 | 4 | 5 | 6 | 8 | 10 | 12;
10255
- /** Contrast applied to the physically normalized visibility. Defaults to 1.2. */
10256
- readonly power?: number;
10257
- /** Occlusion intensity before contrast. Defaults to 1. */
10258
- readonly intensity?: number;
10259
- /** Angular self-occlusion bias in radians. Defaults to 0.035. */
10260
- readonly bias?: number;
10261
- /** Radius of the additional contact-occlusion lobe, relative to radius. Defaults to 0.2. */
10262
- readonly contactRadiusScale?: number;
10263
- /** Strength of the contact-occlusion lobe. Defaults to 0.35. */
10264
- readonly contactStrength?: number;
10265
- /** Normal source used by the horizon search. Defaults to hybrid. */
10266
- readonly normalSource?: GroundTruthAmbientOcclusionNormalSource;
10267
- /** Geometric-normal contribution in hybrid mode. Defaults to 0.65. */
10268
- readonly geometricNormalWeight?: number;
10269
- /** Strength of bent-normal redirection. Defaults to 1. */
10270
- readonly bentNormalStrength?: number;
10271
- /** Strength of color-aware multi-bounce diffuse AO. Defaults to 1. */
10272
- readonly multiBounce?: number;
10273
- /** View distance where AO starts fading. Defaults to 100. */
10274
- readonly distanceFadeStart?: number;
10275
- /** View distance where AO is fully disabled. Defaults to 200. */
10276
- readonly distanceFadeEnd?: number;
10277
- /** Screen-edge fade width in AO pixels. Defaults to 2. */
10278
- readonly edgeFadePixels?: number;
10279
- /** Maximum accepted temporal contribution. Defaults to 0.9. */
10280
- readonly historyWeight?: number;
10281
- /** Maximum relative reprojected view-depth error. Defaults to 0.03. */
10282
- readonly depthThreshold?: number;
10283
- /** Minimum normal agreement accepted by temporal reprojection. Defaults to 0.82. */
10284
- readonly normalThreshold?: number;
10489
+ interface ShaderParameters {
10490
+ vs?: string;
10491
+ fs?: string;
10492
+ alwaysUse?: boolean;
10285
10493
  }
10286
- /**
10287
- * Portable production GTAO for the shared Forward pipeline.
10288
- *
10289
- * The feature records opaque depth, material attributes, and motion before shading, evaluates
10290
- * rotated horizon visibility at configurable resolution, applies submission-aware temporal
10291
- * rejection and edge-aware filtering, and binds the full-resolution result only to indirect PBR
10292
- * lighting. Direct lights and emission remain unoccluded.
10293
- */
10294
- declare class GroundTruthAmbientOcclusion implements ForwardRenderPipelineFeature {
10295
- #private;
10296
- readonly name = "ground-truth-ambient-occlusion";
10297
- readonly injectionPoint: "before-opaque";
10298
- readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
10299
- constructor(options?: Readonly<GroundTruthAmbientOcclusionOptions>);
10300
- create(): ForwardRenderPipelineFeatureRuntime;
10494
+ interface ShaderPrecisionProvider {
10495
+ vertexPrecision: ShaderPrecision;
10496
+ fragmentPrecision: ShaderPrecision;
10301
10497
  }
10302
-
10303
- /** Production controls for portable screen-space diffuse global illumination. */
10304
- interface ScreenSpaceGlobalIlluminationOptions {
10305
- /** Internal tracing resolution relative to opaque rendering. Defaults to 0.5. */
10306
- readonly resolutionScale?: number;
10307
- /** Stochastic hemisphere rays traced per pixel. Defaults to 8. */
10308
- readonly rayCount?: 4 | 6 | 8 | 12;
10309
- /** Depth tests performed along each ray. Defaults to 8. */
10310
- readonly stepCount?: 6 | 8 | 10 | 12;
10311
- /** Maximum view-space ray distance. Defaults to 4. */
10312
- readonly maxRayDistance?: number;
10313
- /** View-space hit thickness used by ray/depth intersection. Defaults to 0.18. */
10314
- readonly thickness?: number;
10315
- /** Fraction of the trace distance at which contribution fading begins. Defaults to 0.72. */
10316
- readonly distanceFadeStart?: number;
10317
- /** Strength of the diffuse bounce added to linear scene color. Defaults to 1. */
10318
- readonly intensity?: number;
10319
- /** Saturation of transported radiance. Defaults to 1.1. */
10320
- readonly saturation?: number;
10321
- /** Firefly clamp for transported linear radiance. Defaults to 8. */
10322
- readonly maxRadiance?: number;
10323
- /** Maximum accepted temporal contribution. Defaults to 0.92. */
10324
- readonly historyWeight?: number;
10325
- /** Maximum relative reprojected view-depth error. Defaults to 0.025. */
10326
- readonly depthThreshold?: number;
10327
- /** Minimum normal similarity accepted by reprojection. Defaults to 0.82. */
10328
- readonly normalThreshold?: number;
10329
- /** Number of edge-aware a-trous denoise passes. Defaults to 3. */
10330
- readonly denoisePasses?: 1 | 2 | 3;
10498
+ interface ShaderRenderer extends ShaderPrecisionProvider {
10499
+ resourceManager: RendererResourceManager;
10331
10500
  }
10332
10501
  /**
10333
- * Portable production screen-space diffuse global illumination for the shared Forward pipeline.
10334
- *
10335
- * The feature traces stochastic view-space rays against opaque depth, transports linear HDR scene
10336
- * radiance, rejects invalid history using motion/depth/normal data, applies variance clipping and
10337
- * edge-aware a-trous filtering, then composites the result before transparent rendering.
10502
+ * Shader类
10338
10503
  */
10339
- declare class ScreenSpaceGlobalIllumination implements ForwardRenderPipelineFeature {
10340
- #private;
10341
- readonly name = "screen-space-global-illumination";
10342
- readonly injectionPoint: "after-opaque";
10343
- readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
10344
- constructor(options?: Readonly<ScreenSpaceGlobalIlluminationOptions>);
10345
- create(): ForwardRenderPipelineFeatureRuntime;
10346
- }
10347
-
10348
- /** Named performance/quality presets for froxel reconstruction and light visibility. */
10349
- type VolumetricLightingQuality = 'low' | 'medium' | 'high' | 'ultra';
10350
- /** Optional integrated-volume diagnostic shown in place of the composited HDR scene. */
10351
- type VolumetricLightingDebugView = 'none' | 'radiance' | 'transmittance';
10352
- /** One world-space spherical local fog-density volume. */
10353
- interface VolumetricSphereFogVolume {
10354
- /** Discriminant selecting spherical density evaluation. */
10355
- readonly shape: 'sphere';
10356
- /** Mutable world-space center sampled at frame-record time. */
10357
- readonly center: Readonly<Vector3>;
10358
- /** Outer sphere radius in world units. */
10359
- readonly radius: number;
10360
- /** Density added inside the volume. */
10361
- readonly density: number;
10362
- /** Single-scattering albedo tint. Defaults to the global fog albedo. */
10363
- readonly albedo?: Readonly<Color>;
10364
- /** Fraction of the radius used for a smooth edge. Defaults to 0.2. */
10365
- readonly edgeFalloff?: number;
10366
- }
10367
- /** One axis-aligned world-space box local fog-density volume. */
10368
- interface VolumetricBoxFogVolume {
10369
- /** Discriminant selecting axis-aligned box density evaluation. */
10370
- readonly shape: 'box';
10371
- /** Mutable world-space center sampled at frame-record time. */
10372
- readonly center: Readonly<Vector3>;
10373
- /** Mutable positive half extent sampled at frame-record time. */
10374
- readonly halfExtents: Readonly<Vector3>;
10375
- /** Density added inside the volume. */
10376
- readonly density: number;
10377
- /** Single-scattering albedo tint. Defaults to the global fog albedo. */
10378
- readonly albedo?: Readonly<Color>;
10379
- /** Fraction of the smallest half extent used for a smooth edge. Defaults to 0.2. */
10380
- readonly edgeFalloff?: number;
10381
- }
10382
- /** Local fog shapes injected into the camera-aligned froxel volume. */
10383
- type VolumetricFogVolume = VolumetricSphereFogVolume | VolumetricBoxFogVolume;
10384
- /** Production controls for WebGPU Clustered Forward+ froxel volumetric lighting. */
10385
- interface VolumetricLightingOptions {
10386
- /** Preset used for unspecified reconstruction and shadow budgets. Defaults to high. */
10387
- readonly quality?: VolumetricLightingQuality;
10388
- /** Froxel XY and reconstruction resolution relative to the internal scene. Defaults to the preset. */
10389
- readonly resolutionScale?: number;
10390
- /** Depth-aware screen-space light visibility samples in [0, 8]. Defaults to the preset. */
10391
- readonly shadowSteps?: number;
10392
- /** Global extinction density in inverse world units. Defaults to 0.025. */
10393
- readonly density?: number;
10394
- /** World-space height at and below which global density is constant. Defaults to 0. */
10395
- readonly baseHeight?: number;
10396
- /** Exponential density falloff above baseHeight. Defaults to 0.12. */
10397
- readonly heightFalloff?: number;
10398
- /** Maximum integrated view distance in world units. Defaults to 120. */
10399
- readonly maxDistance?: number;
10400
- /** Global single-scattering albedo. Defaults to a cool neutral white. */
10401
- readonly albedo?: Readonly<Color>;
10402
- /** Henyey-Greenstein anisotropy in [-0.9, 0.9]. Positive values emphasize forward scatter. */
10403
- readonly anisotropy?: number;
10404
- /** Ambient light injected into the medium. Defaults to 0.12. */
10405
- readonly ambientStrength?: number;
10406
- /** Sub-froxel stochastic sample offset strength in [0, 1]. Defaults to 1. */
10407
- readonly jitterStrength?: number;
10408
- /** Maximum temporal history contribution in [0, 0.98]. Defaults to 0.9. */
10409
- readonly historyWeight?: number;
10410
- /** Maximum relative scene-depth disagreement accepted during reprojection. Defaults to 0.04. */
10411
- readonly depthThreshold?: number;
10412
- /** Optional world-space local fog volumes, limited to 32. */
10413
- readonly localVolumes?: readonly VolumetricFogVolume[];
10414
- /** Replace normal composition with an integrated radiance or extinction diagnostic. */
10415
- readonly debugView?: VolumetricLightingDebugView;
10504
+ declare class Shader {
10505
+ readonly isShader = true;
10506
+ readonly className = "Shader";
10507
+ readonly id: string;
10508
+ private _isDestroyed;
10509
+ private _variantKey;
10510
+ /**
10511
+ * vs 顶点代码
10512
+ */
10513
+ vs: string;
10514
+ /**
10515
+ * vs 片段代码
10516
+ */
10517
+ fs: string;
10518
+ static commonOptions: Record<string, number>;
10519
+ /**
10520
+ * 内部的所有shader块字符串,可以用来拼接glsl代码
10521
+ */
10522
+ static shaders: {
10523
+ [k: string]: string;
10524
+ };
10525
+ /**
10526
+ * 初始化
10527
+ * @param renderer -
10528
+ */
10529
+ static init(renderer: ShaderPrecisionProvider): void;
10530
+ /**
10531
+ * Shader 缓存
10532
+ */
10533
+ static get cache(): Cache<Shader>;
10534
+ /**
10535
+ * Shader header缓存,一般不用管
10536
+ */
10537
+ static get headerCache(): Cache<string>;
10538
+ /**
10539
+ * 重置
10540
+ */
10541
+ static reset(): void;
10542
+ /**
10543
+ * 获取header缓存的key
10544
+ * @param mesh - mesh
10545
+ * @param material - 材质
10546
+ * @param lightManager - lightManager
10547
+ * @param fog - fog
10548
+ * @param useLogDepth - 是否使用对数深度
10549
+ */
10550
+ static getHeaderKey(mesh: Mesh, material: MaterialInstance, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, role?: MaterialPassRole): string;
10551
+ /**
10552
+ * 获取header
10553
+ * @param mesh -
10554
+ * @param material -
10555
+ * @param lightManager -
10556
+ * @param fog -
10557
+ */
10558
+ static getHeader(mesh: Mesh, material: MaterialInstance, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, role?: MaterialPassRole): string;
10559
+ private static getHeaderVariant;
10560
+ private static trackHeaderVariantKey;
10561
+ private static trackShaderVariant;
10562
+ private static getCommonHeader;
10563
+ /**
10564
+ * 获取 shader
10565
+ * @param mesh -
10566
+ * @param material -
10567
+ * @param isUseInstance -
10568
+ * @param lightManager -
10569
+ * @param fog -
10570
+ * @param useLogDepth -
10571
+ * @param renderer - Renderer precision provider used to build the portable shader preamble.
10572
+ * @param linearOutput - Keep lighting in linear HDR space for floating-point scene targets.
10573
+ * @param groundTruthAmbientOcclusion - Sample the pass-global GTAO visibility in PBR shading.
10574
+ */
10575
+ static getShader(mesh: Mesh, material: MaterialInstance, isUseInstance: boolean, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, renderer?: ShaderPrecisionProvider, linearOutput?: boolean, role?: MaterialPassRole, groundTruthAmbientOcclusion?: boolean): Shader | null;
10576
+ /**
10577
+ * 获取基础 shader
10578
+ * @param material -
10579
+ * @param isUseInstance -
10580
+ * @param header - 已生成的 shader 宏定义
10581
+ */
10582
+ static getBasicShader(material: MaterialInstance, isUseInstance: boolean, header: string, renderer?: ShaderPrecisionProvider, role?: MaterialPassRole): Shader;
10583
+ private static getNumericId;
10584
+ /**
10585
+ * 获取自定义shader
10586
+ * @param vs - 顶点代码
10587
+ * @param fs - 片段代码
10588
+ * @param cacheKey - 如果有,会以此值缓存 shader
10589
+ * @param useHeaderCache - 是否使用 header-aware 缓存命名空间;实际 header 始终参与缓存键
10590
+ */
10591
+ static getCustomShader(vs: string, fs: string, header?: string, cacheKey?: string, useHeaderCache?: boolean, renderer?: ShaderPrecisionProvider): Shader;
10592
+ private static getRendererHeader;
10593
+ private static assembleGLSL300;
10594
+ /**
10595
+ * 是否始终使用
10596
+ */
10597
+ alwaysUse: boolean;
10598
+ /**
10599
+ * @param params - 初始化参数,所有params都会复制到实例上
10600
+ */
10601
+ constructor(params?: ShaderParameters);
10602
+ /**
10603
+ * 没有被引用时销毁资源
10604
+ * @param renderer -
10605
+ * @returns this
10606
+ */
10607
+ destroyIfNoRef(renderer: ShaderRenderer): this;
10608
+ /**
10609
+ * 销毁资源
10610
+ * @returns this
10611
+ */
10612
+ destroy(): this;
10416
10613
  }
10417
10614
 
10418
- /** Luminance-metering pattern used by {@link AutoExposure}. */
10419
- type AutoExposureMeteringMode = 'average' | 'center-weighted';
10420
- /** GPU histogram, percentile metering, and eye-adaptation controls. */
10421
- interface AutoExposureOptions {
10422
- /** Lowest log2 luminance represented by the histogram. Defaults to -12. */
10423
- readonly minimumLogLuminance?: number;
10424
- /** Highest log2 luminance represented by the histogram. Defaults to 16. */
10425
- readonly maximumLogLuminance?: number;
10426
- /** Dark-tail percentile excluded from metering in [0, 0.49]. Defaults to 0.02. */
10427
- readonly lowPercentile?: number;
10428
- /** Bright-tail percentile retained by metering in [0.51, 1]. Defaults to 0.98. */
10429
- readonly highPercentile?: number;
10430
- /** Minimum automatically selected EV in [-15, 15]. Defaults to -8. */
10431
- readonly minimumEV?: number;
10432
- /** Maximum automatically selected EV in [-15, 15]. Defaults to 8. */
10433
- readonly maximumEV?: number;
10434
- /** Exposure compensation in EV stops. Defaults to 0. */
10435
- readonly compensation?: number;
10436
- /** Middle-gray target luminance in [0.01, 0.5]. Defaults to 0.18. */
10437
- readonly keyValue?: number;
10438
- /** Adaptation speed when exposure increases, in inverse seconds. Defaults to 1.5. */
10439
- readonly speedUp?: number;
10440
- /** Adaptation speed when exposure decreases, in inverse seconds. Defaults to 3. */
10441
- readonly speedDown?: number;
10442
- /** Histogram sampling stride in pixels. Defaults to 2. */
10443
- readonly sampleStride?: number;
10444
- /** Metering pattern. Defaults to center-weighted. */
10445
- readonly metering?: AutoExposureMeteringMode;
10615
+ /** Immutable shader and binding configuration for a fullscreen pass instance. */
10616
+ interface FullscreenRenderPassOptions {
10617
+ /** Optional diagnostic pass name. */
10618
+ readonly name?: string;
10619
+ /** GLSL ES 3.00 shader with no vertex attributes. */
10620
+ readonly shader: Shader;
10621
+ /** Fixed raster, depth, blend, and culling state. */
10622
+ readonly pipelineState: Readonly<MaterialPipelineState>;
10623
+ /** std140 buffers in reflected uniform-block order. */
10624
+ readonly uniformBuffers?: readonly UniformBuffer[];
10446
10625
  }
10447
- /** On-demand values written by the latest submitted exposure reduction. */
10448
- interface AutoExposureDiagnostics {
10449
- /** Adapted exposure in EV stops. */
10450
- readonly actualEV: number;
10451
- /** Histogram-derived target exposure in EV stops. */
10452
- readonly targetEV: number;
10453
- /** Percentile-clipped geometric mean luminance. */
10454
- readonly averageLuminance: number;
10455
- /** Weighted histogram sample count. */
10456
- readonly sampleCount: number;
10626
+ /** Frame-scoped graph resources and dynamic state for one fullscreen draw. */
10627
+ interface FullscreenRenderPassParameters {
10628
+ /** Sampled textures in reflected sampler order; numeric depth uses nearest sampling. */
10629
+ readonly inputTextures: readonly RenderGraphTextureAccessHandle[];
10630
+ /** Color attachments in fragment-output location order. */
10631
+ readonly colorAttachments: readonly Readonly<RenderPipelineColorAttachment>[];
10632
+ /** Optional depth/stencil attachment. */
10633
+ readonly depthStencilAttachment?: Readonly<RenderPipelineDepthStencilAttachment>;
10634
+ /** Optional execution viewport in physical attachment pixels. */
10635
+ readonly viewport?: RendererViewport;
10636
+ /** Optional execution scissor in physical attachment pixels. */
10637
+ readonly scissor?: RendererViewport;
10638
+ /** Optional unsigned stencil reference. */
10639
+ readonly stencilReference?: number;
10457
10640
  }
10458
10641
  /**
10459
- * WebGPU histogram auto exposure with percentile clipping and submission-aware eye adaptation.
10642
+ * Draws a `gl_VertexID` fullscreen triangle with graph textures resolved during prepare.
10460
10643
  *
10461
- * The feature records after HDR post-processing and before the display transform, so Bloom and
10462
- * authored emissive energy share one exposure. It performs no per-frame CPU readback.
10644
+ * The vertex shader must declare no vertex attributes. GLSL samplers and registered std140
10645
+ * blocks are matched to the fixed arrays captured by this pass instance. Color inputs use the
10646
+ * shared linear sampler; ordinary depth inputs are specialized to numeric depth and use the
10647
+ * shared non-filtering sampler on both rendering backends.
10463
10648
  */
10464
- declare class AutoExposure implements ForwardRenderPipelineFeature {
10465
- #private;
10466
- readonly name = "auto-exposure";
10467
- readonly injectionPoint: "after-post-process";
10468
- readonly requirements: Readonly<{
10469
- sampledSceneColor: true;
10470
- sampledDepth: false;
10471
- requiredCapabilities: readonly ("compute-pass" | "storage-buffer" | "storage-texture")[];
10472
- requiredTextureFormats: readonly (Readonly<{
10473
- format: "rgba16float";
10474
- use: "filterable-sampled";
10475
- }> | Readonly<{
10476
- format: "rgba16float";
10477
- use: "storage";
10478
- }> | Readonly<{
10479
- format: "rgba16float";
10480
- use: "color-attachment";
10481
- }>)[];
10482
- requiredLimits: Readonly<{
10483
- maxBindingsPerBindGroup: 5;
10484
- maxStorageBuffersPerShaderStage: 3;
10485
- maxStorageTexturesPerShaderStage: 1;
10486
- maxSampledTexturesPerShaderStage: 1;
10487
- maxComputeInvocationsPerWorkgroup: number;
10488
- }>;
10489
- }>;
10490
- constructor(options?: Readonly<AutoExposureOptions>);
10491
- create(context: RenderPipelineCreateContext): ForwardRenderPipelineFeatureRuntime;
10492
- /** Read the latest adapted values when attached to exactly one live renderer. */
10493
- readDiagnostics(): Promise<Readonly<AutoExposureDiagnostics>>;
10494
- }
10495
-
10496
- /** GPU receiver-driven shadow-page allocation and directional clipmap controls. */
10497
- interface VirtualShadowMapOptions {
10498
- /** Square virtual resolution for every directional clipmap level. Defaults to 4096. */
10499
- readonly virtualResolution?: number;
10500
- /** Square physical page edge in pixels. Defaults to 128. */
10501
- readonly pageSize?: number;
10502
- /** Shared physical depth-page capacity. Defaults to 32. */
10503
- readonly physicalPageCount?: number;
10504
- /** Maximum missing or invalidated pages rendered by one frame. Defaults to 16. */
10505
- readonly maxPageUpdatesPerFrame?: number;
10506
- /** Camera-centered directional clipmap levels. Defaults to 4. */
10507
- readonly directionalClipmapLevels?: number;
10508
- /** Full world-space width covered by the finest clipmap. Defaults to 64. */
10509
- readonly firstDirectionalClipmapExtent?: number;
10649
+ declare class FullscreenRenderPass implements ScriptableRenderPass<FullscreenRenderPassParameters> {
10650
+ /** Stable diagnostic pass name. */
10651
+ readonly name: string;
10652
+ /** Shader compiled through the shared GLSL-to-backend pipeline. */
10653
+ readonly shader: Shader;
10654
+ /** Fixed material state for the fullscreen triangle. */
10655
+ readonly pipelineState: Readonly<MaterialPipelineState>;
10656
+ /** Uniform buffers in reflected block order. */
10657
+ readonly uniformBuffers: readonly UniformBuffer[];
10658
+ constructor(options: Readonly<FullscreenRenderPassOptions>);
10659
+ /** Declare sampled inputs and raster attachments. */
10660
+ setup(builder: ScriptableRenderPassBuilder, parameters: FullscreenRenderPassParameters): void;
10661
+ /** Apply optional dynamic state; the framework emits the prepared triangle afterward. */
10662
+ execute(context: ScriptableRenderPassContext, parameters: FullscreenRenderPassParameters): void;
10510
10663
  }
10511
- /** On-demand counters copied only when diagnostics are explicitly requested. */
10512
- interface VirtualShadowMapDiagnostics {
10513
- /** Unique logical pages requested by the latest submitted receiver pass. */
10514
- readonly requestedPageCount: number;
10515
- /** Physical pages whose depth contents were refreshed by the latest submitted frame. */
10516
- readonly renderedPageCount: number;
10517
- /** Requested or dirty pages postponed by the configured update/physical-page budgets. */
10518
- readonly deferredPageCount: number;
10519
- /** Valid physical residency records retained after the latest submitted allocation. */
10520
- readonly residentPageCount: number;
10521
- /** Resident physical pages remapped to another logical identity. */
10522
- readonly evictionCount: number;
10523
- /** Unique logical pages touched by changed caster coverage. */
10524
- readonly invalidatedPageCount: number;
10525
- /** Configured physical depth-page capacity. */
10526
- readonly physicalPageCapacity: number;
10527
- /** Configured camera-centered clipmap levels per directional light. */
10528
- readonly directionalClipmapLevelCount: number;
10664
+ /** Fullscreen graph-texture present pass with one fixed linear sampler. */
10665
+ declare class PresentRenderPass extends FullscreenRenderPass {
10666
+ constructor(name?: string);
10529
10667
  }
10530
10668
 
10531
- /** Rendering budgets for the physical atmosphere and volumetric clouds. */
10532
- type AtmosphereWeatherQuality = 'low' | 'medium' | 'high' | 'ultra';
10533
- /** Optional diagnostic texture shown in place of the weather composition. */
10534
- type AtmosphereWeatherDebugView = 'none' | 'transmittance' | 'multi-scattering' | 'sky-view' | 'weather-map' | 'cloud-radiance' | 'cloud-transmittance' | 'cloud-shadow';
10535
- /**
10536
- * Mutable state sampled by the weather renderer at frame-record time.
10537
- *
10538
- * Updating these values does not recreate pipelines. Call `invalidateHistory()` after a
10539
- * discontinuous preset or time-of-day jump; continuous animation may update `timeSeconds` and
10540
- * `sunDirection` every frame without resetting history.
10541
- */
10542
- declare class AtmosphereWeatherState {
10543
- #private;
10544
- /** Normalized world-space direction from the scene toward the sun. */
10545
- readonly sunDirection: Vector3;
10546
- /** Procedural weather animation time in seconds. */
10547
- timeSeconds: number;
10548
- /** Fractional cloud coverage in [0, 1]. */
10549
- cloudCoverage: number;
10550
- /** Cloud optical-density multiplier in [0, 4]. */
10551
- cloudDensity: number;
10552
- /** Cumulonimbus/storm shaping in [0, 1]. */
10553
- storminess: number;
10554
- /** Horizontal wind direction; Y is ignored. */
10555
- readonly windDirection: Vector3;
10556
- /** Wind speed in world units per second. */
10557
- windSpeed: number;
10558
- /** Monotonic discontinuity revision consumed by temporal cloud history. */
10559
- get historyRevision(): number;
10560
- /** Reset cloud temporal history after a discontinuous authored state change. */
10561
- invalidateHistory(): this;
10669
+ /** Public vertex formats accepted by the portable RHI without exposing its namespace. */
10670
+ type GPUDrivenVertexFormat = 'uint8x2' | 'uint8x4' | 'sint8x2' | 'sint8x4' | 'unorm8x2' | 'unorm8x4' | 'snorm8x2' | 'snorm8x4' | 'uint16x2' | 'uint16x4' | 'sint16x2' | 'sint16x4' | 'unorm16x2' | 'unorm16x4' | 'snorm16x2' | 'snorm16x4' | 'float16x2' | 'float16x4' | 'float32' | 'float32x2' | 'float32x3' | 'float32x4' | 'uint32' | 'uint32x2' | 'uint32x3' | 'uint32x4' | 'sint32' | 'sint32x2' | 'sint32x3' | 'sint32x4';
10671
+ /** One attribute sourced from a graph vertex buffer. */
10672
+ interface GPUDrivenVertexAttribute {
10673
+ /** Vertex-shader input location. */
10674
+ readonly shaderLocation: number;
10675
+ /** Portable scalar or vector representation in the source buffer. */
10676
+ readonly format: GPUDrivenVertexFormat;
10677
+ /** Byte offset from the start of one vertex or instance element. */
10678
+ readonly byteOffset: number;
10562
10679
  }
10563
- /** Rayleigh, Mie, ozone, sun, and aerial-perspective configuration. */
10564
- interface PhysicalAtmosphereOptions {
10565
- /** Planet radius in world units. Defaults to 6,360,000. */
10566
- readonly planetRadius?: number;
10567
- /** Atmosphere height above the planet surface. Defaults to 100,000. */
10568
- readonly atmosphereHeight?: number;
10569
- /** World-space planet center. Defaults to `(0, -planetRadius, 0)`. */
10570
- readonly planetCenter?: Readonly<Vector3>;
10571
- /** Rayleigh density scale height. Defaults to 8,000. */
10572
- readonly rayleighScaleHeight?: number;
10573
- /** Mie density scale height. Defaults to 1,200. */
10574
- readonly mieScaleHeight?: number;
10575
- /** Mie phase anisotropy in [0, 0.95]. Defaults to 0.8. */
10576
- readonly mieAnisotropy?: number;
10577
- /** Ozone layer center altitude. Defaults to 25,000. */
10578
- readonly ozoneCenterHeight?: number;
10579
- /** Ozone triangular half-width. Defaults to 15,000. */
10580
- readonly ozoneWidth?: number;
10581
- /** Solar illuminance multiplier. Defaults to 20. */
10582
- readonly sunIlluminance?: number;
10583
- /** Linear sun tint. Defaults to warm white. */
10584
- readonly sunColor?: Readonly<Color>;
10585
- /** Angular sun-disc radius in degrees. Defaults to 0.27. */
10586
- readonly sunAngularRadius?: number;
10587
- /** Maximum aerial-perspective distance. Defaults to 160,000. */
10588
- readonly aerialPerspectiveDistance?: number;
10589
- /** Ground albedo used by the multi-scattering approximation. */
10590
- readonly groundAlbedo?: Readonly<Color>;
10680
+ /** Immutable layout for one graph vertex-buffer slot. */
10681
+ interface GPUDrivenVertexBufferLayout {
10682
+ /** Bytes between consecutive vertex or instance elements. */
10683
+ readonly arrayStride: number;
10684
+ /** Whether the buffer advances per vertex or per instance. */
10685
+ readonly stepMode?: 'vertex' | 'instance';
10686
+ /** Attributes sourced from this buffer slot. */
10687
+ readonly attributes: readonly GPUDrivenVertexAttribute[];
10591
10688
  }
10592
- /** Procedural weather map, cloud shell, ray-march, lighting, and temporal controls. */
10593
- interface VolumetricCloudOptions {
10594
- /** Cloud-base altitude above the planet surface. Defaults to 1,500. */
10595
- readonly baseHeight?: number;
10596
- /** Cloud-layer thickness. Defaults to 8,500. */
10597
- readonly thickness?: number;
10598
- /** Horizontal weather-map scale in world units. Defaults to 120,000. */
10599
- readonly weatherScale?: number;
10600
- /** Detail-noise scale in world units. Defaults to 7,000. */
10601
- readonly detailScale?: number;
10602
- /** Cloud-light forward-scattering anisotropy. Defaults to 0.72. */
10603
- readonly anisotropy?: number;
10604
- /** Silver-lining strength in [0, 4]. Defaults to 1.25. */
10605
- readonly silverLining?: number;
10606
- /** Ambient sky-light strength in [0, 4]. Defaults to 0.65. */
10607
- readonly ambientStrength?: number;
10608
- /** Temporal history contribution in [0, 0.98]. Defaults to 0.92. */
10609
- readonly historyWeight?: number;
10610
- /** Screen-space cloud-shadow coverage in world units. Defaults to 80,000. */
10611
- readonly shadowDistance?: number;
10689
+ /** Direct procedural draw or GPU-authored indirect argument source. */
10690
+ type GPUDrivenDraw = Readonly<{
10691
+ kind: 'draw';
10692
+ vertexCount: number;
10693
+ instanceCount?: number;
10694
+ firstVertex?: number;
10695
+ firstInstance?: number;
10696
+ }> | Readonly<{
10697
+ kind: 'draw-indirect';
10698
+ buffer: RenderGraphBufferHandle;
10699
+ byteOffset?: number;
10700
+ }> | Readonly<{
10701
+ kind: 'draw-indexed-indirect';
10702
+ buffer: RenderGraphBufferHandle;
10703
+ byteOffset?: number;
10704
+ }>;
10705
+ /** Fixed shader, raster state, and vertex-input ABI for one GPU-driven pass. */
10706
+ interface GPUDrivenRenderPassOptions {
10707
+ /** Optional diagnostic pass name. */
10708
+ readonly name?: string;
10709
+ /** WebGPU storage-aware GLSL ES 3.10 graphics shader. */
10710
+ readonly shader: StorageGraphicsShader;
10711
+ /** Raster/depth/blend state only; resource bindings come from pass parameters. */
10712
+ readonly pipelineState: Readonly<MaterialPipelineState>;
10713
+ /** Immutable positional vertex-buffer ABI; omit for vertex pulling. */
10714
+ readonly vertexLayouts?: readonly GPUDrivenVertexBufferLayout[];
10715
+ /** Index format required by indexed indirect draws. */
10716
+ readonly indexFormat?: 'uint16' | 'uint32';
10717
+ }
10718
+ /** Frame-scoped graph resources consumed by one GPU-driven draw. */
10719
+ interface GPUDrivenRenderPassParameters {
10720
+ /** std140 resources in sorted uniform-buffer ABI order. */
10721
+ readonly uniformBuffers?: readonly (UniformBuffer | UniformBufferRange)[];
10722
+ /** Readonly storage resources in sorted storage-buffer ABI order. */
10723
+ readonly buffers: readonly ComputeBufferBinding[];
10724
+ /** Sampled graph textures in sorted sampled-texture ABI order. */
10725
+ readonly textures?: readonly ComputeTextureBinding[];
10726
+ /** Immutable samplers in sorted sampler ABI order. */
10727
+ readonly samplers?: readonly ComputeSampler[];
10728
+ /** Graph vertex buffers in the same order as `vertexLayouts`. */
10729
+ readonly vertexBuffers?: readonly ComputeBufferBinding[];
10730
+ /** Required only by `draw-indexed-indirect`. */
10731
+ readonly indexBuffer?: ComputeBufferBinding;
10732
+ /** Direct or GPU-authored indirect draw command. */
10733
+ readonly draw: GPUDrivenDraw;
10734
+ /** One or more color attachments matching continuous fragment output locations. */
10735
+ readonly colorAttachments: readonly Readonly<RenderPipelineColorAttachment>[];
10736
+ /** Optional depth/stencil attachment and load/store policy. */
10737
+ readonly depthStencilAttachment?: Readonly<RenderPipelineDepthStencilAttachment>;
10738
+ /** Optional dynamic viewport in physical attachment pixels. */
10739
+ readonly viewport?: RendererViewport;
10740
+ /** Optional dynamic scissor in physical attachment pixels. */
10741
+ readonly scissor?: RendererViewport;
10742
+ /** Optional unsigned dynamic stencil reference. */
10743
+ readonly stencilReference?: number;
10612
10744
  }
10613
- /** Complete physical atmosphere, cloud, and mutable weather-state configuration. */
10614
- interface AtmosphereWeatherOptions {
10615
- /** Named sampling and reconstruction budget. Defaults to high. */
10616
- readonly quality?: AtmosphereWeatherQuality;
10617
- /** Mutable sun, cloud, wind, and time state. */
10618
- readonly state?: AtmosphereWeatherState;
10619
- /** Physical atmosphere constants. */
10620
- readonly atmosphere?: Readonly<PhysicalAtmosphereOptions>;
10621
- /** Volumetric clouds, or false to render atmosphere only. */
10622
- readonly clouds?: Readonly<VolumetricCloudOptions> | false;
10623
- /** Replace normal composition with one intermediate diagnostic. */
10624
- readonly debugView?: AtmosphereWeatherDebugView;
10745
+ /**
10746
+ * WebGPU-only storage-aware raster pass for vertex pulling and direct/indirect procedural draws.
10747
+ *
10748
+ * The pass derives graph access from the immutable shader ABI. It never reads indirect arguments
10749
+ * on the CPU and never exposes native WebGPU objects.
10750
+ */
10751
+ declare class GPUDrivenRenderPass implements ScriptableRenderPass<GPUDrivenRenderPassParameters> {
10752
+ /** Stable diagnostic pass name. */
10753
+ readonly name: string;
10754
+ /** Immutable storage-aware graphics shader. */
10755
+ readonly shader: StorageGraphicsShader;
10756
+ /** Material supplying raster, depth, stencil, and blend state. */
10757
+ readonly pipelineState: Readonly<MaterialPipelineState>;
10758
+ /** Snapshotted positional vertex-buffer ABI. */
10759
+ readonly vertexLayouts: readonly Readonly<GPUDrivenVertexBufferLayout>[];
10760
+ /** Index format for indexed indirect draws, when configured. */
10761
+ readonly indexFormat: 'uint16' | 'uint32' | undefined;
10762
+ constructor(options: Readonly<GPUDrivenRenderPassOptions>);
10763
+ /** Declare shader resources, vertex/index/indirect inputs, and raster attachments. */
10764
+ setup(builder: ScriptableRenderPassBuilder, parameters: GPUDrivenRenderPassParameters): void;
10765
+ /** Apply optional dynamic state; the framework emits the prepared draw afterward. */
10766
+ execute(context: ScriptableRenderPassContext, parameters: GPUDrivenRenderPassParameters): void;
10625
10767
  }
10626
10768
 
10627
- /** One lower-detail geometry selected when its projected bounding radius is small enough. */
10628
- interface GPUSceneLOD {
10629
- /** Indexed triangle geometry with float32 position/normal and any material-required UV/tangent streams. */
10630
- readonly geometry: Geometry;
10631
- /** Maximum projected radius in physical pixels at which this LOD is selected. */
10632
- readonly maximumProjectedRadius: number;
10769
+ /** Fixed pass-global bind group reserved by storage-aware scene variants. */
10770
+ declare const SCENE_STORAGE_BIND_GROUP = 3;
10771
+ /** One graph-buffer range bound to a readonly scene storage declaration. */
10772
+ interface SceneStorageBufferBinding {
10773
+ /** Setup-scoped graph buffer read by the raster shader. */
10774
+ readonly buffer: RenderGraphBufferHandle;
10775
+ /** Byte offset within the graph resource, defaulting to zero. */
10776
+ readonly byteOffset?: number;
10777
+ /** Bound byte length, defaulting to the remaining resource range. */
10778
+ readonly byteLength?: number;
10633
10779
  }
10634
- /** One material/geometry family consumed by the GPU Scene fixed-bucket indirect path. */
10635
- interface GPUSceneBucket {
10636
- /** Highest-detail indexed triangle geometry. */
10637
- readonly geometry: Geometry;
10780
+ /**
10781
+ * WebGPU-only shader override for an ordinary renderer list.
10782
+ *
10783
+ * The shader remains GLSL ES 3.10 compiled through the engine/Naga path and must place every
10784
+ * readonly storage binding in {@link SCENE_STORAGE_BIND_GROUP}. Groups zero through two remain
10785
+ * available to the existing pass/material/mesh uniform and sampled-resource ABI. This contract is
10786
+ * explicit: it does not automatically rewrite built-in Basic/PBR shader source.
10787
+ */
10788
+ interface SceneStorageShaderVariant {
10789
+ /** Default storage-aware shader and the canonical pass-global storage ABI. */
10790
+ readonly shader: StorageGraphicsShader;
10638
10791
  /**
10639
- * Opaque or alpha-masked built-in metallic/roughness PBR material evaluated by the shared
10640
- * surface/BRDF contract. Base-color, opacity, metallic, roughness, combined
10641
- * metallic-roughness, occlusion, emission, and normal maps support UV0/UV1 and material UV
10642
- * matrices. Layered extensions, custom compilation, parallax/environment inputs, blending,
10643
- * alpha-to-coverage, and non-default depth modes fail closed.
10792
+ * Optional exact per-mesh variants applied without splitting the renderer list. This preserves
10793
+ * global transparent sorting while allowing geometry/material topology to select its compiled
10794
+ * shader. Every mapped shader must expose the same group-three readonly-storage ABI as
10795
+ * the default shader.
10644
10796
  */
10645
- readonly material: PBRMaterial;
10646
- /** Optional coarse levels ordered from smallest to largest projected-radius threshold. */
10647
- readonly lods?: readonly GPUSceneLOD[];
10648
- }
10649
- /** One concrete scene shader topology requested before the first application frame. */
10650
- interface ClusteredMaterialVariantManifestEntry {
10651
- /** Exemplar carrying the exact geometry deformation and PBR material topology. */
10652
- readonly mesh: Mesh;
10653
- /** Also warm the receive-shadow variant. Defaults to the exemplar's current setting. */
10654
- readonly shadowed?: boolean;
10655
- }
10656
- /** Bounded startup manifest for clustered scene shader translation and diagnostics. */
10657
- interface ClusteredMaterialVariantManifest {
10658
- /** Exact mesh/material exemplars whose native clustered variants are required at startup. */
10659
- readonly entries: readonly Readonly<ClusteredMaterialVariantManifestEntry>[];
10660
- /** Maximum unique native scene variants, including runtime discoveries. Defaults to 64. */
10661
- readonly maxVariants?: number;
10662
- /** Variants translated before yielding back to renderer initialization. Defaults to 4. */
10663
- readonly warmupBatchSize?: number;
10797
+ readonly shaderByMesh?: ReadonlyMap<Mesh, StorageGraphicsShader>;
10798
+ /** Positional ranges matching the shader's sorted readonly-storage binding order. */
10799
+ readonly buffers: readonly Readonly<SceneStorageBufferBinding>[];
10664
10800
  }
10665
- /** Construction options for the WebGPU high-end GPU Scene and Clustered Forward+ pipeline. */
10666
- interface ClusteredForwardPlusPipelineOptions {
10667
- /**
10668
- * GPU Scene bucket families. Compatible opaque and alpha-masked meshes match by identity;
10669
- * other scene meshes remain renderable through the shared Forward compatibility path.
10670
- */
10671
- readonly buckets: readonly GPUSceneBucket[];
10672
- /**
10673
- * Stable fixed-bucket GPU Scene object capacity. Compatible excess PBR uses the direct native
10674
- * clustered lane; unsupported content uses Forward compatibility. Defaults to 16,384.
10675
- */
10676
- readonly maxObjects?: number;
10677
- /** GPU light-database capacity. Extra traversal-order lights are deterministically dropped. */
10678
- readonly maxLights?: number;
10679
- /** Global cluster light-index budget. Defaults to 1,048,576 indices. */
10680
- readonly maxLightIndices?: number;
10681
- /** Per-cluster allocation ceiling. Defaults to 96. */
10682
- readonly maxLightsPerCluster?: number;
10683
- /** Cluster tile width and height in physical pixels. Defaults to 32. */
10684
- readonly tileSize?: number;
10685
- /** Logarithmic view-depth slice count. Defaults to 24. */
10686
- readonly zSlices?: number;
10687
- /** Largest supported physical output width. Defaults to 2560. */
10688
- readonly maxViewportWidth?: number;
10689
- /** Largest supported physical output height. Defaults to 1440. */
10690
- readonly maxViewportHeight?: number;
10691
- /** Enable previous-frame Hi-Z occlusion. Defaults to true. */
10692
- readonly hiZ?: boolean;
10693
- /**
10694
- * GPU receiver-driven virtual directional shadows with arbitrary page-table remapping and
10695
- * camera-centered clipmaps. Requires `hiZ`; disabled by default.
10696
- */
10697
- readonly virtualShadows?: Readonly<VirtualShadowMapOptions> | false;
10698
- /** Bloom contribution mixed into the final display transform. Defaults to 0.7. */
10699
- readonly bloomStrength?: number;
10700
- /** Exposure multiplier applied before the ACES display transform. Defaults to 1. */
10701
- readonly exposure?: number;
10702
- /** HDR display curve. Defaults to ACES; filmic preserves a softer storm-sky shoulder. */
10703
- readonly toneMapping?: 'aces' | 'filmic';
10704
- /** GPU luminance histogram and temporal eye adaptation. Disabled by default. */
10705
- readonly autoExposure?: Readonly<AutoExposureOptions> | false;
10706
- /**
10707
- * Physical Rayleigh/Mie/ozone atmosphere, aerial perspective, procedural volumetric clouds,
10708
- * and cloud shadows. Disabled by default.
10709
- */
10710
- readonly atmosphere?: Readonly<AtmosphereWeatherOptions> | false;
10711
- /** Integrated temporal AA/TAAU. Disabled by default; `false` explicitly disables it. */
10712
- readonly temporalAA?: Readonly<TemporalAAOptions> | false;
10713
- /**
10714
- * Integrated ground-truth ambient occlusion. Disabled by default. The GPU Scene path reuses
10715
- * temporal motion data and therefore requires `temporalAA` when enabled.
10716
- */
10717
- readonly groundTruthAmbientOcclusion?: Readonly<GroundTruthAmbientOcclusionOptions> | false;
10801
+ /** Retained parameters consumed by {@link SceneRenderPass}. */
10802
+ interface SceneRenderPassParameters {
10803
+ /** One setup-declared renderer list prepared through the shared mesh draw processor. */
10804
+ readonly rendererList: RendererListHandle;
10805
+ /** Continuous color attachments in fragment-output location order. */
10806
+ readonly colorAttachments: readonly Readonly<RenderPipelineColorAttachment>[];
10807
+ /** Optional depth/stencil attachment shared by every draw in the list. */
10808
+ readonly depthStencilAttachment?: Readonly<RenderPipelineDepthStencilAttachment>;
10809
+ /** Optional execution viewport in physical attachment pixels. */
10810
+ readonly viewport?: RendererViewport;
10811
+ /** Optional execution scissor in physical attachment pixels. */
10812
+ readonly scissor?: RendererViewport;
10813
+ /** Optional unsigned stencil reference set before drawing the list. */
10814
+ readonly stencilReference?: number;
10718
10815
  /**
10719
- * Temporally accumulated screen-space diffuse global illumination. Disabled by default.
10720
- * The GPU Scene path reuses motion and material attributes and therefore requires `temporalAA`.
10816
+ * Opaque scene color sampled by transmission/volume materials in this pass. The graph keeps
10817
+ * this input distinct from the active color attachment, preventing raster feedback.
10721
10818
  */
10722
- readonly screenSpaceGlobalIllumination?: Readonly<ScreenSpaceGlobalIlluminationOptions> | false;
10819
+ readonly opaqueTexture?: RenderGraphTextureAccessHandle;
10723
10820
  /**
10724
- * Hierarchical, temporally accumulated screen-space reflections. Disabled by default.
10725
- * Enabling this production path requires both `hiZ` and `temporalAA`.
10821
+ * Screen-space ambient visibility sampled by built-in opaque PBR materials in this pass.
10822
+ * This pass-global input is mutually exclusive with `opaqueTexture`; opaque shading
10823
+ * consumes GTAO while later transmission shading consumes the captured opaque color.
10726
10824
  */
10727
- readonly screenSpaceReflections?: Readonly<ScreenSpaceReflectionsOptions> | false;
10825
+ readonly ambientOcclusionTexture?: RenderGraphTextureAccessHandle;
10826
+ /** Optional WebGPU-only storage-aware shader variant for the ordinary renderer-list path. */
10827
+ readonly storageShaderVariant?: Readonly<SceneStorageShaderVariant>;
10828
+ }
10829
+ /**
10830
+ * Stable scene pass backed by `SharedDrawPassParameters` and `MeshDrawProcessor`.
10831
+ *
10832
+ * The instance is reusable. Parameters remain caller-owned and must come from a
10833
+ * {@link RenderPassParameterPool} when the pass is recorded every frame.
10834
+ */
10835
+ declare class SceneRenderPass implements ScriptableRenderPass<SceneRenderPassParameters> {
10836
+ /** Stable diagnostic pass name. */
10837
+ readonly name: string;
10838
+ constructor(name?: string);
10839
+ /** Declare attachments and the renderer list without issuing commands. */
10840
+ setup(builder: ScriptableRenderPassBuilder, parameters: SceneRenderPassParameters): void;
10841
+ /** Apply optional dynamic state and draw the setup-declared renderer list. */
10842
+ execute(context: ScriptableRenderPassContext, parameters: SceneRenderPassParameters): void;
10843
+ }
10844
+
10845
+ /** Parameters consumed by {@link ShadowRenderPass}. */
10846
+ interface ShadowRenderPassParameters {
10847
+ /** Shared culling results whose lights and visible shadow casters populate the atlas. */
10848
+ readonly cullingResults: CullingResultsHandle;
10849
+ }
10850
+ /**
10851
+ * Records the renderer's shared shadow-atlas pass set.
10852
+ *
10853
+ * A shadow atlas can expand to several graph passes, so this primitive records directly through
10854
+ * {@link RenderPipelineContext} instead of masquerading as one `ScriptableRenderPass` node.
10855
+ */
10856
+ declare class ShadowRenderPass {
10857
+ /** Stable diagnostic name for shadow recording failures. */
10858
+ readonly name: string;
10859
+ constructor(name?: string);
10860
+ /** Record all required atlas slices synchronously. */
10861
+ record(context: RenderPipelineContext, parameters: Readonly<ShadowRenderPassParameters>): void;
10862
+ }
10863
+
10864
+ /** Full selected-subresource copy parameters. Views may have different parent descriptors. */
10865
+ interface TextureCopyPassParameters {
10866
+ /** Initialized single-sample copy source. */
10867
+ readonly source: RenderGraphTextureAccessHandle;
10868
+ /** Same-format, same-extent single-sample copy destination. */
10869
+ readonly destination: RenderGraphTextureAccessHandle;
10870
+ }
10871
+ /** Portable full selected-subresource copy pass emitted through the selected RHI backend. */
10872
+ declare class TextureCopyPass implements ScriptableRenderPass<TextureCopyPassParameters> {
10873
+ /** Stable diagnostic pass name. */
10874
+ readonly name: string;
10875
+ constructor(name?: string);
10876
+ /** Declare the copy source and destination. */
10877
+ setup(builder: ScriptableRenderPassBuilder, parameters: TextureCopyPassParameters): void;
10878
+ /** Emit one portable full-texture copy. */
10879
+ execute(context: ScriptableRenderPassContext, parameters: TextureCopyPassParameters): void;
10880
+ }
10881
+
10882
+ /** GPU-time-driven dynamic-resolution controls. */
10883
+ interface DynamicResolutionOptions {
10884
+ /** Lowest internal resolution scale. Defaults to 0.5. */
10885
+ readonly minScale?: number;
10886
+ /** Highest internal resolution scale. Defaults to 1. */
10887
+ readonly maxScale?: number;
10888
+ /** Initial scale before enough GPU samples are available. Defaults to `maxScale`. */
10889
+ readonly initialScale?: number;
10890
+ /** Target summed profiled Render Graph render/compute duration in milliseconds. Defaults to 16.667. */
10891
+ readonly targetFrameTimeMs?: number;
10892
+ /** Symmetric no-change band around the target, as a ratio. Defaults to 0.1. */
10893
+ readonly hysteresis?: number;
10894
+ /** EWMA contribution of the newest GPU sample. Defaults to 0.2. */
10895
+ readonly response?: number;
10896
+ /** Quantized scale adjustment applied at each decision. Defaults to 0.05. */
10897
+ readonly scaleStep?: number;
10898
+ /** Successful GPU samples required before the first decision. Defaults to 6. */
10899
+ readonly warmupFrames?: number;
10900
+ /** Minimum GPU samples between scale changes. Defaults to 8. */
10901
+ readonly settlingFrames?: number;
10902
+ }
10903
+ /** Temporal anti-aliasing, temporal upscaling, and optional dynamic-resolution controls. */
10904
+ interface TemporalAAOptions {
10728
10905
  /**
10729
- * Camera-aligned froxel fog and volumetric local-light scattering. Disabled by default.
10730
- * This WebGPU path uses the complete 3D cluster light grid and submission-aware history.
10906
+ * Internal scene resolution relative to the output. Values below one enable TAAU. When
10907
+ * `dynamicResolution` is present this overrides that object's initial scale.
10908
+ * Defaults to 1 and is constrained to the inclusive range 0.5–1.
10731
10909
  */
10732
- readonly volumetricLighting?: Readonly<VolumetricLightingOptions> | false;
10733
- /** Optional bounded material/deformation topology manifest translated during async creation. */
10734
- readonly variantManifest?: Readonly<ClusteredMaterialVariantManifest>;
10910
+ readonly renderScale?: number;
10911
+ /** GPU timestamp driven dynamic resolution. Omit or use false for a fixed render scale. */
10912
+ readonly dynamicResolution?: Readonly<DynamicResolutionOptions> | false;
10913
+ /** Maximum accepted history contribution after rejection. Defaults to 0.92. */
10914
+ readonly historyWeight?: number;
10915
+ /** Maximum relative previous-view-depth error. Defaults to 0.02. */
10916
+ readonly depthThreshold?: number;
10917
+ /** Standard-deviation extent used by YCoCg variance clipping. Defaults to 1.25. */
10918
+ readonly varianceGamma?: number;
10919
+ /** Resolve-only contrast restoration; history remains unsharpened. Defaults to 0.08. */
10920
+ readonly sharpness?: number;
10735
10921
  }
10736
- /** On-demand GPU counters plus current CPU database occupancy. */
10737
- interface ClusteredForwardPlusDiagnostics {
10738
- /** Ordinary registered meshes currently occupying stable GPU Scene slots. */
10739
- readonly objectCount: number;
10740
- /** Visible-layer meshes routed through the shared Forward compatibility fallback. */
10741
- readonly fallbackObjectCount: number;
10742
- /** Alpha-blended PBR meshes shaded from the Clustered Forward+ light database. */
10743
- readonly clusteredTransparentObjectCount: number;
10744
- /** Non-bucket opaque PBR meshes using native clustered lighting with shared deformation. */
10745
- readonly clusteredDeformedObjectCount: number;
10746
- /** Enabled supported lights uploaded to the current GPU light database. */
10747
- readonly lightCount: number;
10748
- /** Enabled supported lights rejected by the configured light capacity. */
10749
- readonly droppedLightCount: number;
10750
- /** Objects written to a fixed visible bucket by the most recent submitted cull. */
10751
- readonly visibleObjectCount: number;
10752
- /** Objects rejected by conservative previous-frame Hi-Z occlusion. */
10753
- readonly occludedObjectCount: number;
10754
- /** Visible objects that selected a lower-detail geometry bucket. */
10755
- readonly lodObjectCount: number;
10756
- /** Light indices retained by the bounded cluster allocator. */
10757
- readonly clusterLightIndexCount: number;
10758
- /** Light-index entries truncated by per-cluster or global allocation limits. */
10759
- readonly clusterOverflowCount: number;
10760
- /** Whether conservative occlusion used a valid previous-frame Hi-Z pyramid. */
10761
- readonly hiZValid: boolean;
10762
- /** Current internal scene scale selected by fixed or dynamic temporal rendering. */
10922
+ /** Stable adaptive-resolution telemetry for renderer diagnostics. */
10923
+ interface DynamicResolutionDiagnostics {
10924
+ /** Current internal scene resolution relative to the output. */
10763
10925
  readonly renderScale: number;
10764
- /** Smoothed profiled Render Graph render/compute GPU time, or null before samples are ready. */
10926
+ /** EWMA of accepted profiled Render Graph GPU work, or null before the first sample. */
10765
10927
  readonly smoothedGPUFrameTimeMs: number | null;
10766
- /** Number of camera-aligned froxels injected by the latest submitted volumetric frame. */
10767
- readonly volumetricFroxelCount: number;
10768
- /** Whether the latest submitted volumetric resolve consumed temporal history. */
10769
- readonly volumetricHistoryUsed: boolean;
10770
- /** Eight-by-eight SSR trace tiles containing at least one eligible receiver. */
10771
- readonly screenSpaceReflectionActiveTileCount: number;
10772
- /** Eligible SSR receiver pixels classified by the latest submitted frame. */
10773
- readonly screenSpaceReflectionActivePixelCount: number;
10774
- /** Eligible SSR receiver pixels that produced a valid screen-space hit. */
10775
- readonly screenSpaceReflectionHitPixelCount: number;
10776
- /** Eligible SSR receiver pixels that missed or left the screen. */
10777
- readonly screenSpaceReflectionMissPixelCount: number;
10778
- /** SSR misses whose hierarchy crossing could not be validated precisely. */
10779
- readonly screenSpaceReflectionUncertainPixelCount: number;
10780
- /** SSR candidates rejected because the hit surface faced away from the ray. */
10781
- readonly screenSpaceReflectionBackfaceRejectedPixelCount: number;
10782
- /** SSR temporal pixels that consumed valid surface- or hit-domain history. */
10783
- readonly screenSpaceReflectionHistoryAcceptedPixelCount: number;
10784
- /** SSR temporal pixels that rejected every available history candidate. */
10785
- readonly screenSpaceReflectionHistoryRejectedPixelCount: number;
10786
- /** Latest adapted exposure in EV stops, or zero when auto exposure is disabled. */
10787
- readonly autoExposureEV: number;
10788
- /** Latest histogram-derived target exposure in EV stops, or zero when disabled. */
10789
- readonly autoExposureTargetEV: number;
10790
- /** Unique manifest variants translated before renderer creation completed. */
10791
- readonly warmedMaterialVariantCount: number;
10792
- /** Unique native variants admitted by the configured runtime budget. */
10793
- readonly activeMaterialVariantCount: number;
10794
- /** Runtime candidates rejected after the unique variant budget was exhausted. */
10795
- readonly materialVariantBudgetExceededCount: number;
10796
- /** Configured unique clustered scene-variant ceiling. */
10797
- readonly materialVariantBudget: number;
10798
- /** CPU translation wall time spent in asynchronous warmup. */
10799
- readonly materialVariantWarmupTimeMs: number;
10800
- /** Latest on-demand virtual-shadow counters, or null when virtual shadows are disabled. */
10801
- readonly virtualShadows: Readonly<VirtualShadowMapDiagnostics> | null;
10928
+ /** Number of distinct ready GPU timeline samples accepted by this controller. */
10929
+ readonly sampledFrameCount: number;
10802
10930
  }
10803
10931
  /**
10804
- * WebGPU-only high-end factory combining G0 GPU Scene/Hi-Z and L0 Clustered Forward+.
10932
+ * Temporal anti-aliasing, temporal upscaling, and GPU-time dynamic-resolution feature.
10805
10933
  *
10806
- * Compatible registered bucket meshes bypass CPU frustum sorting and ordinary PreparedDraw
10807
- * creation. Fixed indirect buckets accept opaque, unskinned, indexed triangle PBR geometry;
10808
- * eligible deformed, layered, and globally sorted transparent PBR meshes use the native direct
10809
- * storage-lighting lane. Material surface evaluation and the BRDF are shared with ordinary Forward
10810
- * PBR; clustered variants replace only light-list selection and iteration. Unregistered meshes,
10811
- * runtime-incompatible state, mixed compatibility-transparent queues, and object-capacity overflow
10812
- * use the shared Forward path in the same frame.
10813
- * Invalid initial bucket declarations and unsupported devices still fail closed.
10934
+ * The feature records built-in opaque/masked motion and logarithmic view-depth data after opaque
10935
+ * shading, resolves only opaque scene color, then lets transparent rendering and Bloom compose
10936
+ * afterward. History uses submission-aware double buffers and is reset by camera cuts, resize,
10937
+ * projection discontinuities, visibility gaps, or device recovery.
10814
10938
  */
10815
- declare class ClusteredForwardPlusPipelineFactory implements RenderPipelineFactory {
10939
+ declare class TemporalAA implements ForwardRenderPipelineFeature {
10816
10940
  #private;
10817
- /** Stable diagnostic label for renderer initialization and graph tooling. */
10818
- readonly name = "GPU Scene + Clustered Forward+";
10819
- /** Fail-closed WebGPU capabilities, limits, and texture formats required by this profile. */
10820
- readonly requirements: Readonly<RenderPipelineRequirements>;
10821
- constructor(options: Readonly<ClusteredForwardPlusPipelineOptions>);
10822
- /** Create one independent renderer-local GPU Scene and clustered-lighting runtime. */
10823
- create(context: RenderPipelineCreateContext): Promise<RenderPipeline>;
10824
- /** Read on-demand GPU counters when this factory is attached to exactly one live Renderer. */
10825
- readDiagnostics(): Promise<Readonly<ClusteredForwardPlusDiagnostics>>;
10941
+ readonly name = "temporal-aa";
10942
+ readonly injectionPoint: "after-opaque";
10943
+ readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
10944
+ constructor(options?: Readonly<TemporalAAOptions>);
10945
+ create(): ForwardRenderPipelineFeatureRuntime;
10946
+ /** Read adaptive-resolution state when this feature is attached to exactly one live Renderer. */
10947
+ readDynamicResolutionDiagnostics(): Readonly<DynamicResolutionDiagnostics>;
10948
+ }
10949
+
10950
+ /** Production controls for the WebGPU high-end hierarchical screen-space reflection path. */
10951
+ interface ScreenSpaceReflectionsOptions {
10952
+ /** Reflection trace resolution relative to the internal scene. Defaults to 0.5. */
10953
+ readonly resolutionScale?: number;
10954
+ /** Maximum view-space ray length. Defaults to 80. */
10955
+ readonly maxRayDistance?: number;
10956
+ /** View-space surface thickness accepted as a hit. Defaults to 0.2. */
10957
+ readonly thickness?: number;
10958
+ /** Minimum view-space distance advanced by the finest hierarchy level. Defaults to 0.12. */
10959
+ readonly stride?: number;
10960
+ /** Maximum hierarchical iterations per reflected pixel. Defaults to 64. */
10961
+ readonly maxSteps?: number;
10962
+ /** Surfaces at or above this perceptual roughness stop tracing. Defaults to 0.85. */
10963
+ readonly roughnessCutoff?: number;
10964
+ /** Width of the screen-edge confidence fade in normalized coordinates. Defaults to 0.08. */
10965
+ readonly edgeFade?: number;
10966
+ /** Maximum accepted temporal history contribution. Defaults to 0.9. */
10967
+ readonly historyWeight?: number;
10968
+ /** Maximum relative reprojected view-depth error. Defaults to 0.03. */
10969
+ readonly depthThreshold?: number;
10970
+ /** Linear HDR multiplier applied to SSR radiance, without scaling fallback removal. Defaults to 1. */
10971
+ readonly intensity?: number;
10972
+ }
10973
+
10974
+ /** Quality preset used when an individual GTAO sampling control is omitted. */
10975
+ type GroundTruthAmbientOcclusionQuality = 'low' | 'medium' | 'high' | 'ultra';
10976
+ /** Normal source used for GTAO horizon integration and edge rejection. */
10977
+ type GroundTruthAmbientOcclusionNormalSource = 'material' | 'geometry' | 'hybrid';
10978
+ /** Production controls for ground-truth ambient occlusion. */
10979
+ interface GroundTruthAmbientOcclusionOptions {
10980
+ /** Sampling preset. Individual resolution/direction/step controls override it. Defaults to high. */
10981
+ readonly quality?: GroundTruthAmbientOcclusionQuality;
10982
+ /** Internal AO resolution relative to opaque rendering. Defaults to the quality preset. */
10983
+ readonly resolutionScale?: number;
10984
+ /** View-space horizon-search radius. Defaults to 2. */
10985
+ readonly radius?: number;
10986
+ /** Fraction of the radius at which distance falloff begins. Defaults to 0.6. */
10987
+ readonly falloffStart?: number;
10988
+ /** View-space self-intersection rejection distance. Defaults to 0.05. */
10989
+ readonly thickness?: number;
10990
+ /** Blend between a thin depth field and a solid occluder. Defaults to 0.5. */
10991
+ readonly thicknessBlend?: number;
10992
+ /** Number of rotated horizon slices per pixel. Defaults to the quality preset. */
10993
+ readonly directionCount?: 2 | 3 | 4 | 6 | 8;
10994
+ /** Samples evaluated on each side of a horizon slice. Defaults to the quality preset. */
10995
+ readonly stepCount?: 3 | 4 | 5 | 6 | 8 | 10 | 12;
10996
+ /** Contrast applied to the physically normalized visibility. Defaults to 1.2. */
10997
+ readonly power?: number;
10998
+ /** Occlusion intensity before contrast. Defaults to 1. */
10999
+ readonly intensity?: number;
11000
+ /** Angular self-occlusion bias in radians. Defaults to 0.035. */
11001
+ readonly bias?: number;
11002
+ /** Radius of the additional contact-occlusion lobe, relative to radius. Defaults to 0.2. */
11003
+ readonly contactRadiusScale?: number;
11004
+ /** Strength of the contact-occlusion lobe. Defaults to 0.35. */
11005
+ readonly contactStrength?: number;
11006
+ /** Normal source used by the horizon search. Defaults to hybrid. */
11007
+ readonly normalSource?: GroundTruthAmbientOcclusionNormalSource;
11008
+ /** Geometric-normal contribution in hybrid mode. Defaults to 0.65. */
11009
+ readonly geometricNormalWeight?: number;
11010
+ /** Strength of bent-normal redirection. Defaults to 1. */
11011
+ readonly bentNormalStrength?: number;
11012
+ /** Strength of color-aware multi-bounce diffuse AO. Defaults to 1. */
11013
+ readonly multiBounce?: number;
11014
+ /** View distance where AO starts fading. Defaults to 100. */
11015
+ readonly distanceFadeStart?: number;
11016
+ /** View distance where AO is fully disabled. Defaults to 200. */
11017
+ readonly distanceFadeEnd?: number;
11018
+ /** Screen-edge fade width in AO pixels. Defaults to 2. */
11019
+ readonly edgeFadePixels?: number;
11020
+ /** Maximum accepted temporal contribution. Defaults to 0.9. */
11021
+ readonly historyWeight?: number;
11022
+ /** Maximum relative reprojected view-depth error. Defaults to 0.03. */
11023
+ readonly depthThreshold?: number;
11024
+ /** Minimum normal agreement accepted by temporal reprojection. Defaults to 0.82. */
11025
+ readonly normalThreshold?: number;
11026
+ }
11027
+ /**
11028
+ * Portable production GTAO for the shared Forward pipeline.
11029
+ *
11030
+ * The feature records opaque depth, material attributes, and motion before shading, evaluates
11031
+ * rotated horizon visibility at configurable resolution, applies submission-aware temporal
11032
+ * rejection and edge-aware filtering, and binds the full-resolution result only to indirect PBR
11033
+ * lighting. Direct lights and emission remain unoccluded.
11034
+ */
11035
+ declare class GroundTruthAmbientOcclusion implements ForwardRenderPipelineFeature {
11036
+ #private;
11037
+ readonly name = "ground-truth-ambient-occlusion";
11038
+ readonly injectionPoint: "before-opaque";
11039
+ readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
11040
+ constructor(options?: Readonly<GroundTruthAmbientOcclusionOptions>);
11041
+ create(): ForwardRenderPipelineFeatureRuntime;
11042
+ }
11043
+
11044
+ /** Production controls for portable screen-space diffuse global illumination. */
11045
+ interface ScreenSpaceGlobalIlluminationOptions {
11046
+ /** Internal tracing resolution relative to opaque rendering. Defaults to 0.5. */
11047
+ readonly resolutionScale?: number;
11048
+ /** Stochastic hemisphere rays traced per pixel. Defaults to 8. */
11049
+ readonly rayCount?: 4 | 6 | 8 | 12;
11050
+ /** Depth tests performed along each ray. Defaults to 8. */
11051
+ readonly stepCount?: 6 | 8 | 10 | 12;
11052
+ /** Maximum view-space ray distance. Defaults to 4. */
11053
+ readonly maxRayDistance?: number;
11054
+ /** View-space hit thickness used by ray/depth intersection. Defaults to 0.18. */
11055
+ readonly thickness?: number;
11056
+ /** Fraction of the trace distance at which contribution fading begins. Defaults to 0.72. */
11057
+ readonly distanceFadeStart?: number;
11058
+ /** Strength of the diffuse bounce added to linear scene color. Defaults to 1. */
11059
+ readonly intensity?: number;
11060
+ /** Saturation of transported radiance. Defaults to 1.1. */
11061
+ readonly saturation?: number;
11062
+ /** Firefly clamp for transported linear radiance. Defaults to 8. */
11063
+ readonly maxRadiance?: number;
11064
+ /** Maximum accepted temporal contribution. Defaults to 0.92. */
11065
+ readonly historyWeight?: number;
11066
+ /** Maximum relative reprojected view-depth error. Defaults to 0.025. */
11067
+ readonly depthThreshold?: number;
11068
+ /** Minimum normal similarity accepted by reprojection. Defaults to 0.82. */
11069
+ readonly normalThreshold?: number;
11070
+ /** Number of edge-aware a-trous denoise passes. Defaults to 3. */
11071
+ readonly denoisePasses?: 1 | 2 | 3;
11072
+ }
11073
+ /**
11074
+ * Portable production screen-space diffuse global illumination for the shared Forward pipeline.
11075
+ *
11076
+ * The feature traces stochastic view-space rays against opaque depth, transports linear HDR scene
11077
+ * radiance, rejects invalid history using motion/depth/normal data, applies variance clipping and
11078
+ * edge-aware a-trous filtering, then composites the result before transparent rendering.
11079
+ */
11080
+ declare class ScreenSpaceGlobalIllumination implements ForwardRenderPipelineFeature {
11081
+ #private;
11082
+ readonly name = "screen-space-global-illumination";
11083
+ readonly injectionPoint: "after-opaque";
11084
+ readonly requirements: Readonly<ForwardRenderFeatureRequirements>;
11085
+ constructor(options?: Readonly<ScreenSpaceGlobalIlluminationOptions>);
11086
+ create(): ForwardRenderPipelineFeatureRuntime;
10826
11087
  }
10827
11088
 
10828
- /** Process-global symbol used by optional addons to attach renderer behavior across package copies. */
10829
- declare const RENDER_NODE_EXTENSION: unique symbol;
10830
- /** GPU graph contribution owned by an optional scene-node addon. */
10831
- interface RenderNodeGPUExtension {
10832
- /** Whether this contribution has an opaque or alpha-masked phase. */
10833
- readonly hasOpaqueRenderers: boolean;
10834
- /** Whether simulation or raster needs the current sampled scene depth. */
10835
- readonly requiresSampledDepth: boolean;
10836
- /** Whether graph work must run even when the contribution is outside the camera. */
10837
- readonly hasPendingWork: boolean;
10838
- /** Test view visibility without issuing render commands. */
10839
- isVisible(camera: Camera): boolean;
10840
- /** Record one opaque or transparent contribution through the active Render Graph. */
10841
- record(context: RenderPipelineContext, color: RenderGraphTextureHandle, depth: RenderGraphTextureHandle | null, drawVisible: boolean, phase: 'opaque' | 'transparent'): void;
10842
- /** Commit staged state only after the enclosing frame submission succeeds. */
10843
- frameSubmitted(frameIndex: number): void;
10844
- /** Roll back staged state after recording or submission is discarded. */
10845
- frameDiscarded(frameIndex: number): void;
11089
+ /** Named performance/quality presets for froxel reconstruction and light visibility. */
11090
+ type VolumetricLightingQuality = 'low' | 'medium' | 'high' | 'ultra';
11091
+ /** Optional integrated-volume diagnostic shown in place of the composited HDR scene. */
11092
+ type VolumetricLightingDebugView = 'none' | 'radiance' | 'transmittance';
11093
+ /** One world-space spherical local fog-density volume. */
11094
+ interface VolumetricSphereFogVolume {
11095
+ /** Discriminant selecting spherical density evaluation. */
11096
+ readonly shape: 'sphere';
11097
+ /** Mutable world-space center sampled at frame-record time. */
11098
+ readonly center: Readonly<Vector3>;
11099
+ /** Outer sphere radius in world units. */
11100
+ readonly radius: number;
11101
+ /** Density added inside the volume. */
11102
+ readonly density: number;
11103
+ /** Single-scattering albedo tint. Defaults to the global fog albedo. */
11104
+ readonly albedo?: Readonly<Color>;
11105
+ /** Fraction of the radius used for a smooth edge. Defaults to 0.2. */
11106
+ readonly edgeFalloff?: number;
10846
11107
  }
10847
- /** Optional render lifecycle implemented by addon-owned scene nodes. */
10848
- interface RenderNodeExtension {
10849
- /** Allocate or recover renderer-local resources before node updates and graph recording. */
10850
- prepareRenderer?(renderer: RendererContract): void;
10851
- /** Refresh camera-dependent streams before scene collection. */
10852
- prepareView?(camera: Camera): void;
10853
- /** Active GPU contribution, or `null` when this node uses ordinary scene rendering only. */
10854
- readonly gpu: RenderNodeGPUExtension | null;
11108
+ /** One axis-aligned world-space box local fog-density volume. */
11109
+ interface VolumetricBoxFogVolume {
11110
+ /** Discriminant selecting axis-aligned box density evaluation. */
11111
+ readonly shape: 'box';
11112
+ /** Mutable world-space center sampled at frame-record time. */
11113
+ readonly center: Readonly<Vector3>;
11114
+ /** Mutable positive half extent sampled at frame-record time. */
11115
+ readonly halfExtents: Readonly<Vector3>;
11116
+ /** Density added inside the volume. */
11117
+ readonly density: number;
11118
+ /** Single-scattering albedo tint. Defaults to the global fog albedo. */
11119
+ readonly albedo?: Readonly<Color>;
11120
+ /** Fraction of the smallest half extent used for a smooth edge. Defaults to 0.2. */
11121
+ readonly edgeFalloff?: number;
10855
11122
  }
10856
- /** Read and validate an optional render-node extension without importing its addon package. */
10857
- declare function getRenderNodeExtension(node: Node): RenderNodeExtension | null;
10858
-
10859
- /** One graph-buffer range consumed by a storage binding. */
10860
- interface ComputeBufferBinding {
10861
- /** Frame-scoped graph buffer handle. */
10862
- readonly buffer: RenderGraphBufferHandle;
10863
- /** Four-byte-aligned offset into the buffer, defaulting to zero. */
10864
- readonly byteOffset?: number;
10865
- /** Four-byte-aligned bound range, defaulting to the remaining buffer. */
10866
- readonly byteLength?: number;
11123
+ /** Local fog shapes injected into the camera-aligned froxel volume. */
11124
+ type VolumetricFogVolume = VolumetricSphereFogVolume | VolumetricBoxFogVolume;
11125
+ /** Production controls for WebGPU Clustered Forward+ froxel volumetric lighting. */
11126
+ interface VolumetricLightingOptions {
11127
+ /** Preset used for unspecified reconstruction and shadow budgets. Defaults to high. */
11128
+ readonly quality?: VolumetricLightingQuality;
11129
+ /** Froxel XY and reconstruction resolution relative to the internal scene. Defaults to the preset. */
11130
+ readonly resolutionScale?: number;
11131
+ /** Depth-aware screen-space light visibility samples in [0, 8]. Defaults to the preset. */
11132
+ readonly shadowSteps?: number;
11133
+ /** Global extinction density in inverse world units. Defaults to 0.025. */
11134
+ readonly density?: number;
11135
+ /** World-space height at and below which global density is constant. Defaults to 0. */
11136
+ readonly baseHeight?: number;
11137
+ /** Exponential density falloff above baseHeight. Defaults to 0.12. */
11138
+ readonly heightFalloff?: number;
11139
+ /** Maximum integrated view distance in world units. Defaults to 120. */
11140
+ readonly maxDistance?: number;
11141
+ /** Global single-scattering albedo. Defaults to a cool neutral white. */
11142
+ readonly albedo?: Readonly<Color>;
11143
+ /** Henyey-Greenstein anisotropy in [-0.9, 0.9]. Positive values emphasize forward scatter. */
11144
+ readonly anisotropy?: number;
11145
+ /** Ambient light injected into the medium. Defaults to 0.12. */
11146
+ readonly ambientStrength?: number;
11147
+ /** Sub-froxel stochastic sample offset strength in [0, 1]. Defaults to 1. */
11148
+ readonly jitterStrength?: number;
11149
+ /** Maximum temporal history contribution in [0, 0.98]. Defaults to 0.9. */
11150
+ readonly historyWeight?: number;
11151
+ /** Maximum relative scene-depth disagreement accepted during reprojection. Defaults to 0.04. */
11152
+ readonly depthThreshold?: number;
11153
+ /** Optional world-space local fog volumes, limited to 32. */
11154
+ readonly localVolumes?: readonly VolumetricFogVolume[];
11155
+ /** Replace normal composition with an integrated radiance or extinction diagnostic. */
11156
+ readonly debugView?: VolumetricLightingDebugView;
10867
11157
  }
10868
- /** One graph texture consumed by a sampled- or storage-texture binding. */
10869
- interface ComputeTextureBinding {
10870
- /** Complete single-sample two-dimensional graph texture subresource. */
10871
- readonly texture: RenderGraphTextureAccessHandle;
11158
+
11159
+ /** Luminance-metering pattern used by {@link AutoExposure}. */
11160
+ type AutoExposureMeteringMode = 'average' | 'center-weighted';
11161
+ /** GPU histogram, percentile metering, and eye-adaptation controls. */
11162
+ interface AutoExposureOptions {
11163
+ /** Lowest log2 luminance represented by the histogram. Defaults to -12. */
11164
+ readonly minimumLogLuminance?: number;
11165
+ /** Highest log2 luminance represented by the histogram. Defaults to 16. */
11166
+ readonly maximumLogLuminance?: number;
11167
+ /** Dark-tail percentile excluded from metering in [0, 0.49]. Defaults to 0.02. */
11168
+ readonly lowPercentile?: number;
11169
+ /** Bright-tail percentile retained by metering in [0.51, 1]. Defaults to 0.98. */
11170
+ readonly highPercentile?: number;
11171
+ /** Minimum automatically selected EV in [-15, 15]. Defaults to -8. */
11172
+ readonly minimumEV?: number;
11173
+ /** Maximum automatically selected EV in [-15, 15]. Defaults to 8. */
11174
+ readonly maximumEV?: number;
11175
+ /** Exposure compensation in EV stops. Defaults to 0. */
11176
+ readonly compensation?: number;
11177
+ /** Middle-gray target luminance in [0.01, 0.5]. Defaults to 0.18. */
11178
+ readonly keyValue?: number;
11179
+ /** Adaptation speed when exposure increases, in inverse seconds. Defaults to 1.5. */
11180
+ readonly speedUp?: number;
11181
+ /** Adaptation speed when exposure decreases, in inverse seconds. Defaults to 3. */
11182
+ readonly speedDown?: number;
11183
+ /** Histogram sampling stride in pixels. Defaults to 2. */
11184
+ readonly sampleStride?: number;
11185
+ /** Metering pattern. Defaults to center-weighted. */
11186
+ readonly metering?: AutoExposureMeteringMode;
10872
11187
  }
10873
- /** A whole std140 uniform buffer or one explicitly selected range. */
10874
- type ComputeUniformBufferBinding = UniformBuffer | UniformBufferRange;
10875
- /** Direct or GPU-authored indirect dispatch dimensions. */
10876
- type ComputeDispatch = Readonly<{
10877
- x: number;
10878
- y?: number;
10879
- z?: number;
10880
- }> | Readonly<{
10881
- indirectBuffer: RenderGraphBufferHandle;
10882
- indirectOffset?: number;
10883
- }>;
10884
- /** Frame-scoped binding resources and dispatch parameters for one compute pass. */
10885
- interface ComputeRenderPassParameters {
10886
- /** std140 uniform resources in sorted uniform-binding order. */
10887
- readonly uniformBuffers?: readonly ComputeUniformBufferBinding[];
10888
- /** Storage resources in sorted storage-buffer-binding order. */
10889
- readonly buffers: readonly ComputeBufferBinding[];
10890
- /** Texture resources in sorted sampled/storage-texture-binding order. */
10891
- readonly textures: readonly ComputeTextureBinding[];
10892
- /** Immutable samplers in sorted sampler-binding order. */
10893
- readonly samplers?: readonly ComputeSampler[];
10894
- /** Direct dimensions or an indirect argument buffer. */
10895
- readonly dispatch: ComputeDispatch;
11188
+ /** On-demand values written by the latest submitted exposure reduction. */
11189
+ interface AutoExposureDiagnostics {
11190
+ /** Adapted exposure in EV stops. */
11191
+ readonly actualEV: number;
11192
+ /** Histogram-derived target exposure in EV stops. */
11193
+ readonly targetEV: number;
11194
+ /** Percentile-clipped geometric mean luminance. */
11195
+ readonly averageLuminance: number;
11196
+ /** Weighted histogram sample count. */
11197
+ readonly sampleCount: number;
10896
11198
  }
10897
11199
  /**
10898
- * Stable WebGPU compute pass backed by one immutable {@link ComputeKernel}.
11200
+ * WebGPU histogram auto exposure with percentile clipping and submission-aware eye adaptation.
10899
11201
  *
10900
- * Binding arrays are positional within their resource category and follow the shader ABI after
10901
- * sorting by `(group, binding)`. Setup derives graph access directly from that ABI; callers cannot
10902
- * downgrade a writable storage binding to a read dependency.
11202
+ * The feature records after HDR post-processing and before the display transform, so Bloom and
11203
+ * authored emissive energy share one exposure. It performs no per-frame CPU readback.
10903
11204
  */
10904
- declare class ComputeRenderPass implements ScriptableRenderPass<ComputeRenderPassParameters> {
10905
- /** Stable diagnostic pass name. */
10906
- readonly name: string;
10907
- /** Immutable compute pipeline and shader identity. */
10908
- readonly kernel: ComputeKernel;
10909
- constructor(kernel: ComputeKernel, name?: string);
10910
- /** Declare storage, texture, and indirect dependencies from the immutable shader ABI. */
10911
- setup(builder: ScriptableRenderPassBuilder, parameters: ComputeRenderPassParameters): void;
10912
- /** Command emission is supplied by the framework after the pass callback returns. */
10913
- execute(_context: ScriptableRenderPassContext, _parameters: ComputeRenderPassParameters): void;
11205
+ declare class AutoExposure implements ForwardRenderPipelineFeature {
11206
+ #private;
11207
+ readonly name = "auto-exposure";
11208
+ readonly injectionPoint: "after-post-process";
11209
+ readonly requirements: Readonly<{
11210
+ sampledSceneColor: true;
11211
+ sampledDepth: false;
11212
+ requiredCapabilities: readonly ("compute-pass" | "storage-buffer" | "storage-texture")[];
11213
+ requiredTextureFormats: readonly (Readonly<{
11214
+ format: "rgba16float";
11215
+ use: "filterable-sampled";
11216
+ }> | Readonly<{
11217
+ format: "rgba16float";
11218
+ use: "storage";
11219
+ }> | Readonly<{
11220
+ format: "rgba16float";
11221
+ use: "color-attachment";
11222
+ }>)[];
11223
+ requiredLimits: Readonly<{
11224
+ maxBindingsPerBindGroup: 5;
11225
+ maxStorageBuffersPerShaderStage: 3;
11226
+ maxStorageTexturesPerShaderStage: 1;
11227
+ maxSampledTexturesPerShaderStage: 1;
11228
+ maxComputeInvocationsPerWorkgroup: number;
11229
+ }>;
11230
+ }>;
11231
+ constructor(options?: Readonly<AutoExposureOptions>);
11232
+ create(context: RenderPipelineCreateContext): ForwardRenderPipelineFeatureRuntime;
11233
+ /** Read the latest adapted values when attached to exactly one live renderer. */
11234
+ readDiagnostics(): Promise<Readonly<AutoExposureDiagnostics>>;
11235
+ }
11236
+
11237
+ /** GPU receiver-driven shadow-page allocation and directional clipmap controls. */
11238
+ interface VirtualShadowMapOptions {
11239
+ /** Square virtual resolution for every directional clipmap level. Defaults to 4096. */
11240
+ readonly virtualResolution?: number;
11241
+ /** Square physical page edge in pixels. Defaults to 128. */
11242
+ readonly pageSize?: number;
11243
+ /** Shared physical depth-page capacity. Defaults to 32. */
11244
+ readonly physicalPageCount?: number;
11245
+ /** Maximum missing or invalidated pages rendered by one frame. Defaults to 16. */
11246
+ readonly maxPageUpdatesPerFrame?: number;
11247
+ /** Camera-centered directional clipmap levels. Defaults to 4. */
11248
+ readonly directionalClipmapLevels?: number;
11249
+ /** Full world-space width covered by the finest clipmap. Defaults to 64. */
11250
+ readonly firstDirectionalClipmapExtent?: number;
11251
+ }
11252
+ /** On-demand counters copied only when diagnostics are explicitly requested. */
11253
+ interface VirtualShadowMapDiagnostics {
11254
+ /** Unique logical pages requested by the latest submitted receiver pass. */
11255
+ readonly requestedPageCount: number;
11256
+ /** Physical pages whose depth contents were refreshed by the latest submitted frame. */
11257
+ readonly renderedPageCount: number;
11258
+ /** Requested or dirty pages postponed by the configured update/physical-page budgets. */
11259
+ readonly deferredPageCount: number;
11260
+ /** Valid physical residency records retained after the latest submitted allocation. */
11261
+ readonly residentPageCount: number;
11262
+ /** Resident physical pages remapped to another logical identity. */
11263
+ readonly evictionCount: number;
11264
+ /** Unique logical pages touched by changed caster coverage. */
11265
+ readonly invalidatedPageCount: number;
11266
+ /** Configured physical depth-page capacity. */
11267
+ readonly physicalPageCapacity: number;
11268
+ /** Configured camera-centered clipmap levels per directional light. */
11269
+ readonly directionalClipmapLevelCount: number;
10914
11270
  }
10915
11271
 
10916
- /** A keyed cache with optional object-identity lookup. */
10917
- declare class Cache<Value = unknown> {
10918
- private readonly entries;
10919
- private objectIds;
10920
- /** @internal Renderer diagnostics only; not part of the public cache contract. */
10921
- get size(): number;
10922
- get(id: string): Value | undefined;
10923
- getObject(object: object): Value | undefined;
10924
- add(id: string, value: Value): void;
10925
- remove(id: string): void;
10926
- removeObject(object: object): void;
10927
- removeAll(): void;
10928
- each(callback: (value: Value, id: string) => void): void;
11272
+ /** Rendering budgets for the physical atmosphere and volumetric clouds. */
11273
+ type AtmosphereWeatherQuality = 'low' | 'medium' | 'high' | 'ultra';
11274
+ /** Optional diagnostic texture shown in place of the weather composition. */
11275
+ type AtmosphereWeatherDebugView = 'none' | 'transmittance' | 'multi-scattering' | 'sky-view' | 'weather-map' | 'cloud-radiance' | 'cloud-transmittance' | 'cloud-shadow';
11276
+ /**
11277
+ * Mutable state sampled by the weather renderer at frame-record time.
11278
+ *
11279
+ * Updating these values does not recreate pipelines. Call `invalidateHistory()` after a
11280
+ * discontinuous preset or time-of-day jump; continuous animation may update `timeSeconds` and
11281
+ * `sunDirection` every frame without resetting history.
11282
+ */
11283
+ declare class AtmosphereWeatherState {
11284
+ #private;
11285
+ /** Normalized world-space direction from the scene toward the sun. */
11286
+ readonly sunDirection: Vector3;
11287
+ /** Procedural weather animation time in seconds. */
11288
+ timeSeconds: number;
11289
+ /** Fractional cloud coverage in [0, 1]. */
11290
+ cloudCoverage: number;
11291
+ /** Cloud optical-density multiplier in [0, 4]. */
11292
+ cloudDensity: number;
11293
+ /** Cumulonimbus/storm shaping in [0, 1]. */
11294
+ storminess: number;
11295
+ /** Horizontal wind direction; Y is ignored. */
11296
+ readonly windDirection: Vector3;
11297
+ /** Wind speed in world units per second. */
11298
+ windSpeed: number;
11299
+ /** Monotonic discontinuity revision consumed by temporal cloud history. */
11300
+ get historyRevision(): number;
11301
+ /** Reset cloud temporal history after a discontinuous authored state change. */
11302
+ invalidateHistory(): this;
10929
11303
  }
10930
-
10931
- interface ShaderParameters {
10932
- vs?: string;
10933
- fs?: string;
10934
- alwaysUse?: boolean;
11304
+ /** Rayleigh, Mie, ozone, sun, and aerial-perspective configuration. */
11305
+ interface PhysicalAtmosphereOptions {
11306
+ /** Planet radius in world units. Defaults to 6,360,000. */
11307
+ readonly planetRadius?: number;
11308
+ /** Atmosphere height above the planet surface. Defaults to 100,000. */
11309
+ readonly atmosphereHeight?: number;
11310
+ /** World-space planet center. Defaults to `(0, -planetRadius, 0)`. */
11311
+ readonly planetCenter?: Readonly<Vector3>;
11312
+ /** Rayleigh density scale height. Defaults to 8,000. */
11313
+ readonly rayleighScaleHeight?: number;
11314
+ /** Mie density scale height. Defaults to 1,200. */
11315
+ readonly mieScaleHeight?: number;
11316
+ /** Mie phase anisotropy in [0, 0.95]. Defaults to 0.8. */
11317
+ readonly mieAnisotropy?: number;
11318
+ /** Ozone layer center altitude. Defaults to 25,000. */
11319
+ readonly ozoneCenterHeight?: number;
11320
+ /** Ozone triangular half-width. Defaults to 15,000. */
11321
+ readonly ozoneWidth?: number;
11322
+ /** Solar illuminance multiplier. Defaults to 20. */
11323
+ readonly sunIlluminance?: number;
11324
+ /** Linear sun tint. Defaults to warm white. */
11325
+ readonly sunColor?: Readonly<Color>;
11326
+ /** Angular sun-disc radius in degrees. Defaults to 0.27. */
11327
+ readonly sunAngularRadius?: number;
11328
+ /** Maximum aerial-perspective distance. Defaults to 160,000. */
11329
+ readonly aerialPerspectiveDistance?: number;
11330
+ /** Ground albedo used by the multi-scattering approximation. */
11331
+ readonly groundAlbedo?: Readonly<Color>;
10935
11332
  }
10936
- interface ShaderPrecisionProvider {
10937
- vertexPrecision: ShaderPrecision;
10938
- fragmentPrecision: ShaderPrecision;
11333
+ /** Procedural weather map, cloud shell, ray-march, lighting, and temporal controls. */
11334
+ interface VolumetricCloudOptions {
11335
+ /** Cloud-base altitude above the planet surface. Defaults to 1,500. */
11336
+ readonly baseHeight?: number;
11337
+ /** Cloud-layer thickness. Defaults to 8,500. */
11338
+ readonly thickness?: number;
11339
+ /** Horizontal weather-map scale in world units. Defaults to 120,000. */
11340
+ readonly weatherScale?: number;
11341
+ /** Detail-noise scale in world units. Defaults to 7,000. */
11342
+ readonly detailScale?: number;
11343
+ /** Cloud-light forward-scattering anisotropy. Defaults to 0.72. */
11344
+ readonly anisotropy?: number;
11345
+ /** Silver-lining strength in [0, 4]. Defaults to 1.25. */
11346
+ readonly silverLining?: number;
11347
+ /** Ambient sky-light strength in [0, 4]. Defaults to 0.65. */
11348
+ readonly ambientStrength?: number;
11349
+ /** Temporal history contribution in [0, 0.98]. Defaults to 0.92. */
11350
+ readonly historyWeight?: number;
11351
+ /** Screen-space cloud-shadow coverage in world units. Defaults to 80,000. */
11352
+ readonly shadowDistance?: number;
10939
11353
  }
10940
- interface ShaderRenderer extends ShaderPrecisionProvider {
10941
- resourceManager: RendererResourceManager;
11354
+ /** Complete physical atmosphere, cloud, and mutable weather-state configuration. */
11355
+ interface AtmosphereWeatherOptions {
11356
+ /** Named sampling and reconstruction budget. Defaults to high. */
11357
+ readonly quality?: AtmosphereWeatherQuality;
11358
+ /** Mutable sun, cloud, wind, and time state. */
11359
+ readonly state?: AtmosphereWeatherState;
11360
+ /** Physical atmosphere constants. */
11361
+ readonly atmosphere?: Readonly<PhysicalAtmosphereOptions>;
11362
+ /** Volumetric clouds, or false to render atmosphere only. */
11363
+ readonly clouds?: Readonly<VolumetricCloudOptions> | false;
11364
+ /** Replace normal composition with one intermediate diagnostic. */
11365
+ readonly debugView?: AtmosphereWeatherDebugView;
10942
11366
  }
10943
- /**
10944
- * Shader类
10945
- */
10946
- declare class Shader {
10947
- readonly isShader = true;
10948
- readonly className = "Shader";
10949
- readonly id: string;
10950
- private _isDestroyed;
10951
- private _variantKey;
10952
- /**
10953
- * vs 顶点代码
10954
- */
10955
- vs: string;
10956
- /**
10957
- * vs 片段代码
10958
- */
10959
- fs: string;
10960
- static commonOptions: Record<string, number>;
10961
- /**
10962
- * 内部的所有shader块字符串,可以用来拼接glsl代码
10963
- */
10964
- static shaders: {
10965
- [k: string]: string;
10966
- };
10967
- /**
10968
- * 初始化
10969
- * @param renderer -
10970
- */
10971
- static init(renderer: ShaderPrecisionProvider): void;
10972
- /**
10973
- * Shader 缓存
10974
- */
10975
- static get cache(): Cache<Shader>;
10976
- /**
10977
- * Shader header缓存,一般不用管
10978
- */
10979
- static get headerCache(): Cache<string>;
10980
- /**
10981
- * 重置
10982
- */
10983
- static reset(): void;
11367
+
11368
+ /** One lower-detail geometry selected when its projected bounding radius is small enough. */
11369
+ interface GPUSceneLOD {
11370
+ /** Indexed triangle geometry with float32 position/normal and any material-required UV/tangent streams. */
11371
+ readonly geometry: Geometry;
11372
+ /** Maximum projected radius in physical pixels at which this LOD is selected. */
11373
+ readonly maximumProjectedRadius: number;
11374
+ }
11375
+ /** One material/geometry family consumed by the GPU Scene fixed-bucket indirect path. */
11376
+ interface GPUSceneBucket {
11377
+ /** Highest-detail indexed triangle geometry. */
11378
+ readonly geometry: Geometry;
10984
11379
  /**
10985
- * 获取header缓存的key
10986
- * @param mesh - mesh
10987
- * @param material - 材质
10988
- * @param lightManager - lightManager
10989
- * @param fog - fog
10990
- * @param useLogDepth - 是否使用对数深度
11380
+ * Opaque or alpha-masked built-in metallic/roughness PBR material evaluated by the shared
11381
+ * surface/BRDF contract. Base-color, opacity, metallic, roughness, combined
11382
+ * metallic-roughness, occlusion, emission, and normal maps support UV0/UV1 and material UV
11383
+ * matrices. Layered extensions, custom compilation, parallax/environment inputs, blending,
11384
+ * alpha-to-coverage, and non-default depth modes fail closed.
10991
11385
  */
10992
- static getHeaderKey(mesh: Mesh, material: MaterialInstance, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, role?: MaterialPassRole): string;
11386
+ readonly material: PBRMaterial;
11387
+ /** Optional coarse levels ordered from smallest to largest projected-radius threshold. */
11388
+ readonly lods?: readonly GPUSceneLOD[];
11389
+ }
11390
+ /** One concrete scene shader topology requested before the first application frame. */
11391
+ interface ClusteredMaterialVariantManifestEntry {
11392
+ /** Exemplar carrying the exact geometry deformation and PBR material topology. */
11393
+ readonly mesh: Mesh;
11394
+ /** Also warm the receive-shadow variant. Defaults to the exemplar's current setting. */
11395
+ readonly shadowed?: boolean;
11396
+ }
11397
+ /** Bounded startup manifest for clustered scene shader translation and diagnostics. */
11398
+ interface ClusteredMaterialVariantManifest {
11399
+ /** Exact mesh/material exemplars whose native clustered variants are required at startup. */
11400
+ readonly entries: readonly Readonly<ClusteredMaterialVariantManifestEntry>[];
11401
+ /** Maximum unique native scene variants, including runtime discoveries. Defaults to 64. */
11402
+ readonly maxVariants?: number;
11403
+ /** Variants translated before yielding back to renderer initialization. Defaults to 4. */
11404
+ readonly warmupBatchSize?: number;
11405
+ }
11406
+ /** Construction options for the WebGPU high-end GPU Scene and Clustered Forward+ pipeline. */
11407
+ interface ClusteredForwardPlusPipelineOptions {
10993
11408
  /**
10994
- * 获取header
10995
- * @param mesh -
10996
- * @param material -
10997
- * @param lightManager -
10998
- * @param fog -
11409
+ * GPU Scene bucket families. Compatible opaque and alpha-masked meshes match by identity;
11410
+ * other scene meshes remain renderable through the shared Forward compatibility path.
10999
11411
  */
11000
- static getHeader(mesh: Mesh, material: MaterialInstance, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, role?: MaterialPassRole): string;
11001
- private static getHeaderVariant;
11002
- private static trackHeaderVariantKey;
11003
- private static trackShaderVariant;
11004
- private static getCommonHeader;
11412
+ readonly buckets: readonly GPUSceneBucket[];
11005
11413
  /**
11006
- * 获取 shader
11007
- * @param mesh -
11008
- * @param material -
11009
- * @param isUseInstance -
11010
- * @param lightManager -
11011
- * @param fog -
11012
- * @param useLogDepth -
11013
- * @param renderer - Renderer precision provider used to build the portable shader preamble.
11014
- * @param linearOutput - Keep lighting in linear HDR space for floating-point scene targets.
11015
- * @param groundTruthAmbientOcclusion - Sample the pass-global GTAO visibility in PBR shading.
11414
+ * Stable fixed-bucket GPU Scene object capacity. Compatible excess PBR uses the direct native
11415
+ * clustered lane; unsupported content uses Forward compatibility. Defaults to 16,384.
11016
11416
  */
11017
- static getShader(mesh: Mesh, material: MaterialInstance, isUseInstance: boolean, lightManager: LightManager, fog: Fog | null, useLogDepth: boolean, renderer?: ShaderPrecisionProvider, linearOutput?: boolean, role?: MaterialPassRole, groundTruthAmbientOcclusion?: boolean): Shader | null;
11417
+ readonly maxObjects?: number;
11418
+ /** GPU light-database capacity. Extra traversal-order lights are deterministically dropped. */
11419
+ readonly maxLights?: number;
11420
+ /** Global cluster light-index budget. Defaults to 1,048,576 indices. */
11421
+ readonly maxLightIndices?: number;
11422
+ /** Per-cluster allocation ceiling. Defaults to 96. */
11423
+ readonly maxLightsPerCluster?: number;
11424
+ /** Cluster tile width and height in physical pixels. Defaults to 32. */
11425
+ readonly tileSize?: number;
11426
+ /** Logarithmic view-depth slice count. Defaults to 24. */
11427
+ readonly zSlices?: number;
11428
+ /** Largest supported physical output width. Defaults to 2560. */
11429
+ readonly maxViewportWidth?: number;
11430
+ /** Largest supported physical output height. Defaults to 1440. */
11431
+ readonly maxViewportHeight?: number;
11432
+ /** Enable previous-frame Hi-Z occlusion. Defaults to true. */
11433
+ readonly hiZ?: boolean;
11018
11434
  /**
11019
- * 获取基础 shader
11020
- * @param material -
11021
- * @param isUseInstance -
11022
- * @param header - 已生成的 shader 宏定义
11435
+ * GPU receiver-driven virtual directional shadows with arbitrary page-table remapping and
11436
+ * camera-centered clipmaps. Requires `hiZ`; disabled by default.
11023
11437
  */
11024
- static getBasicShader(material: MaterialInstance, isUseInstance: boolean, header: string, renderer?: ShaderPrecisionProvider, role?: MaterialPassRole): Shader;
11025
- private static getNumericId;
11438
+ readonly virtualShadows?: Readonly<VirtualShadowMapOptions> | false;
11439
+ /** Bloom contribution mixed into the final display transform. Defaults to 0.7. */
11440
+ readonly bloomStrength?: number;
11441
+ /** Exposure multiplier applied before the ACES display transform. Defaults to 1. */
11442
+ readonly exposure?: number;
11443
+ /** HDR display curve. Defaults to ACES; filmic preserves a softer storm-sky shoulder. */
11444
+ readonly toneMapping?: 'aces' | 'filmic';
11445
+ /** GPU luminance histogram and temporal eye adaptation. Disabled by default. */
11446
+ readonly autoExposure?: Readonly<AutoExposureOptions> | false;
11026
11447
  /**
11027
- * 获取自定义shader
11028
- * @param vs - 顶点代码
11029
- * @param fs - 片段代码
11030
- * @param cacheKey - 如果有,会以此值缓存 shader
11031
- * @param useHeaderCache - 是否使用 header-aware 缓存命名空间;实际 header 始终参与缓存键
11448
+ * Physical Rayleigh/Mie/ozone atmosphere, aerial perspective, procedural volumetric clouds,
11449
+ * and cloud shadows. Disabled by default.
11032
11450
  */
11033
- static getCustomShader(vs: string, fs: string, header?: string, cacheKey?: string, useHeaderCache?: boolean, renderer?: ShaderPrecisionProvider): Shader;
11034
- private static getRendererHeader;
11035
- private static assembleGLSL300;
11451
+ readonly atmosphere?: Readonly<AtmosphereWeatherOptions> | false;
11452
+ /** Integrated temporal AA/TAAU. Disabled by default; `false` explicitly disables it. */
11453
+ readonly temporalAA?: Readonly<TemporalAAOptions> | false;
11036
11454
  /**
11037
- * 是否始终使用
11455
+ * Integrated ground-truth ambient occlusion. Disabled by default. The GPU Scene path reuses
11456
+ * temporal motion data and therefore requires `temporalAA` when enabled.
11038
11457
  */
11039
- alwaysUse: boolean;
11458
+ readonly groundTruthAmbientOcclusion?: Readonly<GroundTruthAmbientOcclusionOptions> | false;
11040
11459
  /**
11041
- * @param params - 初始化参数,所有params都会复制到实例上
11460
+ * Temporally accumulated screen-space diffuse global illumination. Disabled by default.
11461
+ * The GPU Scene path reuses motion and material attributes and therefore requires `temporalAA`.
11042
11462
  */
11043
- constructor(params?: ShaderParameters);
11463
+ readonly screenSpaceGlobalIllumination?: Readonly<ScreenSpaceGlobalIlluminationOptions> | false;
11464
+ /** World-space dynamic diffuse GI with visibility-aware probes and software BVH tracing. WebGPU only; disabled by default. */
11465
+ readonly dynamicGlobalIllumination?: Readonly<DynamicGlobalIlluminationOptions> | false;
11044
11466
  /**
11045
- * 没有被引用时销毁资源
11046
- * @param renderer -
11047
- * @returns this
11467
+ * Hierarchical, temporally accumulated screen-space reflections. Disabled by default.
11468
+ * Enabling this production path requires both `hiZ` and `temporalAA`.
11048
11469
  */
11049
- destroyIfNoRef(renderer: ShaderRenderer): this;
11470
+ readonly screenSpaceReflections?: Readonly<ScreenSpaceReflectionsOptions> | false;
11050
11471
  /**
11051
- * 销毁资源
11052
- * @returns this
11472
+ * Camera-aligned froxel fog and volumetric local-light scattering. Disabled by default.
11473
+ * This WebGPU path uses the complete 3D cluster light grid and submission-aware history.
11053
11474
  */
11054
- destroy(): this;
11055
- }
11056
-
11057
- /** Immutable shader and binding configuration for a fullscreen pass instance. */
11058
- interface FullscreenRenderPassOptions {
11059
- /** Optional diagnostic pass name. */
11060
- readonly name?: string;
11061
- /** GLSL ES 3.00 shader with no vertex attributes. */
11062
- readonly shader: Shader;
11063
- /** Fixed raster, depth, blend, and culling state. */
11064
- readonly pipelineState: Readonly<MaterialPipelineState>;
11065
- /** std140 buffers in reflected uniform-block order. */
11066
- readonly uniformBuffers?: readonly UniformBuffer[];
11067
- }
11068
- /** Frame-scoped graph resources and dynamic state for one fullscreen draw. */
11069
- interface FullscreenRenderPassParameters {
11070
- /** Sampled textures in reflected sampler order; numeric depth uses nearest sampling. */
11071
- readonly inputTextures: readonly RenderGraphTextureAccessHandle[];
11072
- /** Color attachments in fragment-output location order. */
11073
- readonly colorAttachments: readonly Readonly<RenderPipelineColorAttachment>[];
11074
- /** Optional depth/stencil attachment. */
11075
- readonly depthStencilAttachment?: Readonly<RenderPipelineDepthStencilAttachment>;
11076
- /** Optional execution viewport in physical attachment pixels. */
11077
- readonly viewport?: RendererViewport;
11078
- /** Optional execution scissor in physical attachment pixels. */
11079
- readonly scissor?: RendererViewport;
11080
- /** Optional unsigned stencil reference. */
11081
- readonly stencilReference?: number;
11082
- }
11083
- /**
11084
- * Draws a `gl_VertexID` fullscreen triangle with graph textures resolved during prepare.
11085
- *
11086
- * The vertex shader must declare no vertex attributes. GLSL samplers and registered std140
11087
- * blocks are matched to the fixed arrays captured by this pass instance. Color inputs use the
11088
- * shared linear sampler; ordinary depth inputs are specialized to numeric depth and use the
11089
- * shared non-filtering sampler on both rendering backends.
11090
- */
11091
- declare class FullscreenRenderPass implements ScriptableRenderPass<FullscreenRenderPassParameters> {
11092
- /** Stable diagnostic pass name. */
11093
- readonly name: string;
11094
- /** Shader compiled through the shared GLSL-to-backend pipeline. */
11095
- readonly shader: Shader;
11096
- /** Fixed material state for the fullscreen triangle. */
11097
- readonly pipelineState: Readonly<MaterialPipelineState>;
11098
- /** Uniform buffers in reflected block order. */
11099
- readonly uniformBuffers: readonly UniformBuffer[];
11100
- constructor(options: Readonly<FullscreenRenderPassOptions>);
11101
- /** Declare sampled inputs and raster attachments. */
11102
- setup(builder: ScriptableRenderPassBuilder, parameters: FullscreenRenderPassParameters): void;
11103
- /** Apply optional dynamic state; the framework emits the prepared triangle afterward. */
11104
- execute(context: ScriptableRenderPassContext, parameters: FullscreenRenderPassParameters): void;
11105
- }
11106
- /** Fullscreen graph-texture present pass with one fixed linear sampler. */
11107
- declare class PresentRenderPass extends FullscreenRenderPass {
11108
- constructor(name?: string);
11109
- }
11110
-
11111
- /** Public vertex formats accepted by the portable RHI without exposing its namespace. */
11112
- type GPUDrivenVertexFormat = 'uint8x2' | 'uint8x4' | 'sint8x2' | 'sint8x4' | 'unorm8x2' | 'unorm8x4' | 'snorm8x2' | 'snorm8x4' | 'uint16x2' | 'uint16x4' | 'sint16x2' | 'sint16x4' | 'unorm16x2' | 'unorm16x4' | 'snorm16x2' | 'snorm16x4' | 'float16x2' | 'float16x4' | 'float32' | 'float32x2' | 'float32x3' | 'float32x4' | 'uint32' | 'uint32x2' | 'uint32x3' | 'uint32x4' | 'sint32' | 'sint32x2' | 'sint32x3' | 'sint32x4';
11113
- /** One attribute sourced from a graph vertex buffer. */
11114
- interface GPUDrivenVertexAttribute {
11115
- /** Vertex-shader input location. */
11116
- readonly shaderLocation: number;
11117
- /** Portable scalar or vector representation in the source buffer. */
11118
- readonly format: GPUDrivenVertexFormat;
11119
- /** Byte offset from the start of one vertex or instance element. */
11120
- readonly byteOffset: number;
11121
- }
11122
- /** Immutable layout for one graph vertex-buffer slot. */
11123
- interface GPUDrivenVertexBufferLayout {
11124
- /** Bytes between consecutive vertex or instance elements. */
11125
- readonly arrayStride: number;
11126
- /** Whether the buffer advances per vertex or per instance. */
11127
- readonly stepMode?: 'vertex' | 'instance';
11128
- /** Attributes sourced from this buffer slot. */
11129
- readonly attributes: readonly GPUDrivenVertexAttribute[];
11130
- }
11131
- /** Direct procedural draw or GPU-authored indirect argument source. */
11132
- type GPUDrivenDraw = Readonly<{
11133
- kind: 'draw';
11134
- vertexCount: number;
11135
- instanceCount?: number;
11136
- firstVertex?: number;
11137
- firstInstance?: number;
11138
- }> | Readonly<{
11139
- kind: 'draw-indirect';
11140
- buffer: RenderGraphBufferHandle;
11141
- byteOffset?: number;
11142
- }> | Readonly<{
11143
- kind: 'draw-indexed-indirect';
11144
- buffer: RenderGraphBufferHandle;
11145
- byteOffset?: number;
11146
- }>;
11147
- /** Fixed shader, raster state, and vertex-input ABI for one GPU-driven pass. */
11148
- interface GPUDrivenRenderPassOptions {
11149
- /** Optional diagnostic pass name. */
11150
- readonly name?: string;
11151
- /** WebGPU storage-aware GLSL ES 3.10 graphics shader. */
11152
- readonly shader: StorageGraphicsShader;
11153
- /** Raster/depth/blend state only; resource bindings come from pass parameters. */
11154
- readonly pipelineState: Readonly<MaterialPipelineState>;
11155
- /** Immutable positional vertex-buffer ABI; omit for vertex pulling. */
11156
- readonly vertexLayouts?: readonly GPUDrivenVertexBufferLayout[];
11157
- /** Index format required by indexed indirect draws. */
11158
- readonly indexFormat?: 'uint16' | 'uint32';
11159
- }
11160
- /** Frame-scoped graph resources consumed by one GPU-driven draw. */
11161
- interface GPUDrivenRenderPassParameters {
11162
- /** std140 resources in sorted uniform-buffer ABI order. */
11163
- readonly uniformBuffers?: readonly (UniformBuffer | UniformBufferRange)[];
11164
- /** Readonly storage resources in sorted storage-buffer ABI order. */
11165
- readonly buffers: readonly ComputeBufferBinding[];
11166
- /** Sampled graph textures in sorted sampled-texture ABI order. */
11167
- readonly textures?: readonly ComputeTextureBinding[];
11168
- /** Immutable samplers in sorted sampler ABI order. */
11169
- readonly samplers?: readonly ComputeSampler[];
11170
- /** Graph vertex buffers in the same order as `vertexLayouts`. */
11171
- readonly vertexBuffers?: readonly ComputeBufferBinding[];
11172
- /** Required only by `draw-indexed-indirect`. */
11173
- readonly indexBuffer?: ComputeBufferBinding;
11174
- /** Direct or GPU-authored indirect draw command. */
11175
- readonly draw: GPUDrivenDraw;
11176
- /** One or more color attachments matching continuous fragment output locations. */
11177
- readonly colorAttachments: readonly Readonly<RenderPipelineColorAttachment>[];
11178
- /** Optional depth/stencil attachment and load/store policy. */
11179
- readonly depthStencilAttachment?: Readonly<RenderPipelineDepthStencilAttachment>;
11180
- /** Optional dynamic viewport in physical attachment pixels. */
11181
- readonly viewport?: RendererViewport;
11182
- /** Optional dynamic scissor in physical attachment pixels. */
11183
- readonly scissor?: RendererViewport;
11184
- /** Optional unsigned dynamic stencil reference. */
11185
- readonly stencilReference?: number;
11186
- }
11187
- /**
11188
- * WebGPU-only storage-aware raster pass for vertex pulling and direct/indirect procedural draws.
11189
- *
11190
- * The pass derives graph access from the immutable shader ABI. It never reads indirect arguments
11191
- * on the CPU and never exposes native WebGPU objects.
11192
- */
11193
- declare class GPUDrivenRenderPass implements ScriptableRenderPass<GPUDrivenRenderPassParameters> {
11194
- /** Stable diagnostic pass name. */
11195
- readonly name: string;
11196
- /** Immutable storage-aware graphics shader. */
11197
- readonly shader: StorageGraphicsShader;
11198
- /** Material supplying raster, depth, stencil, and blend state. */
11199
- readonly pipelineState: Readonly<MaterialPipelineState>;
11200
- /** Snapshotted positional vertex-buffer ABI. */
11201
- readonly vertexLayouts: readonly Readonly<GPUDrivenVertexBufferLayout>[];
11202
- /** Index format for indexed indirect draws, when configured. */
11203
- readonly indexFormat: 'uint16' | 'uint32' | undefined;
11204
- constructor(options: Readonly<GPUDrivenRenderPassOptions>);
11205
- /** Declare shader resources, vertex/index/indirect inputs, and raster attachments. */
11206
- setup(builder: ScriptableRenderPassBuilder, parameters: GPUDrivenRenderPassParameters): void;
11207
- /** Apply optional dynamic state; the framework emits the prepared draw afterward. */
11208
- execute(context: ScriptableRenderPassContext, parameters: GPUDrivenRenderPassParameters): void;
11475
+ readonly volumetricLighting?: Readonly<VolumetricLightingOptions> | false;
11476
+ /** Optional bounded material/deformation topology manifest translated during async creation. */
11477
+ readonly variantManifest?: Readonly<ClusteredMaterialVariantManifest>;
11209
11478
  }
11210
-
11211
- /** Fixed pass-global bind group reserved by storage-aware scene variants. */
11212
- declare const SCENE_STORAGE_BIND_GROUP = 3;
11213
- /** One graph-buffer range bound to a readonly scene storage declaration. */
11214
- interface SceneStorageBufferBinding {
11215
- /** Setup-scoped graph buffer read by the raster shader. */
11216
- readonly buffer: RenderGraphBufferHandle;
11217
- /** Byte offset within the graph resource, defaulting to zero. */
11218
- readonly byteOffset?: number;
11219
- /** Bound byte length, defaulting to the remaining resource range. */
11220
- readonly byteLength?: number;
11479
+ /** On-demand GPU counters plus current CPU database occupancy. */
11480
+ interface ClusteredForwardPlusDiagnostics {
11481
+ /** Submitted probe work, scene coverage, and bounded resource use, or null when disabled. */
11482
+ readonly dynamicGlobalIllumination: Readonly<DynamicGlobalIlluminationDiagnostics> | null;
11483
+ /** Ordinary registered meshes currently occupying stable GPU Scene slots. */
11484
+ readonly objectCount: number;
11485
+ /** Visible-layer meshes routed through the shared Forward compatibility fallback. */
11486
+ readonly fallbackObjectCount: number;
11487
+ /** Alpha-blended PBR meshes shaded from the Clustered Forward+ light database. */
11488
+ readonly clusteredTransparentObjectCount: number;
11489
+ /** Non-bucket opaque PBR meshes using native clustered lighting with shared deformation. */
11490
+ readonly clusteredDeformedObjectCount: number;
11491
+ /** Enabled supported lights uploaded to the current GPU light database. */
11492
+ readonly lightCount: number;
11493
+ /** Enabled supported lights rejected by the configured light capacity. */
11494
+ readonly droppedLightCount: number;
11495
+ /** Objects written to a fixed visible bucket by the most recent submitted cull. */
11496
+ readonly visibleObjectCount: number;
11497
+ /** Objects rejected by conservative previous-frame Hi-Z occlusion. */
11498
+ readonly occludedObjectCount: number;
11499
+ /** Visible objects that selected a lower-detail geometry bucket. */
11500
+ readonly lodObjectCount: number;
11501
+ /** Light indices retained by the bounded cluster allocator. */
11502
+ readonly clusterLightIndexCount: number;
11503
+ /** Light-index entries truncated by per-cluster or global allocation limits. */
11504
+ readonly clusterOverflowCount: number;
11505
+ /** Whether conservative occlusion used a valid previous-frame Hi-Z pyramid. */
11506
+ readonly hiZValid: boolean;
11507
+ /** Current internal scene scale selected by fixed or dynamic temporal rendering. */
11508
+ readonly renderScale: number;
11509
+ /** Smoothed profiled Render Graph render/compute GPU time, or null before samples are ready. */
11510
+ readonly smoothedGPUFrameTimeMs: number | null;
11511
+ /** Number of camera-aligned froxels injected by the latest submitted volumetric frame. */
11512
+ readonly volumetricFroxelCount: number;
11513
+ /** Whether the latest submitted volumetric resolve consumed temporal history. */
11514
+ readonly volumetricHistoryUsed: boolean;
11515
+ /** Eight-by-eight SSR trace tiles containing at least one eligible receiver. */
11516
+ readonly screenSpaceReflectionActiveTileCount: number;
11517
+ /** Eligible SSR receiver pixels classified by the latest submitted frame. */
11518
+ readonly screenSpaceReflectionActivePixelCount: number;
11519
+ /** Eligible SSR receiver pixels that produced a valid screen-space hit. */
11520
+ readonly screenSpaceReflectionHitPixelCount: number;
11521
+ /** Eligible SSR receiver pixels that missed or left the screen. */
11522
+ readonly screenSpaceReflectionMissPixelCount: number;
11523
+ /** SSR misses whose hierarchy crossing could not be validated precisely. */
11524
+ readonly screenSpaceReflectionUncertainPixelCount: number;
11525
+ /** SSR candidates rejected because the hit surface faced away from the ray. */
11526
+ readonly screenSpaceReflectionBackfaceRejectedPixelCount: number;
11527
+ /** SSR temporal pixels that consumed valid surface- or hit-domain history. */
11528
+ readonly screenSpaceReflectionHistoryAcceptedPixelCount: number;
11529
+ /** SSR temporal pixels that rejected every available history candidate. */
11530
+ readonly screenSpaceReflectionHistoryRejectedPixelCount: number;
11531
+ /** Latest adapted exposure in EV stops, or zero when auto exposure is disabled. */
11532
+ readonly autoExposureEV: number;
11533
+ /** Latest histogram-derived target exposure in EV stops, or zero when disabled. */
11534
+ readonly autoExposureTargetEV: number;
11535
+ /** Unique manifest variants translated before renderer creation completed. */
11536
+ readonly warmedMaterialVariantCount: number;
11537
+ /** Unique native variants admitted by the configured runtime budget. */
11538
+ readonly activeMaterialVariantCount: number;
11539
+ /** Runtime candidates rejected after the unique variant budget was exhausted. */
11540
+ readonly materialVariantBudgetExceededCount: number;
11541
+ /** Configured unique clustered scene-variant ceiling. */
11542
+ readonly materialVariantBudget: number;
11543
+ /** CPU translation wall time spent in asynchronous warmup. */
11544
+ readonly materialVariantWarmupTimeMs: number;
11545
+ /** Latest on-demand virtual-shadow counters, or null when virtual shadows are disabled. */
11546
+ readonly virtualShadows: Readonly<VirtualShadowMapDiagnostics> | null;
11221
11547
  }
11222
11548
  /**
11223
- * WebGPU-only shader override for an ordinary renderer list.
11549
+ * WebGPU-only high-end factory combining G0 GPU Scene/Hi-Z and L0 Clustered Forward+.
11224
11550
  *
11225
- * The shader remains GLSL ES 3.10 compiled through the engine/Naga path and must place every
11226
- * readonly storage binding in {@link SCENE_STORAGE_BIND_GROUP}. Groups zero through two remain
11227
- * available to the existing pass/material/mesh uniform and sampled-resource ABI. This contract is
11228
- * explicit: it does not automatically rewrite built-in Basic/PBR shader source.
11551
+ * Compatible registered bucket meshes bypass CPU frustum sorting and ordinary PreparedDraw
11552
+ * creation. Fixed indirect buckets accept opaque, unskinned, indexed triangle PBR geometry;
11553
+ * eligible deformed, layered, and globally sorted transparent PBR meshes use the native direct
11554
+ * storage-lighting lane. Material surface evaluation and the BRDF are shared with ordinary Forward
11555
+ * PBR; clustered variants replace only light-list selection and iteration. Unregistered meshes,
11556
+ * runtime-incompatible state, mixed compatibility-transparent queues, and object-capacity overflow
11557
+ * use the shared Forward path in the same frame.
11558
+ * Invalid initial bucket declarations and unsupported devices still fail closed.
11229
11559
  */
11230
- interface SceneStorageShaderVariant {
11231
- /** Default storage-aware shader and the canonical pass-global storage ABI. */
11232
- readonly shader: StorageGraphicsShader;
11233
- /**
11234
- * Optional exact per-mesh variants applied without splitting the renderer list. This preserves
11235
- * global transparent sorting while allowing geometry/material topology to select its compiled
11236
- * shader. Every mapped shader must expose the same group-three readonly-storage ABI as
11237
- * the default shader.
11238
- */
11239
- readonly shaderByMesh?: ReadonlyMap<Mesh, StorageGraphicsShader>;
11240
- /** Positional ranges matching the shader's sorted readonly-storage binding order. */
11241
- readonly buffers: readonly Readonly<SceneStorageBufferBinding>[];
11560
+ declare class ClusteredForwardPlusPipelineFactory implements RenderPipelineFactory {
11561
+ #private;
11562
+ /** Stable diagnostic label for renderer initialization and graph tooling. */
11563
+ readonly name = "GPU Scene + Clustered Forward+";
11564
+ /** Shared temporal and GPU Scene state permits one perspective-camera call per frame. */
11565
+ readonly invocationPolicy: Readonly<RenderPipelineInvocationPolicy>;
11566
+ /** Fail-closed WebGPU capabilities, limits, and texture formats required by this profile. */
11567
+ readonly requirements: Readonly<RenderPipelineRequirements>;
11568
+ constructor(options: Readonly<ClusteredForwardPlusPipelineOptions>);
11569
+ /** Create one independent renderer-local GPU Scene and clustered-lighting runtime. */
11570
+ create(context: RenderPipelineCreateContext): Promise<RenderPipeline>;
11571
+ /** Set the diffuse GI contribution for all live runtimes without resetting probe convergence. */
11572
+ setDynamicGlobalIlluminationIntensity(intensity: number): void;
11573
+ /** Set linear sky radiance for probe misses and restart bounded convergence after a lighting change. */
11574
+ setDynamicGlobalIlluminationEnvironment(color: Readonly<Color>): void;
11575
+ /** Read on-demand GPU counters when this factory is attached to exactly one live Renderer. */
11576
+ readDiagnostics(): Promise<Readonly<ClusteredForwardPlusDiagnostics>>;
11242
11577
  }
11243
- /** Retained parameters consumed by {@link SceneRenderPass}. */
11244
- interface SceneRenderPassParameters {
11245
- /** One setup-declared renderer list prepared through the shared mesh draw processor. */
11246
- readonly rendererList: RendererListHandle;
11247
- /** Continuous color attachments in fragment-output location order. */
11248
- readonly colorAttachments: readonly Readonly<RenderPipelineColorAttachment>[];
11249
- /** Optional depth/stencil attachment shared by every draw in the list. */
11250
- readonly depthStencilAttachment?: Readonly<RenderPipelineDepthStencilAttachment>;
11251
- /** Optional execution viewport in physical attachment pixels. */
11252
- readonly viewport?: RendererViewport;
11253
- /** Optional execution scissor in physical attachment pixels. */
11254
- readonly scissor?: RendererViewport;
11255
- /** Optional unsigned stencil reference set before drawing the list. */
11256
- readonly stencilReference?: number;
11578
+
11579
+ /** Process-global symbol used by optional addons to attach renderer behavior across package copies. */
11580
+ declare const RENDER_NODE_EXTENSION: unique symbol;
11581
+ /** Portable graph work automatically recorded before transparent rendering by Forward. */
11582
+ interface RenderNodeRasterExtension {
11257
11583
  /**
11258
- * Opaque scene color sampled by transmission/volume materials in this pass. The graph keeps
11259
- * this input distinct from the active color attachment, preventing raster feedback.
11584
+ * Whether this view needs the contribution. Forward also checks node/ancestor visibility
11585
+ * and the node's camera layer. Return false when no prepass is needed to retain one scene pass.
11260
11586
  */
11261
- readonly opaqueTexture?: RenderGraphTextureAccessHandle;
11587
+ isVisible(camera: Camera): boolean;
11262
11588
  /**
11263
- * Screen-space ambient visibility sampled by built-in opaque PBR materials in this pass.
11264
- * This pass-global input is mutually exclusive with `opaqueTexture`; opaque shading
11265
- * consumes GTAO while later transmission shading consumes the captured opaque color.
11589
+ * Record portable graph passes using this invocation's shared camera and culling results.
11590
+ * Promise-like return values are rejected before RHI execution. The context cannot be retained.
11266
11591
  */
11267
- readonly ambientOcclusionTexture?: RenderGraphTextureAccessHandle;
11268
- /** Optional WebGPU-only storage-aware shader variant for the ordinary renderer-list path. */
11269
- readonly storageShaderVariant?: Readonly<SceneStorageShaderVariant>;
11270
- }
11271
- /**
11272
- * Stable scene pass backed by `SharedDrawPassParameters` and `MeshDrawProcessor`.
11273
- *
11274
- * The instance is reusable. Parameters remain caller-owned and must come from a
11275
- * {@link RenderPassParameterPool} when the pass is recorded every frame.
11276
- */
11277
- declare class SceneRenderPass implements ScriptableRenderPass<SceneRenderPassParameters> {
11278
- /** Stable diagnostic pass name. */
11279
- readonly name: string;
11280
- constructor(name?: string);
11281
- /** Declare attachments and the renderer list without issuing commands. */
11282
- setup(builder: ScriptableRenderPassBuilder, parameters: SceneRenderPassParameters): void;
11283
- /** Apply optional dynamic state and draw the setup-declared renderer list. */
11284
- execute(context: ScriptableRenderPassContext, parameters: SceneRenderPassParameters): void;
11285
- }
11286
-
11287
- /** Parameters consumed by {@link ShadowRenderPass}. */
11288
- interface ShadowRenderPassParameters {
11289
- /** Shared culling results whose lights and visible shadow casters populate the atlas. */
11290
- readonly cullingResults: CullingResultsHandle;
11291
- }
11292
- /**
11293
- * Records the renderer's shared shadow-atlas pass set.
11294
- *
11295
- * A shadow atlas can expand to several graph passes, so this primitive records directly through
11296
- * {@link RenderPipelineContext} instead of masquerading as one `ScriptableRenderPass` node.
11297
- */
11298
- declare class ShadowRenderPass {
11299
- /** Stable diagnostic name for shadow recording failures. */
11300
- readonly name: string;
11301
- constructor(name?: string);
11302
- /** Record all required atlas slices synchronously. */
11303
- record(context: RenderPipelineContext, parameters: Readonly<ShadowRenderPassParameters>): void;
11592
+ record(context: ForwardRenderFeatureContext): unknown;
11593
+ /** Commit once per application frame after all recorded views have submitted successfully. */
11594
+ frameSubmitted?(frameIndex: number): void;
11595
+ /** Roll back once per discarded application frame, including a failed record callback. */
11596
+ frameDiscarded?(frameIndex: number): void;
11304
11597
  }
11305
-
11306
- /** Full selected-subresource copy parameters. Views may have different parent descriptors. */
11307
- interface TextureCopyPassParameters {
11308
- /** Initialized single-sample copy source. */
11309
- readonly source: RenderGraphTextureAccessHandle;
11310
- /** Same-format, same-extent single-sample copy destination. */
11311
- readonly destination: RenderGraphTextureAccessHandle;
11598
+ /** GPU graph contribution owned by an optional scene-node addon. */
11599
+ interface RenderNodeGPUExtension {
11600
+ /** Whether this contribution has an opaque or alpha-masked phase. */
11601
+ readonly hasOpaqueRenderers: boolean;
11602
+ /** Whether simulation or raster needs the current sampled scene depth. */
11603
+ readonly requiresSampledDepth: boolean;
11604
+ /** Whether graph work must run even when the contribution is outside the camera. */
11605
+ readonly hasPendingWork: boolean;
11606
+ /** Test view visibility without issuing render commands. */
11607
+ isVisible(camera: Camera): boolean;
11608
+ /** Record one opaque or transparent contribution through the active Render Graph. */
11609
+ record(context: RenderPipelineContext, color: RenderGraphTextureHandle, depth: RenderGraphTextureHandle | null, drawVisible: boolean, phase: 'opaque' | 'transparent'): void;
11610
+ /** Commit staged state only after the enclosing frame submission succeeds. */
11611
+ frameSubmitted(frameIndex: number): void;
11612
+ /** Roll back staged state after recording or submission is discarded. */
11613
+ frameDiscarded(frameIndex: number): void;
11312
11614
  }
11313
- /** Portable full selected-subresource copy pass emitted through the selected RHI backend. */
11314
- declare class TextureCopyPass implements ScriptableRenderPass<TextureCopyPassParameters> {
11315
- /** Stable diagnostic pass name. */
11316
- readonly name: string;
11317
- constructor(name?: string);
11318
- /** Declare the copy source and destination. */
11319
- setup(builder: ScriptableRenderPassBuilder, parameters: TextureCopyPassParameters): void;
11320
- /** Emit one portable full-texture copy. */
11321
- execute(context: ScriptableRenderPassContext, parameters: TextureCopyPassParameters): void;
11615
+ /** Optional render lifecycle implemented by addon-owned scene nodes. */
11616
+ interface RenderNodeExtension {
11617
+ /** Allocate or recover renderer-local resources before node updates and graph recording. */
11618
+ prepareRenderer?(renderer: RendererContract): void;
11619
+ /** Refresh camera-dependent streams before scene collection. */
11620
+ prepareView?(camera: Camera): void;
11621
+ /** Active GPU contribution, or `null` when this node uses ordinary scene rendering only. */
11622
+ readonly gpu: RenderNodeGPUExtension | null;
11623
+ /** Portable Forward prepass contribution; omitted/null nodes require no raster bridge work. */
11624
+ readonly raster?: RenderNodeRasterExtension | null;
11322
11625
  }
11626
+ /** Read and validate an optional render-node extension without importing its addon package. */
11627
+ declare function getRenderNodeExtension(node: Node): RenderNodeExtension | null;
11323
11628
 
11324
11629
  /** Quality and shape controls for the HDR bloom pyramid. */
11325
11630
  interface BloomOptions {
@@ -11458,104 +11763,55 @@ declare class PostProcessRenderPipelineFactory implements RenderPipelineFactory
11458
11763
  #private;
11459
11764
  readonly name = "post-process-forward";
11460
11765
  readonly requirements: Readonly<RenderPipelineRequirements>;
11766
+ /** Camera and invocation contract inherited from the composed Forward factory. */
11767
+ readonly invocationPolicy: Readonly<RenderPipelineInvocationPolicy>;
11461
11768
  constructor(options?: Readonly<PostProcessRenderPipelineOptions>);
11462
11769
  create(context: RenderPipelineCreateContext): RenderPipeline;
11463
11770
  }
11464
11771
 
11465
- type CubeTextureImage = (TextureImageSource | null)[];
11466
- interface CubeTextureParameters extends Omit<TextureParameters<CubeTextureImage>, 'target'> {
11467
- image?: CubeTextureImage | null;
11772
+ /** Bounded dynamic reflection capture around an existing shared rendering pipeline. */
11773
+ interface ReflectionProbePipelineOptions {
11774
+ /** Distinct dynamic probes. At most eight are resident; materials bind a spatially relevant pair. */
11775
+ readonly probes: readonly ReflectionProbe[];
11776
+ /** Main view pipeline. Defaults to portable Forward. */
11777
+ readonly pipeline?: RenderPipelineFactory;
11778
+ /** Cube face size, a power of two in [16, 256]. Defaults to 128. */
11779
+ readonly resolution?: number;
11780
+ /** Roughness bands in [2, 8], bounded by log2(resolution) + 1. Defaults to five. */
11781
+ readonly roughnessLevels?: number;
11782
+ /** GGX importance samples per filtered pixel: 32, 64 or 128. Defaults to 64. */
11783
+ readonly filterSamples?: 32 | 64 | 128;
11784
+ /** Maximum scene faces recorded in one application frame, in [1, 6]. Defaults to one. */
11785
+ readonly facesPerFrame?: number;
11786
+ /** Maximum roughness bands recorded in one application frame, in [1, 8]. Defaults to one. */
11787
+ readonly filterLevelsPerFrame?: number;
11788
+ /** Hard byte budget for capture color/depth and double-buffered filtered radiance. Defaults to 64 MiB. */
11789
+ readonly maxResidentBytes?: number;
11790
+ /** Capture near plane. Defaults to 0.05 world units. */
11791
+ readonly near?: number;
11792
+ /** Capture far plane. Defaults to 100 world units. */
11793
+ readonly far?: number;
11794
+ /** Camera layer mask. Defaults to all layers. Local-probe receivers are excluded to avoid recursion. */
11795
+ readonly visibility?: number;
11468
11796
  }
11469
11797
  /**
11470
- * 立方体纹理
11471
- * @example
11472
- * ```ts
11473
- * const loadQueue = new Hilo3d.LoadQueue([{
11474
- * src: './textures/cube/right.jpg'
11475
- * }, {
11476
- * src: './textures/cube/left.jpg'
11477
- * }, {
11478
- * src: './textures/cube/top.jpg'
11479
- * }, {
11480
- * src: './textures/cube/bottom.jpg'
11481
- * }, {
11482
- * src: './textures/cube/front.jpg'
11483
- * }, {
11484
- * src: './textures/cube/back.jpg'
11485
- * }]).on('complete', function () {
11486
- * const result = loadQueue.getAllContent();
11487
- * const skyboxMap = new Hilo3d.CubeTexture({
11488
- * image: result
11489
- * });
11490
- * const skybox = new Hilo3d.Mesh({
11491
- * geometry: new Hilo3d.BoxGeometry(),
11492
- * material: new Hilo3d.BasicMaterial({
11493
- * lightType: 'NONE',
11494
- * diffuse: skyboxMap
11495
- * })
11496
- * });
11497
- * stage.addChild(skybox);
11498
- * });
11499
- * ```
11798
+ * Adds budgeted, atomic HDR reflection captures to Forward or Clustered rendering. Captures use
11799
+ * shared scene lists, shadows, graph passes and portable raster shaders. Call probe.requestUpdate()
11800
+ * after relevant scene/light changes. A capture spans frames and is not a simultaneous snapshot.
11500
11801
  */
11501
- declare class CubeTexture extends Texture<CubeTextureImage> {
11502
- isCubeTexture: boolean;
11503
- readonly className: string;
11504
- /**
11505
- * @param params - 初始化参数,所有params都会复制到实例上
11506
- * - `params.image`: 图片列表,共6张
11507
- */
11508
- constructor(params?: CubeTextureParameters);
11509
- private getImage;
11510
- private setImage;
11511
- /**
11512
- * 右侧的图片
11513
- */
11514
- get right(): HTMLImageElement | undefined;
11515
- /**
11516
- * 右侧的图片
11517
- */
11518
- set right(img: HTMLImageElement | undefined);
11519
- /**
11520
- * 左侧的图片
11521
- */
11522
- get left(): HTMLImageElement | undefined;
11523
- /**
11524
- * 左侧的图片
11525
- */
11526
- set left(img: HTMLImageElement | undefined);
11527
- /**
11528
- * 顶部的图片
11529
- */
11530
- get top(): HTMLImageElement | undefined;
11531
- /**
11532
- * 顶部的图片
11533
- */
11534
- set top(img: HTMLImageElement | undefined);
11535
- /**
11536
- * 底部的图片
11537
- */
11538
- get bottom(): HTMLImageElement | undefined;
11539
- /**
11540
- * 底部的图片
11541
- */
11542
- set bottom(img: HTMLImageElement | undefined);
11543
- /**
11544
- * 朝前的图片
11545
- */
11546
- get front(): HTMLImageElement | undefined;
11547
- /**
11548
- * 朝前的图片
11549
- */
11550
- set front(img: HTMLImageElement | undefined);
11551
- /**
11552
- * 朝后的图片
11553
- */
11554
- get back(): HTMLImageElement | undefined;
11555
- /**
11556
- * 朝后的图片
11557
- */
11558
- set back(img: HTMLImageElement | undefined);
11802
+ declare class ReflectionProbePipelineFactory implements RenderPipelineFactory {
11803
+ #private;
11804
+ /** Diagnostic name of the composed pipeline. */
11805
+ readonly name = "Local reflection probes";
11806
+ /** Wrapped requirements plus HDR capture formats and atlas dimensions. */
11807
+ readonly requirements: Readonly<RenderPipelineRequirements>;
11808
+ /** Main-view invocation limits inherited from the wrapped pipeline. */
11809
+ readonly invocationPolicy: Readonly<RenderPipelineInvocationPolicy>;
11810
+ /** Exact declared texture/depth bytes, excluding driver padding and the wrapped pipeline. */
11811
+ readonly residentBytes: number;
11812
+ constructor(options: Readonly<ReflectionProbePipelineOptions>);
11813
+ /** Create isolated capture resources; sharing one dynamic probe across live renderers fails. */
11814
+ create(context: RenderPipelineCreateContext): Promise<RenderPipeline>;
11559
11815
  }
11560
11816
 
11561
11817
  type CubeTextureLoadRequest = LoaderRequest & Partial<Omit<CubeTextureParameters, 'image' | 'type'>> & {
@@ -15020,6 +15276,6 @@ declare const math: {
15020
15276
  nextPowerOfTwo(value: number): number;
15021
15277
  };
15022
15278
 
15023
- export { AmbientLight, Animation, AnimationStates, AreaLight, AtmosphereWeatherState, AutoExposure, AxisHelper, AxisNetHelper, BUILTIN_UNIFORM_BLOCK_BINDING_COUNT, BasicLoader, BasicMaterial, Bloom, BoxGeometry, Cache, Camera, Camera2D, CameraHelper, ClusteredForwardPlusPipelineFactory, Color, ColorUber, ComputeKernel, ComputeRenderPass, ComputeSampler, ComputeShader, CubeTexture, CubeTextureLoader, DEFAULT_2D_LAYER, DEFAULT_MATERIAL_PIPELINE_STATE, DEFAULT_MATERIAL_TEXTURE_CHANNELS, DataTexture, DirectionalLight, Euler, EulerNotifier, EventDispatcher, Fog, ForwardRenderPipelineFactory, Frustum, FullscreenRenderPass, GLTFExtensions_d as GLTFExtensions, GLTFLoader, GLTFParser, GPUDrivenRenderPass, Geometry, GeometryData, GeometryMaterial, GroundTruthAmbientOcclusion, HDRLoader, HiloEvent, KTXLoader, LazyTexture, Light, LightManager, LoadCache, LoadQueue, LoadState, Loader, LogLevel, Logger, MATERIAL_TEXTURE_SLOT_COUNT, MaterialAttributeSemantic, MaterialBlendPreset, MaterialCompiler, MaterialDefinition, MaterialInstance, MaterialTextureSemantic, MaterialTextureSlot, MaterialUniformSemantic, Matrix3, Matrix4, Matrix4Notifier, Mesh, MeshPicker, MorphGeometry, Node, OrbitControls, OrthographicCamera, PBRMaterial, PBRMaterialBuilder, PerspectiveCamera, Plane, PlaneGeometry, PointLight, PostProcessRenderPipelineFactory, PresentRenderPass, Quaternion, QuaternionNotifier, RENDER_NODE_EXTENSION, Ray, RenderInfo, RenderPassParameterPool, Renderer, SCENE_STORAGE_BIND_GROUP, STAGE_SYSTEM_API_VERSION, STATE_TYPES, SceneRenderPass, ScreenSpaceGlobalIllumination, Shader, ShaderMaterial, ShaderMaterialLoader, ShadowRenderPass, Skeleton, SkinnedMesh, SlicedSprite, Sphere, SphereGeometry, SphericalHarmonics3, SpotLight, Sprite, SpriteFrame, SpriteMaterial, Stage, StageSystemRegistry, StageSystemService, Std140Layout, StorageGraphicsShader, StorageLayout, TRIANGLES, TemporalAA, Text2D, Texture, TextureCopyPass, TextureLoader, Ticker, Tween, UNIFORM_BLOCK_BINDINGS, UiButton, UniformBuffer, Vector2, Vector3, Vector3Notifier, Vector4, WebGLSupport, browser, collectionEntries, constants, createEmptyGLTFRoot, createStageSystemService, createStd140Layout, createStorageGraphicsShaderFromPortable, createStorageLayout, detectBrowserFeatures, detectWebGLSupport, Hilo as engineConstants, getCollectionItem, getRenderNodeExtension, getUniformBlockBinding, isArrayCollection, isGLTFRoot, log, math, parseRadianceHDR, registerUniformBlockBinding, resolveMaterialPassDefinition, resolveMaterialPassState, semantic, util_d as util, version, webgl2 as webgl2Constants, webgl as webglConstants, webglExtensions as webglExtensionConstants };
15024
- export type { AccessorArray, AmbientLightParameters, AnimationClip, AnimationInterpolationType, AnimationParameters, AnimationStateHandler, AnimationStateType, AnimationStatesParameters, AnimationTimeRange, AreaLightInfo, AreaLightParameters, AtmosphereWeatherDebugView, AtmosphereWeatherOptions, AtmosphereWeatherQuality, AutoExposureDiagnostics, AutoExposureMeteringMode, AutoExposureOptions, AxisAlignedBox, AxisHelperParameters, AxisNetHelperParameters, BackEaseObject, BasicLightType, BasicLoadRequest, BasicLoaderResource, BasicMaterialParameters, BasicResource, BasicResourceType, BloomOptions, Bounds, BoxGeometryParameters, BrowserFeatures, BuiltInAnimationStateType, BuiltInMaterialTextureSlotName, Camera2DParameters, CameraDepthMode, CameraHelperParameters, CameraParameters, ClusteredForwardPlusDiagnostics, ClusteredForwardPlusPipelineOptions, ClusteredMaterialVariantManifest, ClusteredMaterialVariantManifestEntry, ColorUberOptions, ComputeBufferBinding, ComputeDispatch, ComputeKernelDescriptor, ComputePipelineConstant, ComputeRenderPassParameters, ComputeSamplerAddressMode, ComputeSamplerDescriptor, ComputeSamplerFilterMode, ComputeShaderBinding, ComputeShaderDescriptor, ComputeStorageBufferAccess, ComputeStorageTextureFormat, ComputeStorageTextureViewDimension, ComputeTextureBinding, ComputeTextureSampleType, ComputeTextureViewDimension, ComputeUniformBufferBinding, CubeTextureImage, CubeTextureLoadRequest, CubeTextureParameters, CullingOptions, CullingResultsHandle, DataTextureParameters, DirectionalLightInfo, DirectionalLightParameters, DirectionalLightShadowOptions, DispatchEvent, DynamicResolutionDiagnostics, DynamicResolutionOptions, ElasticEaseObject, EulerOrder, EventListener, FogMode, FogParameters, ForwardRenderFeatureContext, ForwardRenderFeatureRequirements, ForwardRenderInjectionPoint, ForwardRenderPipelineFactoryOptions, ForwardRenderPipelineFeature, ForwardRenderPipelineFeatureRuntime, ForwardRenderPipelineResources, FullscreenRenderPassOptions, FullscreenRenderPassParameters, GLTFAccessor, GLTFAccessorResult, GLTFAccessorType, GLTFAnimation, GLTFAnimationChannel, GLTFAnimationClipsExtension, GLTFAnimationSampler, GLTFAnimationTarget, GLTFAnisotropyExtension, GLTFAsset, GLTFBoundingBoxExtension, GLTFBounds, GLTFBuffer, GLTFBufferView, GLTFBufferViewRuntime, GLTFCamera, GLTFClearcoatExtension, GLTFCollection, GLTFComponentType, GLTFExtensionHandler, GLTFExtensionHandlerRegistry, GLTFExtensionMap, GLTFExtensionMethodName, GLTFExtensionOptions, GLTFImage, GLTFIndex, GLTFIorExtension, GLTFIridescenceExtension, GLTFLoadRequest, GLTFMaterial, GLTFMaterialValue, GLTFMaterialsCommonExtension, GLTFMesh, GLTFModel, GLTFMorphTarget, GLTFNode, GLTFOrthographicCamera, GLTFPBRMetallicRoughness, GLTFPBRSpecularGlossinessExtension, GLTFParserParameters, GLTFPerspectiveCamera, GLTFPrimitive, GLTFProgram, GLTFProgressivePrimitiveState, GLTFProperty, GLTFPunctualLight, GLTFPunctualLightNodeExtension, GLTFPunctualLightsExtension, GLTFPunctualSpotLight, GLTFQuantizedAttributesExtension, GLTFResourceLoader, GLTFRoot, GLTFSampler, GLTFScene, GLTFShader, GLTFSkin, GLTFSparseAccessor, GLTFSparseIndices, GLTFSparseValues, GLTFTechnique, GLTFTechniqueBinding, GLTFTechniqueStates, GLTFTexture, GLTFTextureInfo, GLTFTextureTransformExtension, GLTFTransmissionExtension, GLTFVolumeExtension, GPUDrivenDraw, GPUDrivenRenderPassOptions, GPUDrivenRenderPassParameters, GPUDrivenVertexAttribute, GPUDrivenVertexBufferLayout, GPUDrivenVertexFormat, GPUSceneBucket, GPUSceneLOD, GeometryAttributeValue, GeometryComponentSize, GeometryDataComponentCallback, GeometryDataLike, GeometryDataParameters, GeometryDataTraverseCallback, GeometryMaterialParameters, GeometryParameters, GeometryVertexType, GroundTruthAmbientOcclusionNormalSource, GroundTruthAmbientOcclusionOptions, GroundTruthAmbientOcclusionQuality, HDRLoadRequest, ImageCrossOrigin, InstancedUniform, InterpolatedValue, InterpolationFunction, JsonPrimitive, JsonValue, KTXLoadRequest, KTXTextureOptions, LazyTextureParameters, LightGroupName, LightInfo, LightManagerParameters, LightParameters, LightShadowOptions, ListenerEntry, ListenerMap, LoadCacheFile, LoadQueueItem, LoadQueueSource, LoadStateValue, LoaderRequest, LoaderTextureOptions, LogLevelValue, MaterialAttributeSemanticName, MaterialBinding, MaterialBindingInfo, MaterialBindingMap, MaterialBlendComponent, MaterialBlendFactor, MaterialBlendOperation, MaterialBlendState, MaterialColorOrTextureInput, MaterialCompareFunction, MaterialCompileRequest, MaterialCompositing, MaterialCoverage, MaterialCullMode, MaterialDefinitionParameters, MaterialFamily, MaterialFragmentOutput, MaterialFrontFace, MaterialInstanceParameters, MaterialPassDefinition, MaterialPassFallback, MaterialPassRole, MaterialPipelineState, MaterialRenderingProfile, MaterialSemanticName, MaterialShaderModule, MaterialStencilFaceState, MaterialStencilOperation, MaterialStencilState, MaterialSurfaceDomain, MaterialTargetSignature, MaterialTexture, MaterialTextureChannel, MaterialTextureEncoding, MaterialTextureSemanticName, MaterialTextureSlotBinding, MaterialTextureSlotDefinition, MaterialTextureSlotInput, MaterialTextureValue, MaterialUniformSemanticName, MeshParameters, MeshPickerParameters, MorphGeometryParameters, MorphTargets, MutableArrayLike, MutableNumberArray, MutablePBRMaterialParameters, NetworkResourceType, NodeGetChildByCallback, NodeParameters, NodePointerEvent, NodeRaycastInfo, NodeTraverseCallback, NodeTraverseResult, NormalizedComputeWorkgroupSize, OrbitControlsOptions, OrthographicCameraParameters, PBRMaterialParameters, PBRMaterialTextureInput, PerspectiveCameraParameters, PhysicalAtmosphereOptions, PlaneGeometryParameters, Point2, Point3, PointLightInfo, PointLightParameters, PointLightShadowOptions, PointShadowCameraParameters, PostProcessRenderPipelineOptions, PreparedMaterialVariant, ProgramBindingInfo, RGPassTimestampKind, RadianceHDRImage, RayCamera, RayParameters, RenderColorEncoding, RenderGraphBufferHandle, RenderGraphBufferReadUse, RenderGraphBufferWriteUse, RenderGraphFramePlan, RenderGraphGPUTimelineStatus, RenderGraphPassHandle, RenderGraphPassTimelineSnapshot, RenderGraphResourceLifetimeSnapshot, RenderGraphTextureAccessHandle, RenderGraphTextureHandle, RenderGraphTextureViewHandle, RenderGraphTimelineSnapshot, RenderNodeExtension, RenderNodeGPUExtension, RenderPassParameterFactory, RenderPassParameterReset, RenderPipeline, RenderPipelineBufferDescriptor, RenderPipelineCapabilities, RenderPipelineCapabilityName, RenderPipelineColorAttachment, RenderPipelineColorFormat, RenderPipelineContext, RenderPipelineCreateContext, RenderPipelineDepthStencilAttachment, RenderPipelineExtent, RenderPipelineFactory, RenderPipelineHistoryTextureDescriptor, RenderPipelineHistoryTextureResources, RenderPipelineLimits, RenderPipelineOutput, RenderPipelineOutputColorAttachment, RenderPipelineOutputDepthStencilAttachment, RenderPipelineOutputResources, RenderPipelinePersistentTargetDescriptor, RenderPipelinePersistentTextureUsage, RenderPipelineRequirements, RenderPipelineShadowOptions, RenderPipelineShadowPageRegion, RenderPipelineShadowResources, RenderPipelineShadowSlice, RenderPipelineTargetResources, RenderPipelineTextureAspect, RenderPipelineTextureDescriptor, RenderPipelineTextureDimension, RenderPipelineTextureFormat, RenderPipelineTextureRequirement, RenderPipelineTextureUse, RenderPipelineTextureViewDescriptor, RenderPipelineTextureViewDimension, RenderTarget, RenderTargetColor, RenderTargetColorAttachmentOptions, RenderTargetColorAttachmentReadback, RenderTargetColorFormat, RenderTargetCompareFunction, RenderTargetDepthStencilAttachmentOptions, RenderTargetDepthStencilFormat, RenderTargetLoadOp, RenderTargetParameters, RenderTargetPresentationOptions, RenderTargetReadColorAttachmentOptions, RenderTargetSampleCount, RenderTargetSelectionOptions, RenderTargetStoreOp, RendererAdapterPowerPreference, RendererAutoOptions, RendererBackend, RendererCommonOptions, RendererContextPowerPreference, RendererContract, RendererCreateOptions, RendererExplicitOptions, RendererFeatureName, RendererFrame, RendererFrameCallback, RendererListDescriptor, RendererListHandle, RendererListQueue, RendererListSorting, RendererOptions, RendererOptionsMap, RendererRenderingProfile, RendererResourceDiagnostics, RendererResourceManager, RendererScene, RendererShadowUpdateMode, RendererSupportOptions, RendererViewport, RendererWebGL2Options, RendererWebGPUOptions, ResizableTextureImage, Resource, ResourceLoader, ResourceLoaderConstructor, ResourceRequestOptions, SceneRenderPassParameters, SceneStorageBufferBinding, SceneStorageShaderVariant, ScreenSpaceGlobalIlluminationOptions, ScreenSpaceReflectionsOptions, ScriptableRenderCommands, ScriptableRenderGraph, ScriptableRenderPass, ScriptableRenderPassBuilder, ScriptableRenderPassContext, ScriptableRenderPrepareContext, SemanticMaterial, SemanticMesh, SemanticRenderer, ShaderDefineValue, ShaderMaterialLoadRequest, ShaderMaterialParameters, ShaderMaterialRoleSource, ShaderMaterialTextureSlot, ShaderOptions, ShaderParameters, ShaderPrecision, ShaderPrecisionProvider, ShaderReadBinding, ShaderRenderer, ShaderTextureSampleType, ShaderTextureViewDimension, ShadowCameraParameters, ShadowCastingLightParameters, ShadowRenderPassParameters, Size, SkeletonParameters, SkinnedMeshParameters, SlicedSpriteInsets, SlicedSpriteParameters, SphereGeometryParameters, SpotLightCookie, SpotLightIESProfile, SpotLightInfo, SpotLightParameters, SpriteFrameParameters, SpriteFrameUpdateOptions, SpriteFramesUpdateOptions, SpriteMaterialParameters, SpriteParameters, StageBackend, StageBackendParameters, StageCommonParameters, StageParameters, StagePointerEvent, StageSystem, StageSystemDescriptor, StageSystemRuntime, StageSystemSetupContext, Std140ArrayValue, Std140FieldDefinition, Std140FieldLayout, Std140FieldValue, Std140MatrixType, Std140ScalarType, Std140Schema, Std140Type, Std140Value, Std140Values, Std140VectorType, StorageArrayDefinition, StorageBuffer, StorageBufferDescriptor, StorageBufferRange, StorageBufferReadback, StorageBufferRecoveryPolicy, StorageBufferUsage, StorageFieldLayout, StorageGraphicsShaderDescriptor, StorageMatrixType, StoragePrimitiveType, StoragePrimitiveValue, StorageScalarType, StorageSchema, StorageStructDefinition, StorageType, StorageValue, StorageValues, StorageVectorType, StorageWriteResult, SubDataUpdate, TemporalAAOptions, Text2DParameters, Text2DStyle, TextureBinding, TextureCompressionFormat, TextureCopyPassParameters, TextureCubeFace, TextureImageSource, TextureLoadRequest, TextureMipmap, TextureParameters, TexturePixelData, TextureSource, TextureSubImage, TextureUVChannel, TextureUpdateSnapshot, Tickable, ToneMappingMode, Triangle, TweenCompleteCallback, TweenEaseCollection, TweenEaseFunction, TweenEaseNoneObject, TweenEaseObject, TweenParameters, TweenProperties, TweenStartCallback, TweenUpdateCallback, TypedArray$1 as TypedArray, TypedArrayConstructor$1 as TypedArrayConstructor, UV, UiButtonFrames, UiButtonParameters, UiButtonState, UniformBufferDirtyRange, UniformBufferRange, VirtualShadowMapDiagnostics, VirtualShadowMapOptions, VolumetricBoxFogVolume, VolumetricCloudOptions, VolumetricFogVolume, VolumetricLightingDebugView, VolumetricLightingOptions, VolumetricLightingQuality, VolumetricSphereFogVolume, XYZObject };
15279
+ export { AmbientLight, Animation, AnimationBlendTree1D, AnimationClip, AnimationTrack, AreaLight, AtmosphereWeatherState, AutoExposure, AxisHelper, AxisNetHelper, BUILTIN_UNIFORM_BLOCK_BINDING_COUNT, BasicLoader, BasicMaterial, Bloom, BoxGeometry, Cache, Camera, Camera2D, CameraHelper, ClusteredForwardPlusPipelineFactory, Color, ColorUber, ComputeKernel, ComputeRenderPass, ComputeSampler, ComputeShader, CubeTexture, CubeTextureLoader, DEFAULT_2D_LAYER, DEFAULT_MATERIAL_PIPELINE_STATE, DEFAULT_MATERIAL_TEXTURE_CHANNELS, DataTexture, DirectionalLight, Euler, EulerNotifier, EventDispatcher, Fog, ForwardRenderPipelineFactory, Frustum, FullscreenRenderPass, GLTFExtensions_d as GLTFExtensions, GLTFLoader, GLTFParser, GPUDrivenRenderPass, Geometry, GeometryData, GeometryMaterial, GroundTruthAmbientOcclusion, HDRLoader, HiloEvent, KTXLoader, LazyTexture, Light, LightManager, LoadCache, LoadQueue, LoadState, Loader, LogLevel, Logger, MATERIAL_TEXTURE_SLOT_COUNT, MaterialAttributeSemantic, MaterialBlendPreset, MaterialCompiler, MaterialDefinition, MaterialInstance, MaterialTextureSemantic, MaterialTextureSlot, MaterialUniformSemantic, Matrix3, Matrix4, Matrix4Notifier, Mesh, MeshPicker, MorphGeometry, Node, OrbitControls, OrthographicCamera, PBRMaterial, PBRMaterialBuilder, PerspectiveCamera, Plane, PlaneGeometry, PointLight, PostProcessRenderPipelineFactory, PresentRenderPass, Quaternion, QuaternionNotifier, RENDER_NODE_EXTENSION, Ray, ReflectionProbe, ReflectionProbePipelineFactory, RenderInfo, RenderPassParameterPool, Renderer, SCENE_STORAGE_BIND_GROUP, STAGE_SYSTEM_API_VERSION, SceneRenderPass, ScreenSpaceGlobalIllumination, Shader, ShaderMaterial, ShaderMaterialLoader, ShadowRenderPass, Skeleton, SkinnedMesh, SlicedSprite, Sphere, SphereGeometry, SphericalHarmonics3, SpotLight, Sprite, SpriteFrame, SpriteMaterial, Stage, StageSystemRegistry, StageSystemService, Std140Layout, StorageGraphicsShader, StorageLayout, TRIANGLES, TemporalAA, Text2D, Texture, TextureCopyPass, TextureLoader, Ticker, Tween, UNIFORM_BLOCK_BINDINGS, UiButton, UniformBuffer, Vector2, Vector3, Vector3Notifier, Vector4, WebGLSupport, browser, collectionEntries, constants, createEmptyGLTFRoot, createStageSystemService, createStd140Layout, createStorageGraphicsShaderFromPortable, createStorageLayout, detectBrowserFeatures, detectWebGLSupport, Hilo as engineConstants, getCollectionItem, getRenderNodeExtension, getUniformBlockBinding, isArrayCollection, isGLTFRoot, log, math, parseRadianceHDR, registerUniformBlockBinding, resolveMaterialPassDefinition, resolveMaterialPassState, semantic, util_d as util, version, webgl2 as webgl2Constants, webgl as webglConstants, webglExtensions as webglExtensionConstants };
15280
+ export type { AccessorArray, AmbientLightParameters, AnimationBindingResolver, AnimationBlendSample, AnimationClipParameters, AnimationEvent, AnimationInterpolation, AnimationLayer, AnimationLayerParameters, AnimationMarker, AnimationMotion, AnimationParameters, AnimationPlayOptions, AnimationProperty, AnimationPropertyBinding, AnimationTrackParameters, AreaLightInfo, AreaLightParameters, AtmosphereWeatherDebugView, AtmosphereWeatherOptions, AtmosphereWeatherQuality, AutoExposureDiagnostics, AutoExposureMeteringMode, AutoExposureOptions, AxisAlignedBox, AxisHelperParameters, AxisNetHelperParameters, BackEaseObject, BasicLightType, BasicLoadRequest, BasicLoaderResource, BasicMaterialParameters, BasicResource, BasicResourceType, BloomOptions, Bounds, BoxGeometryParameters, BrowserFeatures, BuiltInMaterialTextureSlotName, Camera2DParameters, CameraDepthMode, CameraHelperParameters, CameraParameters, ClusteredForwardPlusDiagnostics, ClusteredForwardPlusPipelineOptions, ClusteredMaterialVariantManifest, ClusteredMaterialVariantManifestEntry, ColorUberOptions, ComputeBufferBinding, ComputeDispatch, ComputeKernelDescriptor, ComputePipelineConstant, ComputeRenderPassParameters, ComputeSamplerAddressMode, ComputeSamplerDescriptor, ComputeSamplerFilterMode, ComputeShaderBinding, ComputeShaderDescriptor, ComputeStorageBufferAccess, ComputeStorageTextureFormat, ComputeStorageTextureViewDimension, ComputeTextureBinding, ComputeTextureSampleType, ComputeTextureViewDimension, ComputeUniformBufferBinding, CubeTextureImage, CubeTextureLoadRequest, CubeTextureParameters, CullingOptions, CullingResultsHandle, DataTextureParameters, DirectionalLightInfo, DirectionalLightParameters, DirectionalLightShadowOptions, DispatchEvent, DynamicGlobalIlluminationDiagnostics, DynamicGlobalIlluminationOptions, DynamicResolutionDiagnostics, DynamicResolutionOptions, ElasticEaseObject, EulerOrder, EventListener, FogMode, FogParameters, ForwardRenderFeatureContext, ForwardRenderFeatureRequirements, ForwardRenderInjectionPoint, ForwardRenderPipelineFactoryOptions, ForwardRenderPipelineFeature, ForwardRenderPipelineFeatureRuntime, ForwardRenderPipelineResources, FullscreenRenderPassOptions, FullscreenRenderPassParameters, GLTFAccessor, GLTFAccessorResult, GLTFAccessorType, GLTFAnimation, GLTFAnimationChannel, GLTFAnimationClipsExtension, GLTFAnimationSampler, GLTFAnimationTarget, GLTFAnisotropyExtension, GLTFAsset, GLTFBoundingBoxExtension, GLTFBounds, GLTFBuffer, GLTFBufferView, GLTFBufferViewRuntime, GLTFCamera, GLTFClearcoatExtension, GLTFCollection, GLTFComponentType, GLTFExtensionHandler, GLTFExtensionHandlerRegistry, GLTFExtensionMap, GLTFExtensionMethodName, GLTFExtensionOptions, GLTFImage, GLTFIndex, GLTFIorExtension, GLTFIridescenceExtension, GLTFLoadRequest, GLTFMaterial, GLTFMaterialValue, GLTFMaterialsCommonExtension, GLTFMesh, GLTFModel, GLTFMorphTarget, GLTFNode, GLTFOrthographicCamera, GLTFPBRMetallicRoughness, GLTFPBRSpecularGlossinessExtension, GLTFParserParameters, GLTFPerspectiveCamera, GLTFPrimitive, GLTFProgram, GLTFProgressivePrimitiveState, GLTFProperty, GLTFPunctualLight, GLTFPunctualLightNodeExtension, GLTFPunctualLightsExtension, GLTFPunctualSpotLight, GLTFQuantizedAttributesExtension, GLTFResourceLoader, GLTFRoot, GLTFSampler, GLTFScene, GLTFShader, GLTFSkin, GLTFSparseAccessor, GLTFSparseIndices, GLTFSparseValues, GLTFTechnique, GLTFTechniqueBinding, GLTFTechniqueStates, GLTFTexture, GLTFTextureInfo, GLTFTextureTransformExtension, GLTFTransmissionExtension, GLTFVolumeExtension, GPUDrivenDraw, GPUDrivenRenderPassOptions, GPUDrivenRenderPassParameters, GPUDrivenVertexAttribute, GPUDrivenVertexBufferLayout, GPUDrivenVertexFormat, GPUSceneBucket, GPUSceneLOD, GeometryAttributeValue, GeometryComponentSize, GeometryDataComponentCallback, GeometryDataLike, GeometryDataParameters, GeometryDataTraverseCallback, GeometryMaterialParameters, GeometryParameters, GeometryVertexType, GroundTruthAmbientOcclusionNormalSource, GroundTruthAmbientOcclusionOptions, GroundTruthAmbientOcclusionQuality, HDRLoadRequest, ImageCrossOrigin, InstancedUniform, JsonPrimitive, JsonValue, KTXLoadRequest, KTXTextureOptions, LazyTextureParameters, LightGroupName, LightInfo, LightManagerParameters, LightParameters, LightShadowOptions, ListenerEntry, ListenerMap, LoadCacheFile, LoadQueueItem, LoadQueueSource, LoadStateValue, LoaderRequest, LoaderTextureOptions, LogLevelValue, MaterialAttributeSemanticName, MaterialBinding, MaterialBindingInfo, MaterialBindingMap, MaterialBlendComponent, MaterialBlendFactor, MaterialBlendOperation, MaterialBlendState, MaterialColorOrTextureInput, MaterialCompareFunction, MaterialCompileRequest, MaterialCompositing, MaterialCoverage, MaterialCullMode, MaterialDefinitionParameters, MaterialFamily, MaterialFragmentOutput, MaterialFrontFace, MaterialInstanceParameters, MaterialPassDefinition, MaterialPassFallback, MaterialPassRole, MaterialPipelineState, MaterialRenderingProfile, MaterialSemanticName, MaterialShaderModule, MaterialStencilFaceState, MaterialStencilOperation, MaterialStencilState, MaterialSurfaceDomain, MaterialTargetSignature, MaterialTexture, MaterialTextureChannel, MaterialTextureEncoding, MaterialTextureSemanticName, MaterialTextureSlotBinding, MaterialTextureSlotDefinition, MaterialTextureSlotInput, MaterialTextureValue, MaterialUniformSemanticName, MeshParameters, MeshPickerParameters, MorphGeometryParameters, MorphTargets, MutableArrayLike, MutableNumberArray, MutablePBRMaterialParameters, NetworkResourceType, NodeGetChildByCallback, NodeParameters, NodePointerEvent, NodeRaycastInfo, NodeTraverseCallback, NodeTraverseResult, NormalizedComputeWorkgroupSize, OrbitControlsOptions, OrderedRendererListDescriptor, OrthographicCameraParameters, PBRMaterialParameters, PBRMaterialTextureInput, PerspectiveCameraParameters, PhysicalAtmosphereOptions, PlaneGeometryParameters, Point2, Point3, PointLightInfo, PointLightParameters, PointLightShadowOptions, PointShadowCameraParameters, PostProcessRenderPipelineOptions, PreparedMaterialVariant, ProgramBindingInfo, RGPassTimestampKind, RadianceHDRImage, RayCamera, RayParameters, ReflectionProbeDiagnostics, ReflectionProbeOptions, ReflectionProbePipelineOptions, RenderColorEncoding, RenderGraphBufferHandle, RenderGraphBufferReadUse, RenderGraphBufferWriteUse, RenderGraphFramePlan, RenderGraphGPUTimelineStatus, RenderGraphPassHandle, RenderGraphPassTimelineSnapshot, RenderGraphResourceLifetimeSnapshot, RenderGraphTextureAccessHandle, RenderGraphTextureHandle, RenderGraphTextureViewHandle, RenderGraphTimelineSnapshot, RenderNodeExtension, RenderNodeGPUExtension, RenderNodeRasterExtension, RenderPassParameterFactory, RenderPassParameterReset, RenderPipeline, RenderPipelineBufferDescriptor, RenderPipelineCapabilities, RenderPipelineCapabilityName, RenderPipelineColorAttachment, RenderPipelineColorFormat, RenderPipelineContext, RenderPipelineCreateContext, RenderPipelineDepthStencilAttachment, RenderPipelineExtent, RenderPipelineFactory, RenderPipelineHistoryTextureDescriptor, RenderPipelineHistoryTextureResources, RenderPipelineInvocationPolicy, RenderPipelineLimits, RenderPipelineOutput, RenderPipelineOutputColorAttachment, RenderPipelineOutputDepthStencilAttachment, RenderPipelineOutputResources, RenderPipelinePersistentTargetDescriptor, RenderPipelinePersistentTextureUsage, RenderPipelineRequirements, RenderPipelineShadowOptions, RenderPipelineShadowPageRegion, RenderPipelineShadowResources, RenderPipelineShadowSlice, RenderPipelineTargetResources, RenderPipelineTextureAspect, RenderPipelineTextureDescriptor, RenderPipelineTextureDimension, RenderPipelineTextureFormat, RenderPipelineTextureRequirement, RenderPipelineTextureUse, RenderPipelineTextureViewDescriptor, RenderPipelineTextureViewDimension, RenderTarget, RenderTargetColor, RenderTargetColorAttachmentOptions, RenderTargetColorAttachmentReadback, RenderTargetColorFormat, RenderTargetCompareFunction, RenderTargetDepthStencilAttachmentOptions, RenderTargetDepthStencilFormat, RenderTargetLoadOp, RenderTargetParameters, RenderTargetPresentationOptions, RenderTargetReadColorAttachmentOptions, RenderTargetSampleCount, RenderTargetSelectionOptions, RenderTargetStoreOp, RendererAdapterPowerPreference, RendererAutoOptions, RendererBackend, RendererCommonOptions, RendererContextPowerPreference, RendererContract, RendererCreateOptions, RendererExplicitOptions, RendererFeatureName, RendererFrame, RendererFrameCallback, RendererListDescriptor, RendererListHandle, RendererListQueue, RendererListSorting, RendererOptions, RendererOptionsMap, RendererRenderingProfile, RendererResourceDiagnostics, RendererResourceManager, RendererScene, RendererShadowUpdateMode, RendererSupportOptions, RendererViewport, RendererWebGL2Options, RendererWebGPUOptions, ResizableTextureImage, Resource, ResourceLoader, ResourceLoaderConstructor, ResourceRequestOptions, SceneRenderPassParameters, SceneStorageBufferBinding, SceneStorageShaderVariant, ScreenSpaceGlobalIlluminationOptions, ScreenSpaceReflectionsOptions, ScriptableRenderCommands, ScriptableRenderGraph, ScriptableRenderPass, ScriptableRenderPassBuilder, ScriptableRenderPassContext, ScriptableRenderPrepareContext, SemanticMaterial, SemanticMesh, SemanticRenderer, ShaderDefineValue, ShaderMaterialLoadRequest, ShaderMaterialParameters, ShaderMaterialRoleSource, ShaderMaterialTextureSlot, ShaderOptions, ShaderParameters, ShaderPrecision, ShaderPrecisionProvider, ShaderReadBinding, ShaderRenderer, ShaderTextureSampleType, ShaderTextureViewDimension, ShadowCameraParameters, ShadowCastingLightParameters, ShadowRenderPassParameters, Size, SkeletonParameters, SkinnedMeshParameters, SlicedSpriteInsets, SlicedSpriteParameters, SphereGeometryParameters, SpotLightCookie, SpotLightIESProfile, SpotLightInfo, SpotLightParameters, SpriteFrameParameters, SpriteFrameUpdateOptions, SpriteFramesUpdateOptions, SpriteMaterialParameters, SpriteParameters, StageBackend, StageBackendParameters, StageCommonParameters, StageParameters, StagePointerEvent, StageSystem, StageSystemDescriptor, StageSystemRuntime, StageSystemSetupContext, Std140ArrayValue, Std140FieldDefinition, Std140FieldLayout, Std140FieldValue, Std140MatrixType, Std140ScalarType, Std140Schema, Std140Type, Std140Value, Std140Values, Std140VectorType, StorageArrayDefinition, StorageBuffer, StorageBufferDescriptor, StorageBufferRange, StorageBufferReadback, StorageBufferRecoveryPolicy, StorageBufferUsage, StorageFieldLayout, StorageGraphicsShaderDescriptor, StorageMatrixType, StoragePrimitiveType, StoragePrimitiveValue, StorageScalarType, StorageSchema, StorageStructDefinition, StorageType, StorageValue, StorageValues, StorageVectorType, StorageWriteResult, SubDataUpdate, TemporalAAOptions, Text2DParameters, Text2DStyle, TextureBinding, TextureCompressionFormat, TextureCopyPassParameters, TextureCubeFace, TextureImageSource, TextureLoadRequest, TextureMipmap, TextureParameters, TexturePixelData, TextureSource, TextureSubImage, TextureUVChannel, TextureUpdateSnapshot, Tickable, ToneMappingMode, Triangle, TweenCompleteCallback, TweenEaseCollection, TweenEaseFunction, TweenEaseNoneObject, TweenEaseObject, TweenParameters, TweenProperties, TweenStartCallback, TweenUpdateCallback, TypedArray$1 as TypedArray, TypedArrayConstructor$1 as TypedArrayConstructor, UV, UiButtonFrames, UiButtonParameters, UiButtonState, UniformBufferDirtyRange, UniformBufferRange, VirtualShadowMapDiagnostics, VirtualShadowMapOptions, VolumetricBoxFogVolume, VolumetricCloudOptions, VolumetricFogVolume, VolumetricLightingDebugView, VolumetricLightingOptions, VolumetricLightingQuality, VolumetricSphereFogVolume, XYZObject };
15025
15281
  //# sourceMappingURL=Hilo3d.d.ts.map