@zephyr3d/scene 0.9.6 → 0.9.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. package/dist/animation/joint_dynamics/controller.js +92 -32
  2. package/dist/animation/joint_dynamics/controller.js.map +1 -1
  3. package/dist/animation/joint_dynamics/convex_collider.js +320 -0
  4. package/dist/animation/joint_dynamics/convex_collider.js.map +1 -0
  5. package/dist/animation/joint_dynamics/joint_dynamics_system.js +57 -19
  6. package/dist/animation/joint_dynamics/joint_dynamics_system.js.map +1 -1
  7. package/dist/animation/joint_dynamics/solver.js +71 -27
  8. package/dist/animation/joint_dynamics/solver.js.map +1 -1
  9. package/dist/animation/joint_dynamics_modifier.js +21 -20
  10. package/dist/animation/joint_dynamics_modifier.js.map +1 -1
  11. package/dist/animation/skeleton.js +7 -10
  12. package/dist/animation/skeleton.js.map +1 -1
  13. package/dist/app/engine.js +134 -140
  14. package/dist/app/engine.js.map +1 -1
  15. package/dist/app/scriptregistry.js +47 -16
  16. package/dist/app/scriptregistry.js.map +1 -1
  17. package/dist/asset/assetmanager.js +3 -1
  18. package/dist/asset/assetmanager.js.map +1 -1
  19. package/dist/asset/model.js +346 -7
  20. package/dist/asset/model.js.map +1 -1
  21. package/dist/avatar/wardrobe.js +20 -16
  22. package/dist/avatar/wardrobe.js.map +1 -1
  23. package/dist/camera/camera.js +416 -210
  24. package/dist/camera/camera.js.map +1 -1
  25. package/dist/index.d.ts +1349 -621
  26. package/dist/index.js +6 -11
  27. package/dist/index.js.map +1 -1
  28. package/dist/material/blinn.js +1 -1
  29. package/dist/material/blinn.js.map +1 -1
  30. package/dist/material/lambert.js +1 -1
  31. package/dist/material/lambert.js.map +1 -1
  32. package/dist/material/material.js +23 -1
  33. package/dist/material/material.js.map +1 -1
  34. package/dist/material/meshmaterial.js +178 -23
  35. package/dist/material/meshmaterial.js.map +1 -1
  36. package/dist/material/mixins/albedocolor.js +4 -4
  37. package/dist/material/mixins/albedocolor.js.map +1 -1
  38. package/dist/material/mixins/lightmodel/blinnphong.js +2 -1
  39. package/dist/material/mixins/lightmodel/blinnphong.js.map +1 -1
  40. package/dist/material/mixins/lightmodel/lambert.js +2 -1
  41. package/dist/material/mixins/lightmodel/lambert.js.map +1 -1
  42. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js +63 -16
  43. package/dist/material/mixins/lightmodel/pbrblueprintmixin.js.map +1 -1
  44. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js +105 -32
  45. package/dist/material/mixins/lightmodel/pbrmetallicroughness.js.map +1 -1
  46. package/dist/material/mixins/lightmodel/pbrspecularglossness.js +16 -6
  47. package/dist/material/mixins/lightmodel/pbrspecularglossness.js.map +1 -1
  48. package/dist/material/mixins/lit.js +1 -1
  49. package/dist/material/mixins/lit.js.map +1 -1
  50. package/dist/material/mixins/pbr/common.js +276 -65
  51. package/dist/material/mixins/pbr/common.js.map +1 -1
  52. package/dist/material/mixins/texture.js +3 -3
  53. package/dist/material/mixins/texture.js.map +1 -1
  54. package/dist/material/mixins/vertexcolor.js +2 -2
  55. package/dist/material/mixins/vertexcolor.js.map +1 -1
  56. package/dist/material/mtoon.js +574 -0
  57. package/dist/material/mtoon.js.map +1 -0
  58. package/dist/material/pbrblueprint.js +499 -336
  59. package/dist/material/pbrblueprint.js.map +1 -1
  60. package/dist/material/pbrmr.js +118 -100
  61. package/dist/material/pbrmr.js.map +1 -1
  62. package/dist/material/pbrsg.js +1 -1
  63. package/dist/material/pbrsg.js.map +1 -1
  64. package/dist/material/shader/helper.js +324 -294
  65. package/dist/material/shader/helper.js.map +1 -1
  66. package/dist/material/subsurfaceprofile.js +812 -0
  67. package/dist/material/subsurfaceprofile.js.map +1 -0
  68. package/dist/material/unlit.js +1 -1
  69. package/dist/material/unlit.js.map +1 -1
  70. package/dist/posteffect/compositor.js +46 -11
  71. package/dist/posteffect/compositor.js.map +1 -1
  72. package/dist/posteffect/ssr.js +422 -96
  73. package/dist/posteffect/ssr.js.map +1 -1
  74. package/dist/posteffect/sss.js +1053 -0
  75. package/dist/posteffect/sss.js.map +1 -0
  76. package/dist/posteffect/taa.js +61 -60
  77. package/dist/posteffect/taa.js.map +1 -1
  78. package/dist/render/abuffer_oit.js +63 -12
  79. package/dist/render/abuffer_oit.js.map +1 -1
  80. package/dist/render/cluster_light.js +6 -5
  81. package/dist/render/cluster_light.js.map +1 -1
  82. package/dist/render/drawable.js +1 -5
  83. package/dist/render/drawable.js.map +1 -1
  84. package/dist/render/drawable_mixin.js +2 -1
  85. package/dist/render/drawable_mixin.js.map +1 -1
  86. package/dist/render/fbm_wavegenerator.js +2 -1
  87. package/dist/render/fbm_wavegenerator.js.map +1 -1
  88. package/dist/render/gerstner_wavegenerator.js +2 -1
  89. package/dist/render/gerstner_wavegenerator.js.map +1 -1
  90. package/dist/render/globalbindgroup_allocator.js +2 -1
  91. package/dist/render/globalbindgroup_allocator.js.map +1 -1
  92. package/dist/render/lightpass.js +110 -23
  93. package/dist/render/lightpass.js.map +1 -1
  94. package/dist/render/render_queue.js +51 -8
  95. package/dist/render/render_queue.js.map +1 -1
  96. package/dist/render/renderer.js +80 -66
  97. package/dist/render/renderer.js.map +1 -1
  98. package/dist/render/rendergraph/device_pool_allocator.js +8 -0
  99. package/dist/render/rendergraph/device_pool_allocator.js.map +1 -1
  100. package/dist/render/rendergraph/forward_plus_builder.js +481 -95
  101. package/dist/render/rendergraph/forward_plus_builder.js.map +1 -1
  102. package/dist/render/rendergraph/history_resource_manager.js +55 -0
  103. package/dist/render/rendergraph/history_resource_manager.js.map +1 -1
  104. package/dist/render/rendergraph/history_resources.js +3 -1
  105. package/dist/render/rendergraph/history_resources.js.map +1 -1
  106. package/dist/render/rendergraph/types.js.map +1 -1
  107. package/dist/render/renderpass.js +10 -4
  108. package/dist/render/renderpass.js.map +1 -1
  109. package/dist/render/sky.js +31 -1
  110. package/dist/render/sky.js.map +1 -1
  111. package/dist/render/weightedblended_oit.js +23 -5
  112. package/dist/render/weightedblended_oit.js.map +1 -1
  113. package/dist/scene/basesprite.js +4 -2
  114. package/dist/scene/basesprite.js.map +1 -1
  115. package/dist/scene/batchgroup.js +3 -1
  116. package/dist/scene/batchgroup.js.map +1 -1
  117. package/dist/scene/environment.js +11 -1
  118. package/dist/scene/environment.js.map +1 -1
  119. package/dist/scene/light.js +21 -3
  120. package/dist/scene/light.js.map +1 -1
  121. package/dist/scene/mesh.js +29 -14
  122. package/dist/scene/mesh.js.map +1 -1
  123. package/dist/scene/meshdrawable.js +6 -0
  124. package/dist/scene/meshdrawable.js.map +1 -1
  125. package/dist/scene/msdftext.js +5 -2
  126. package/dist/scene/msdftext.js.map +1 -1
  127. package/dist/scene/msdftextsprite.js +5 -3
  128. package/dist/scene/msdftextsprite.js.map +1 -1
  129. package/dist/scene/particlesys.js +3 -1
  130. package/dist/scene/particlesys.js.map +1 -1
  131. package/dist/scene/scene.js +6 -5
  132. package/dist/scene/scene.js.map +1 -1
  133. package/dist/scene/terrain-cm/grass.js +4 -2
  134. package/dist/scene/terrain-cm/grass.js.map +1 -1
  135. package/dist/scene/terrain-cm/grassmaterial.js +2 -1
  136. package/dist/scene/terrain-cm/grassmaterial.js.map +1 -1
  137. package/dist/scene/terrain-cm/terrain-cm.js +4 -2
  138. package/dist/scene/terrain-cm/terrain-cm.js.map +1 -1
  139. package/dist/scene/water.js +4 -2
  140. package/dist/scene/water.js.map +1 -1
  141. package/dist/shaders/shadow.js +26 -393
  142. package/dist/shaders/shadow.js.map +1 -1
  143. package/dist/shadow/esm.js +112 -12
  144. package/dist/shadow/esm.js.map +1 -1
  145. package/dist/shadow/pcf_opt.js +2 -2
  146. package/dist/shadow/pcf_opt.js.map +1 -1
  147. package/dist/shadow/pcf_pd.js +19 -10
  148. package/dist/shadow/pcf_pd.js.map +1 -1
  149. package/dist/shadow/shader.js +58 -7
  150. package/dist/shadow/shader.js.map +1 -1
  151. package/dist/shadow/shadow_impl.js +6 -0
  152. package/dist/shadow/shadow_impl.js.map +1 -1
  153. package/dist/shadow/shadow_region.js +229 -0
  154. package/dist/shadow/shadow_region.js.map +1 -0
  155. package/dist/shadow/shadowmapper.js +67 -59
  156. package/dist/shadow/shadowmapper.js.map +1 -1
  157. package/dist/shadow/vsm.js +45 -19
  158. package/dist/shadow/vsm.js.map +1 -1
  159. package/dist/utility/blueprint/common/constants.js +8 -8
  160. package/dist/utility/blueprint/common/constants.js.map +1 -1
  161. package/dist/utility/blueprint/material/pbr.js +31 -4
  162. package/dist/utility/blueprint/material/pbr.js.map +1 -1
  163. package/dist/utility/blueprint/material/texture.js +1 -17
  164. package/dist/utility/blueprint/material/texture.js.map +1 -1
  165. package/dist/utility/serialization/manager.js +327 -359
  166. package/dist/utility/serialization/manager.js.map +1 -1
  167. package/dist/utility/serialization/scene/animation.js +5 -2
  168. package/dist/utility/serialization/scene/animation.js.map +1 -1
  169. package/dist/utility/serialization/scene/batch.js +4 -1
  170. package/dist/utility/serialization/scene/batch.js.map +1 -1
  171. package/dist/utility/serialization/scene/camera.js +249 -54
  172. package/dist/utility/serialization/scene/camera.js.map +1 -1
  173. package/dist/utility/serialization/scene/common.js +37 -1
  174. package/dist/utility/serialization/scene/common.js.map +1 -1
  175. package/dist/utility/serialization/scene/light.js +42 -3
  176. package/dist/utility/serialization/scene/light.js.map +1 -1
  177. package/dist/utility/serialization/scene/material.js +1112 -646
  178. package/dist/utility/serialization/scene/material.js.map +1 -1
  179. package/dist/utility/serialization/scene/mesh.js +7 -4
  180. package/dist/utility/serialization/scene/mesh.js.map +1 -1
  181. package/dist/utility/serialization/scene/node.js +31 -12
  182. package/dist/utility/serialization/scene/node.js.map +1 -1
  183. package/dist/utility/serialization/scene/particle.js +4 -1
  184. package/dist/utility/serialization/scene/particle.js.map +1 -1
  185. package/dist/utility/serialization/scene/primitive.js +3 -1
  186. package/dist/utility/serialization/scene/primitive.js.map +1 -1
  187. package/dist/utility/serialization/scene/scene.js +18 -0
  188. package/dist/utility/serialization/scene/scene.js.map +1 -1
  189. package/dist/utility/serialization/scene/sprite.js +6 -3
  190. package/dist/utility/serialization/scene/sprite.js.map +1 -1
  191. package/dist/utility/serialization/scene/terrain.js +5 -2
  192. package/dist/utility/serialization/scene/terrain.js.map +1 -1
  193. package/dist/utility/serialization/scene/text.js +3 -1
  194. package/dist/utility/serialization/scene/text.js.map +1 -1
  195. package/dist/utility/serialization/scene/water.js +4 -1
  196. package/dist/utility/serialization/scene/water.js.map +1 -1
  197. package/dist/utility/textures/ltcdata.js +6 -0
  198. package/dist/utility/textures/ltcdata.js.map +1 -0
  199. package/dist/utility/textures/ltclut.js +61 -0
  200. package/dist/utility/textures/ltclut.js.map +1 -0
  201. package/dist/values.js +9 -1
  202. package/dist/values.js.map +1 -1
  203. package/package.json +3 -3
package/dist/index.d.ts CHANGED
@@ -2,7 +2,6 @@ import * as _zephyr3d_device from '@zephyr3d/device';
2
2
  import { TextureCube, FrameBuffer, Texture2D, GPUDataBuffer, PrimitiveType, TextureSampler, BindGroupLayout, ProgramBuilder, PBInsideFunctionScope, PBShaderExp, PBGlobalScope, VertexSemantic, StructuredBuffer, VertexAttribFormat, VertexStepMode, IndexBuffer, BindGroup, GPUProgram, RenderStateSet, FaceMode, PBFunctionScope, Texture2DArray, BaseTexture, ShaderTypeFunc, TextureFormat, AbstractDevice, ColorState, TextureAddressMode, TextureFilterMode, SamplerOptions, TextureAtlasManager, DeviceBackend } from '@zephyr3d/device';
3
3
  import * as _zephyr3d_base from '@zephyr3d/base';
4
4
  import { Disposable, TypedArray, Ray, AABB, Matrix4x4, Plane, Frustum, Vector3, Nullable, GenericConstructor, RequireOptionals, Immutable, Vector4, Clonable, IDisposable, Vector2, IEventTarget, Observable, DRef, Rect, CubeFace, Quaternion, Interpolator, InterpolationMode, InterpolatorScalar, DeepPartial, VFS, HttpRequest, WriteOptions, ReadOptions, DeepRequireOptionals } from '@zephyr3d/base';
5
- import { DecoderModule, Metadata as Metadata$1 } from 'draco3d';
6
5
 
7
6
  type DistributionType = 'lambertian' | 'ggx' | 'charlie';
8
7
  /**
@@ -218,8 +217,8 @@ declare class BoundingBox extends AABB implements BoundingVolume {
218
217
  * Metadata interface for storing additional information
219
218
  * @public
220
219
  */
221
- interface Metadata {
222
- [key: string]: string | number | boolean | null | Metadata | Array<string | number | boolean | null | undefined | Metadata>;
220
+ interface Metadata$1 {
221
+ [key: string]: string | number | boolean | null | Metadata$1 | Array<string | number | boolean | null | undefined | Metadata$1>;
223
222
  }
224
223
  /**
225
224
  * Sampler types
@@ -527,6 +526,83 @@ type SerializableClass = {
527
526
  getProps: () => PropertyAccessor<any>[];
528
527
  };
529
528
 
529
+ /**
530
+ * Maintains the world-space region used by directional light shadow maps.
531
+ *
532
+ * @public
533
+ */
534
+ declare class ShadowRegion extends Disposable {
535
+ /**
536
+ * Creates a shadow region.
537
+ *
538
+ * @param region - Optional manual world-space AABB used to initialize the region.
539
+ */
540
+ constructor(region?: Nullable<AABB>);
541
+ /**
542
+ * Final world-space shadow region.
543
+ *
544
+ * @returns The union of the manual, static caster, and dynamic caster regions, or `null` if no valid region exists.
545
+ */
546
+ get region(): Nullable<AABB>;
547
+ /**
548
+ * Region contributed by manually assigned AABB.
549
+ *
550
+ * @returns The manually assigned region, or `null` if no manual region is set.
551
+ */
552
+ get manualRegion(): Nullable<AABB>;
553
+ /**
554
+ * Region contributed by static shadow casters.
555
+ *
556
+ * @returns The combined static caster region, or `null` if no valid static caster region exists.
557
+ */
558
+ get staticRegion(): Nullable<AABB>;
559
+ /**
560
+ * Region contributed by dynamic shadow casters.
561
+ *
562
+ * @returns The combined dynamic caster region, or `null` if no valid dynamic caster region exists.
563
+ */
564
+ get dynamicRegion(): Nullable<AABB>;
565
+ /**
566
+ * Assigns a manual world-space AABB to the region.
567
+ *
568
+ * @param region - The manual world-space AABB to use, or `null` to clear the manual region.
569
+ */
570
+ setRegion(region: Nullable<AABB>): void;
571
+ /**
572
+ * Adds a static shadow caster using a snapshot of its current world-space AABB.
573
+ *
574
+ * @param caster - The mesh or clipmap terrain node to include as a static caster.
575
+ * @returns `this` for chaining.
576
+ */
577
+ addStaticCaster(caster: SceneNode): this;
578
+ /**
579
+ * Adds a dynamic shadow caster and tracks its bounding volume changes.
580
+ *
581
+ * @param caster - The mesh or clipmap terrain node to include as a dynamic caster.
582
+ * @returns `this` for chaining.
583
+ */
584
+ addDynamicCaster(caster: SceneNode): this;
585
+ /**
586
+ * Removes a previously added shadow caster.
587
+ *
588
+ * @param caster - The caster node to remove from the static or dynamic caster list.
589
+ * @returns `this` for chaining.
590
+ */
591
+ removeCaster(caster: SceneNode): this;
592
+ /**
593
+ * Removes all shadow casters while keeping the manual region.
594
+ */
595
+ clearCasters(): void;
596
+ /**
597
+ * Clears the manual region and all shadow casters.
598
+ *
599
+ * @returns `this` for chaining.
600
+ */
601
+ clear(): this;
602
+ /** {@inheritDoc Disposable.onDispose} */
603
+ protected onDispose(): void;
604
+ }
605
+
530
606
  /**
531
607
  * Shadow mapping mode
532
608
  * @public
@@ -542,21 +618,19 @@ type ShadowQualityPreset = 'character-small' | 'outdoor-large';
542
618
  * The shadow map generator
543
619
  * @public
544
620
  */
545
- declare class ShadowMapper {
621
+ declare class ShadowMapper extends Disposable {
546
622
  /**
547
623
  * Creates an instance of ShadowMapper
548
624
  * @param light - The light that is used to generate shadow map
549
625
  */
550
626
  constructor(light: PunctualLight);
551
- copyFrom(other: ShadowMapper): void;
552
627
  /** The light that is used to generate shadow map */
553
628
  get light(): PunctualLight;
554
629
  /** Size of the shadow map */
555
630
  get shadowMapSize(): number;
556
631
  set shadowMapSize(num: number);
557
632
  /** Shadow region for directional light */
558
- get shadowRegion(): Nullable<AABB>;
559
- set shadowRegion(region: Nullable<AABB>);
633
+ get shadowRegion(): ShadowRegion;
560
634
  /** Maximum distance from the camera, shadow will not be rendered beyond this range */
561
635
  get shadowDistance(): number;
562
636
  set shadowDistance(val: number);
@@ -575,6 +649,9 @@ declare class ShadowMapper {
575
649
  /** Near clip plane */
576
650
  get nearClip(): number;
577
651
  set nearClip(val: number);
652
+ /** Shadow strength, 0 means no shadowing and 1 means full shadowing */
653
+ get shadowStrength(): number;
654
+ set shadowStrength(val: number);
578
655
  /** Shadow map mode */
579
656
  get mode(): ShadowMode;
580
657
  set mode(mode: ShadowMode);
@@ -606,6 +683,9 @@ declare class ShadowMapper {
606
683
  /** Whether to enable ESM blur */
607
684
  get esmBlur(): boolean;
608
685
  set esmBlur(val: boolean);
686
+ /** Whether to enable log space ESM blur */
687
+ get esmLogSpace(): boolean;
688
+ set esmLogSpace(val: boolean);
609
689
  /** Kernel size for ESM */
610
690
  get esmBlurKernelSize(): number;
611
691
  set esmBlurKernelSize(val: number);
@@ -615,6 +695,8 @@ declare class ShadowMapper {
615
695
  /** Depth scale for ESM */
616
696
  get esmDepthScale(): number;
617
697
  set esmDepthScale(val: number);
698
+ /** {@inheritDoc Disposable.onDispose} */
699
+ protected onDispose(): void;
618
700
  }
619
701
 
620
702
  /**
@@ -727,6 +809,8 @@ declare class PunctualLight extends BaseLight {
727
809
  * @override
728
810
  */
729
811
  isPunctualLight(): this is PunctualLight;
812
+ /** Disposes the punctual light node */
813
+ protected onDispose(): void;
730
814
  }
731
815
  /**
732
816
  * Directional light
@@ -1031,6 +1115,16 @@ declare class ShaderHelper {
1031
1115
  * @returns The uniform variable of which presents the strength of the environment light
1032
1116
  */
1033
1117
  static getEnvLightStrength(scope: PBInsideFunctionScope): PBShaderExp;
1118
+ /**
1119
+ * Gets the uniform variable of type float which holds the specular strength of the environment light
1120
+ *
1121
+ * @remarks
1122
+ * This function can only be used in the fragment shader
1123
+ *
1124
+ * @param scope - Current shader scope
1125
+ * @returns The uniform variable which presents the specular strength of the environment light
1126
+ */
1127
+ static getEnvLightSpecularStrength(scope: PBInsideFunctionScope): PBShaderExp;
1034
1128
  /**
1035
1129
  * Gets current scene color texture
1036
1130
  * @param scope - Current shader scope
@@ -1291,7 +1385,6 @@ declare class ShaderHelper {
1291
1385
  * @returns The transformed color
1292
1386
  */
1293
1387
  static encodeColorOutput(scope: PBInsideFunctionScope, outputColor: PBShaderExp): PBShaderExp;
1294
- static getMaxClusteredLightCount(): 255 | 127;
1295
1388
  }
1296
1389
 
1297
1390
  declare const Primitive_base: (new (...args: any[]) => {
@@ -1934,6 +2027,7 @@ type InstanceUniformType = 'float' | 'vec2' | 'vec3' | 'vec4' | 'rgb' | 'rgba';
1934
2027
  * @public
1935
2028
  */
1936
2029
  declare class MeshMaterial extends Material implements Clonable<MeshMaterial> {
2030
+ private static readonly SHADER_VERSION;
1937
2031
  /**
1938
2032
  * Create a MeshMaterial with default opaque settings.
1939
2033
  *
@@ -1957,6 +2051,17 @@ declare class MeshMaterial extends Material implements Clonable<MeshMaterial> {
1957
2051
  * @param other - Source material.
1958
2052
  */
1959
2053
  copyFrom(other: this): void;
2054
+ /**
2055
+ * Capture the active draw context for both cached and freshly-built program paths.
2056
+ *
2057
+ * The shader-building hooks access `this.drawContext`, but uniform application may also
2058
+ * consult it on subsequent frames when the GPU program is reused from cache. Updating it
2059
+ * here keeps material mixins in sync even when `createProgram()` is skipped.
2060
+ *
2061
+ * @param ctx - Current draw context.
2062
+ * @returns Whether material preparation succeeded.
2063
+ */
2064
+ apply(ctx: DrawContext): boolean;
1960
2065
  /**
1961
2066
  * Mark uniform-only changes so uniforms are re-uploaded on next apply, without
1962
2067
  * rebuilding shader programs.
@@ -2068,6 +2173,18 @@ declare class MeshMaterial extends Material implements Clonable<MeshMaterial> {
2068
2173
  */
2069
2174
  get blendMode(): BlendMode;
2070
2175
  set blendMode(val: BlendMode);
2176
+ /**
2177
+ * Whether transparent visible materials cast shadow through a masked shadow-only path.
2178
+ * - Visible rendering stays blended.
2179
+ * - Shadow-map rendering is treated like a cutout material using `shadowAlphaCutoff`.
2180
+ */
2181
+ get transparentShadowCaster(): boolean;
2182
+ set transparentShadowCaster(val: boolean);
2183
+ /**
2184
+ * Alpha cutoff used by the shadow-only masked caster path.
2185
+ */
2186
+ get shadowAlphaCutoff(): number;
2187
+ set shadowAlphaCutoff(val: number);
2071
2188
  /**
2072
2189
  * Face culling mode: 'none' | 'front' | 'back'.
2073
2190
  * - Does not force shader rebuild; affects rasterizer state.
@@ -2093,6 +2210,33 @@ declare class MeshMaterial extends Material implements Clonable<MeshMaterial> {
2093
2210
  * @returns True if lighting affects this material; otherwise false.
2094
2211
  */
2095
2212
  supportLighting(): boolean;
2213
+ /**
2214
+ * Returns the effective blend mode for the current pass.
2215
+ * Transparent-shadow-caster materials stay blended in visible passes, but become masked in shadow passes.
2216
+ */
2217
+ protected getEffectiveBlendMode(pass: number, ctx?: DrawContext): BlendMode;
2218
+ /**
2219
+ * Returns the alpha cutoff that should be used for the current pass.
2220
+ */
2221
+ protected getActiveAlphaCutoff(ctx?: DrawContext, pass?: number): number;
2222
+ /**
2223
+ * Whether the current pass should use the shadow-only masked caster path.
2224
+ */
2225
+ useTransparentShadowCaster(ctx?: DrawContext, _pass?: number): boolean;
2226
+ /**
2227
+ * Whether the specified render pass type should reinterpret this transparent material as a masked shadow caster.
2228
+ */
2229
+ useTransparentShadowCasterForPass(renderPassType?: number): boolean;
2230
+ /**
2231
+ * Whether this pass needs an alpha-cutoff uniform bound.
2232
+ */
2233
+ protected usesAlphaCutoff(ctx?: DrawContext, pass?: number): boolean;
2234
+ /**
2235
+ * Whether this pass needs fragment color inputs.
2236
+ * This stays aligned with the historical meaning of `needFragmentColor`,
2237
+ * but also allows shadow-only transparent casters to fetch alpha sources.
2238
+ */
2239
+ needFragmentColorInput(ctx?: DrawContext): boolean;
2096
2240
  /**
2097
2241
  * Update render states per pass and draw context.
2098
2242
  * Sets blending, alpha-to-coverage, depth test/write, cull mode, color mask, and cooperates with OIT.
@@ -2127,7 +2271,7 @@ declare class MeshMaterial extends Material implements Clonable<MeshMaterial> {
2127
2271
  * @param pass - Material pass index.
2128
2272
  * @returns True if the pass is transparent; otherwise false.
2129
2273
  */
2130
- isTransparentPass(_pass: number): boolean;
2274
+ isTransparentPass(pass: number, ctx?: DrawContext): boolean;
2131
2275
  /**
2132
2276
  * Query a feature flag’s current value.
2133
2277
  *
@@ -2188,9 +2332,14 @@ declare class MeshMaterial extends Material implements Clonable<MeshMaterial> {
2188
2332
  * @param color - Lit fragment color expression; may be undefined for depth-only paths.
2189
2333
  * @param ssrRoughness - Optional SSR roughness output expression.
2190
2334
  * @param ssrNormal - Optional SSR normal output expression.
2335
+ * @param sssProfile - Optional SSS profile output expression.
2336
+ * @param sssParams - Optional SSS packed params output expression.
2337
+ * @param sssProfileEnabled - True only when this material should write SSS profile data.
2338
+ * @param sssDiffuse - Optional diffuse-only lighting color for SSS composition.
2339
+ * @param sssTransmission - Optional thin-shell transmission lighting color for SSS composition.
2191
2340
  * @returns void
2192
2341
  */
2193
- outputFragmentColor(scope: PBInsideFunctionScope, worldPos: PBShaderExp, color: Nullable<PBShaderExp>, ssrRoughness?: PBShaderExp, ssrNormal?: PBShaderExp): void;
2342
+ outputFragmentColor(scope: PBInsideFunctionScope, worldPos: PBShaderExp, color: Nullable<PBShaderExp>, ssrRoughness?: PBShaderExp, ssrNormal?: PBShaderExp, sssProfile?: PBShaderExp, sssParams?: PBShaderExp, sssDiffuse?: PBShaderExp, sssTransmission?: PBShaderExp, sssProfileEnabled?: boolean): void;
2194
2343
  }
2195
2344
 
2196
2345
  declare const LambertMaterial_base: typeof MeshMaterial & (new (...args: any[]) => IMixinLight) & (new (...args: any[]) => IMixinVertexColor);
@@ -2381,6 +2530,271 @@ declare class ParticleMaterial extends MeshMaterial implements Clonable<Particle
2381
2530
  applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
2382
2531
  }
2383
2532
 
2533
+ /**
2534
+ * Built-in subsurface scattering profile preset names.
2535
+ *
2536
+ * @remarks
2537
+ * The short aliases (`skin`, `wax`, and `jade`) resolve to their default
2538
+ * canonical profiles.
2539
+ *
2540
+ * @public
2541
+ */
2542
+ type SubsurfaceProfilePreset = 'skin' | 'skin_thin' | 'skin_default' | 'skin_heavy_makeup' | 'wax' | 'wax_backlit' | 'wax_soft' | 'jade' | 'jade_backlit' | 'jade_soft';
2543
+ /**
2544
+ * Serializable subsurface scattering profile.
2545
+ *
2546
+ * @remarks
2547
+ * The profile stores the channel-dependent scattering radius and falloff used
2548
+ * by the screen-space SSS post effect. Materials can share a profile instance
2549
+ * to emulate Unreal-style skin profile assets.
2550
+ *
2551
+ * @public
2552
+ */
2553
+ declare class SubsurfaceProfile {
2554
+ private static readonly _maxProfiles;
2555
+ private static readonly _profiles;
2556
+ private static _version;
2557
+ private static _defaultSkinProfile;
2558
+ private readonly _scatterRadius;
2559
+ private readonly _falloffColor;
2560
+ private readonly _meanFreePathColor;
2561
+ private readonly _transmissionTintColor;
2562
+ private _preset;
2563
+ private _meanFreePathDistance;
2564
+ private _strength;
2565
+ private _scale;
2566
+ private _worldUnitScale;
2567
+ private _boundaryColorBleed;
2568
+ private _extinctionScale;
2569
+ private _normalScale;
2570
+ private _scatteringDistribution;
2571
+ private readonly _slot;
2572
+ private readonly _changeListeners;
2573
+ /**
2574
+ * Creates a subsurface scattering profile initialized with the default skin preset.
2575
+ *
2576
+ * @public
2577
+ */
2578
+ constructor();
2579
+ /**
2580
+ * Gets the global profile data version.
2581
+ *
2582
+ * @remarks
2583
+ * The value is incremented whenever a profile slot is allocated or profile
2584
+ * data changes, allowing render systems to refresh cached profile textures.
2585
+ *
2586
+ * @public
2587
+ */
2588
+ static get version(): number;
2589
+ /**
2590
+ * Gets the profile assigned to a packed profile slot.
2591
+ *
2592
+ * @param slot - The 1-based profile slot index.
2593
+ * @returns The profile assigned to the slot, or `null` if the slot is invalid or unused.
2594
+ *
2595
+ * @public
2596
+ */
2597
+ static getProfileBySlot(slot: number): SubsurfaceProfile | null;
2598
+ /**
2599
+ * Gets the shared default skin subsurface profile.
2600
+ *
2601
+ * @returns The lazily-created default skin profile.
2602
+ *
2603
+ * @public
2604
+ */
2605
+ static getDefaultSkinProfile(): SubsurfaceProfile;
2606
+ /**
2607
+ * Gets the preset tint bias used by the screen-space transmission model.
2608
+ *
2609
+ * @param index - The packed canonical preset index.
2610
+ * @returns The RGB tint bias for the preset, or white when the index is unknown.
2611
+ *
2612
+ * @public
2613
+ */
2614
+ static getPresetTintBiasByIndex(index: number): [number, number, number];
2615
+ /**
2616
+ * Gets the preset transmission response used by the screen-space SSS pass.
2617
+ *
2618
+ * @param index - The packed canonical preset index.
2619
+ * @returns The four-component transmission response for the preset.
2620
+ *
2621
+ * @public
2622
+ */
2623
+ static getPresetResponseByIndex(index: number): [number, number, number, number];
2624
+ /**
2625
+ * Computes the effective tint bias from the preset and current profile settings.
2626
+ *
2627
+ * @returns The derived RGB tint bias used for transmission tinting.
2628
+ *
2629
+ * @public
2630
+ */
2631
+ getDerivedTintBias(): [number, number, number];
2632
+ /**
2633
+ * Computes the effective transmission response from the preset and current profile settings.
2634
+ *
2635
+ * @returns The derived transmission response packed as four scalar channels.
2636
+ *
2637
+ * @public
2638
+ */
2639
+ getDerivedTransmissionResponse(): [number, number, number, number];
2640
+ /**
2641
+ * Gets the 1-based profile slot used when encoding this profile into SSS buffers.
2642
+ *
2643
+ * @public
2644
+ */
2645
+ get slot(): number;
2646
+ /**
2647
+ * Gets or sets the RGB scatter radius.
2648
+ *
2649
+ * @remarks
2650
+ * Assigning a radius also updates the mean-free-path authoring controls.
2651
+ *
2652
+ * @public
2653
+ */
2654
+ get scatterRadius(): Immutable<Vector3>;
2655
+ set scatterRadius(val: Immutable<Vector3>);
2656
+ /**
2657
+ * Gets or sets the channel falloff color used by the diffusion kernel.
2658
+ *
2659
+ * @public
2660
+ */
2661
+ get falloffColor(): Immutable<Vector3>;
2662
+ set falloffColor(val: Immutable<Vector3>);
2663
+ /**
2664
+ * Mean free path color used to derive channel-dependent scatter radius.
2665
+ *
2666
+ * @remarks
2667
+ * This is a more UE-like authoring control that keeps the existing radius-
2668
+ * based implementation, while letting tools expose a color + distance pair.
2669
+ *
2670
+ * @public
2671
+ */
2672
+ get meanFreePathColor(): Immutable<Vector3>;
2673
+ set meanFreePathColor(val: Immutable<Vector3>);
2674
+ /**
2675
+ * Gets or sets the mean free path distance used to derive the absolute scatter radius.
2676
+ *
2677
+ * @public
2678
+ */
2679
+ get meanFreePathDistance(): number;
2680
+ set meanFreePathDistance(val: number);
2681
+ /**
2682
+ * Gets or sets the active subsurface profile preset.
2683
+ *
2684
+ * @remarks
2685
+ * Assigning a preset applies its template values to the profile. Alias preset
2686
+ * names are resolved to their canonical preset.
2687
+ *
2688
+ * @public
2689
+ */
2690
+ get preset(): SubsurfaceProfilePreset;
2691
+ set preset(val: SubsurfaceProfilePreset);
2692
+ /**
2693
+ * Gets the packed canonical preset index.
2694
+ *
2695
+ * @public
2696
+ */
2697
+ get presetIndex(): number;
2698
+ /**
2699
+ * Gets or sets the SSS strength multiplier.
2700
+ *
2701
+ * @public
2702
+ */
2703
+ get strength(): number;
2704
+ set strength(val: number);
2705
+ /**
2706
+ * Gets or sets the screen-space scatter width scale.
2707
+ *
2708
+ * @public
2709
+ */
2710
+ get scale(): number;
2711
+ set scale(val: number);
2712
+ /**
2713
+ * Gets or sets the world-unit scale used when converting profile radii.
2714
+ *
2715
+ * @public
2716
+ */
2717
+ get worldUnitScale(): number;
2718
+ set worldUnitScale(val: number);
2719
+ /**
2720
+ * Gets or sets the amount of color bleeding preserved near SSS boundaries.
2721
+ *
2722
+ * @remarks
2723
+ * Values are clamped to the `[0, 1]` range.
2724
+ *
2725
+ * @public
2726
+ */
2727
+ get boundaryColorBleed(): number;
2728
+ set boundaryColorBleed(val: number);
2729
+ /**
2730
+ * Gets or sets the RGB tint applied to transmitted subsurface light.
2731
+ *
2732
+ * @public
2733
+ */
2734
+ get transmissionTintColor(): Immutable<Vector3>;
2735
+ set transmissionTintColor(val: Immutable<Vector3>);
2736
+ /**
2737
+ * Gets or sets the extinction multiplier used by transmission attenuation.
2738
+ *
2739
+ * @remarks
2740
+ * Values are clamped to zero or greater.
2741
+ *
2742
+ * @public
2743
+ */
2744
+ get extinctionScale(): number;
2745
+ set extinctionScale(val: number);
2746
+ /**
2747
+ * Gets or sets the normal sensitivity scale used by SSS filtering.
2748
+ *
2749
+ * @remarks
2750
+ * Values are clamped to zero or greater.
2751
+ *
2752
+ * @public
2753
+ */
2754
+ get normalScale(): number;
2755
+ set normalScale(val: number);
2756
+ /**
2757
+ * Gets or sets the scattering distribution blend.
2758
+ *
2759
+ * @remarks
2760
+ * Values are clamped to the `[0, 1]` range.
2761
+ *
2762
+ * @public
2763
+ */
2764
+ get scatteringDistribution(): number;
2765
+ set scatteringDistribution(val: number);
2766
+ /**
2767
+ * Adds a listener that is invoked whenever this profile changes.
2768
+ *
2769
+ * @param listener - The callback to invoke after profile data changes.
2770
+ *
2771
+ * @public
2772
+ */
2773
+ addChangeListener(listener: () => void): void;
2774
+ /**
2775
+ * Removes a previously registered profile change listener.
2776
+ *
2777
+ * @param listener - The callback to remove.
2778
+ *
2779
+ * @public
2780
+ */
2781
+ removeChangeListener(listener: () => void): void;
2782
+ private static allocateSlot;
2783
+ private markDirty;
2784
+ private static resolvePreset;
2785
+ private static getPresetNameByIndex;
2786
+ private applyPresetTemplate;
2787
+ private syncMeanFreePathFromScatterRadius;
2788
+ private syncScatterRadiusFromMeanFreePath;
2789
+ private syncFalloffFromMeanFreePath;
2790
+ private getNormalizedTransmissionTintColor;
2791
+ private getDerivedProfileFactors;
2792
+ private getNormalizedMeanFreePathColor;
2793
+ private mixNumber;
2794
+ private clampRange;
2795
+ private clamp01;
2796
+ }
2797
+
2384
2798
  declare const GrassMaterial_base: typeof MeshMaterial & (new (...args: any[]) => IMixinPBRMetallicRoughness) & (new (...args: any[]) => IMixinFoliage);
2385
2799
  /**
2386
2800
  * Terrain grass material
@@ -2491,10 +2905,8 @@ declare const PBRMetallicRoughnessMaterial_base: typeof MeshMaterial & (new (...
2491
2905
  * @public
2492
2906
  */
2493
2907
  declare class PBRMetallicRoughnessMaterial extends PBRMetallicRoughnessMaterial_base implements Clonable<PBRMetallicRoughnessMaterial> {
2494
- private readonly _subsurfaceColor;
2495
- private _subsurfaceScale;
2496
- private _subsurfacePower;
2497
- private _subsurfaceIntensity;
2908
+ private readonly _subsurfaceProfileChanged;
2909
+ private _subsurfaceProfile;
2498
2910
  /**
2499
2911
  * Creates an instance of PBRMetallicRoughnessMaterial class
2500
2912
  */
@@ -2507,28 +2919,18 @@ declare class PBRMetallicRoughnessMaterial extends PBRMetallicRoughnessMaterial_
2507
2919
  /** true if vertex normal attribute presents */
2508
2920
  get vertexTangent(): boolean;
2509
2921
  set vertexTangent(val: boolean);
2510
- /** true if subsurface scattering is enabled */
2511
- get subsurfaceScattering(): boolean;
2512
- set subsurfaceScattering(val: boolean);
2513
- /** subsurface scattering color tint */
2514
- get subsurfaceColor(): Immutable<Vector3>;
2515
- set subsurfaceColor(val: Immutable<Vector3>);
2516
- /** wrap factor for the scattering profile */
2517
- get subsurfaceScale(): number;
2518
- set subsurfaceScale(val: number);
2519
- /** profile exponent for the scattering profile */
2520
- get subsurfacePower(): number;
2521
- set subsurfacePower(val: number);
2522
- /** final intensity of scattering contribution */
2523
- get subsurfaceIntensity(): number;
2524
- set subsurfaceIntensity(val: number);
2525
- private getSubsurfaceColor;
2526
- private getSubsurfaceScale;
2527
- private getSubsurfacePower;
2528
- private getSubsurfaceIntensity;
2922
+ /** shared profile asset driving channel radius/falloff */
2923
+ get subsurfaceProfile(): SubsurfaceProfile | null;
2924
+ set subsurfaceProfile(val: SubsurfaceProfile | null);
2925
+ private getSubsurfaceProfileId;
2926
+ private getSubsurfaceProfileScale;
2927
+ private getSubsurfaceProfileStrength;
2928
+ private getSubsurfaceProfilePreset;
2529
2929
  vertexShader(scope: PBFunctionScope): void;
2530
2930
  fragmentShader(scope: PBFunctionScope): void;
2531
2931
  applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
2932
+ protected _createHash(): string;
2933
+ private buildSubsurfaceProfile;
2532
2934
  }
2533
2935
 
2534
2936
  declare const PBRSpecularGlossinessMaterial_base: typeof MeshMaterial & (new (...args: any[]) => IMixinPBRSpecularGlossiness) & (new (...args: any[]) => IMixinVertexColor);
@@ -2553,6 +2955,144 @@ declare class PBRSpecularGlossinessMaterial extends PBRSpecularGlossinessMateria
2553
2955
  fragmentShader(scope: PBFunctionScope): void;
2554
2956
  }
2555
2957
 
2958
+ /**
2959
+ * MToonMaterial outline width mode.
2960
+ *
2961
+ * @public
2962
+ */
2963
+ type MToonOutlineWidthMode = 'none' | 'worldCoordinates' | 'screenCoordinates';
2964
+ declare const ToonMaterialBase: typeof MeshMaterial & (new (...args: any[]) => IMixinAlbedoColor) & (new (...args: any[]) => IMixinLambert) & (new (...args: any[]) => TextureProp<"shadeMultiply"> & {
2965
+ getShadeMultiplyTextureUniform: (scope: PBInsideFunctionScope) => PBShaderExp;
2966
+ getShadeMultiplyTexCoord: (scope: PBInsideFunctionScope) => PBShaderExp;
2967
+ } & {
2968
+ sampleShadeMultiplyTexture: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
2969
+ }) & (new (...args: any[]) => TextureProp<"shadingShift"> & {
2970
+ getShadingShiftTextureUniform: (scope: PBInsideFunctionScope) => PBShaderExp;
2971
+ getShadingShiftTexCoord: (scope: PBInsideFunctionScope) => PBShaderExp;
2972
+ } & {
2973
+ sampleShadingShiftTexture: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
2974
+ }) & (new (...args: any[]) => TextureProp<"matcap"> & {
2975
+ getMatcapTextureUniform: (scope: PBInsideFunctionScope) => PBShaderExp;
2976
+ getMatcapTexCoord: (scope: PBInsideFunctionScope) => PBShaderExp;
2977
+ } & {
2978
+ sampleMatcapTexture: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
2979
+ }) & (new (...args: any[]) => TextureProp<"rimMultiply"> & {
2980
+ getRimMultiplyTextureUniform: (scope: PBInsideFunctionScope) => PBShaderExp;
2981
+ getRimMultiplyTexCoord: (scope: PBInsideFunctionScope) => PBShaderExp;
2982
+ } & {
2983
+ sampleRimMultiplyTexture: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
2984
+ }) & (new (...args: any[]) => TextureProp<"outlineWidthMultiply"> & {
2985
+ getOutlineWidthMultiplyTextureUniform: (scope: PBInsideFunctionScope) => PBShaderExp;
2986
+ getOutlineWidthMultiplyTexCoord: (scope: PBInsideFunctionScope) => PBShaderExp;
2987
+ } & {
2988
+ sampleOutlineWidthMultiplyTexture: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
2989
+ }) & (new (...args: any[]) => TextureProp<"uvAnimationMask"> & {
2990
+ getUvAnimationMaskTextureUniform: (scope: PBInsideFunctionScope) => PBShaderExp;
2991
+ getUvAnimationMaskTexCoord: (scope: PBInsideFunctionScope) => PBShaderExp;
2992
+ } & {
2993
+ sampleUvAnimationMaskTexture: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
2994
+ }) & (new (...args: any[]) => TextureProp<"emissive"> & {
2995
+ getEmissiveTextureUniform: (scope: PBInsideFunctionScope) => PBShaderExp;
2996
+ getEmissiveTexCoord: (scope: PBInsideFunctionScope) => PBShaderExp;
2997
+ } & {
2998
+ sampleEmissiveTexture: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
2999
+ });
3000
+ /**
3001
+ * MToonMaterial is a material that implements the MToon shader, which is a stylized shader commonly used for rendering anime-style characters. It supports features such as rim lighting, matcap, and outline rendering.
3002
+ *
3003
+ * @public
3004
+ */
3005
+ declare class MToonMaterial extends ToonMaterialBase {
3006
+ private static readonly FEATURE_OUTLINE_WIDTH_MODE;
3007
+ private static readonly FEATURE_OUTLINE_TANGENT_NORMALS;
3008
+ private readonly _shadeColorFactor;
3009
+ private readonly _matcapFactor;
3010
+ private readonly _parametricRimColorFactor;
3011
+ private readonly _outlineColorFactor;
3012
+ private readonly _uvAnimationScroll;
3013
+ private readonly _emissiveColor;
3014
+ private _shadingShiftFactor;
3015
+ private _shadingShiftTextureScale;
3016
+ private _shadingToonyFactor;
3017
+ private _giEqualizationFactor;
3018
+ private _parametricRimFresnelPowerFactor;
3019
+ private _parametricRimLiftFactor;
3020
+ private _rimLightingMixFactor;
3021
+ private _outlineWidthFactor;
3022
+ private _outlineLightingMixFactor;
3023
+ private _uvAnimationRotationSpeedFactor;
3024
+ private _emissiveStrength;
3025
+ private _transparentWithZWrite;
3026
+ private _renderQueueOffsetNumber;
3027
+ constructor();
3028
+ get shadeColorFactor(): Immutable<Vector3>;
3029
+ set shadeColorFactor(val: Immutable<Vector3>);
3030
+ get shadingShiftFactor(): number;
3031
+ set shadingShiftFactor(val: number);
3032
+ get shadingShiftTextureScale(): number;
3033
+ set shadingShiftTextureScale(val: number);
3034
+ get shadingToonyFactor(): number;
3035
+ set shadingToonyFactor(val: number);
3036
+ get giEqualizationFactor(): number;
3037
+ set giEqualizationFactor(val: number);
3038
+ get matcapFactor(): Immutable<Vector3>;
3039
+ set matcapFactor(val: Immutable<Vector3>);
3040
+ get parametricRimColorFactor(): Immutable<Vector3>;
3041
+ set parametricRimColorFactor(val: Immutable<Vector3>);
3042
+ get parametricRimFresnelPowerFactor(): number;
3043
+ set parametricRimFresnelPowerFactor(val: number);
3044
+ get parametricRimLiftFactor(): number;
3045
+ set parametricRimLiftFactor(val: number);
3046
+ get rimLightingMixFactor(): number;
3047
+ set rimLightingMixFactor(val: number);
3048
+ get outlineWidthMode(): MToonOutlineWidthMode;
3049
+ set outlineWidthMode(val: MToonOutlineWidthMode);
3050
+ get outlineWidthFactor(): number;
3051
+ set outlineWidthFactor(val: number);
3052
+ get outlineColorFactor(): Immutable<Vector3>;
3053
+ set outlineColorFactor(val: Immutable<Vector3>);
3054
+ get outlineLightingMixFactor(): number;
3055
+ set outlineLightingMixFactor(val: number);
3056
+ get outlineUsesTangentNormals(): boolean;
3057
+ set outlineUsesTangentNormals(val: boolean);
3058
+ get transparentWithZWrite(): boolean;
3059
+ set transparentWithZWrite(val: boolean);
3060
+ get renderQueueOffsetNumber(): number;
3061
+ set renderQueueOffsetNumber(val: number);
3062
+ get uvAnimationScrollXSpeedFactor(): number;
3063
+ set uvAnimationScrollXSpeedFactor(val: number);
3064
+ get uvAnimationScrollYSpeedFactor(): number;
3065
+ set uvAnimationScrollYSpeedFactor(val: number);
3066
+ get uvAnimationRotationSpeedFactor(): number;
3067
+ set uvAnimationRotationSpeedFactor(val: number);
3068
+ get emissiveColor(): Immutable<Vector3>;
3069
+ set emissiveColor(val: Immutable<Vector3>);
3070
+ get emissiveStrength(): number;
3071
+ set emissiveStrength(val: number);
3072
+ clone(): MToonMaterial;
3073
+ copyFrom(other: this): void;
3074
+ getQueueType(): 1 | 2;
3075
+ passToHash(pass: number): string;
3076
+ isTransparentPass(pass: number, ctx?: DrawContext): boolean;
3077
+ protected updateRenderStates(pass: number, stateSet: RenderStateSet, ctx: DrawContext): void;
3078
+ draw(primitive: Primitive, ctx: DrawContext, numInstances?: number): void;
3079
+ drawPrimitive(pass: number, primitive: Primitive, ctx: DrawContext, numInstances: number): void;
3080
+ applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
3081
+ private usesAnimatedUV;
3082
+ private applyUVAnimation;
3083
+ private getMToonBaseUV;
3084
+ private getMToonNormalUV;
3085
+ private sampleAlbedo;
3086
+ private sampleShadeColor;
3087
+ private sampleNormal;
3088
+ private calculateMToonDirectLighting;
3089
+ private calculateMToonGI;
3090
+ private calculateMToonRim;
3091
+ private calculateMToonEmission;
3092
+ vertexShader(scope: PBFunctionScope): void;
3093
+ fragmentShader(scope: PBFunctionScope): void;
3094
+ }
3095
+
2556
3096
  /**
2557
3097
  * Represents a connection between two nodes
2558
3098
  *
@@ -3334,361 +3874,67 @@ declare class MaterialBlueprintIR {
3334
3874
  }
3335
3875
 
3336
3876
  /**
3337
- * ToMixedTextureType
3338
- *
3339
- * @public
3340
- */
3341
- type ToMixedTextureType<T> = T extends [infer First, ...infer Rest] ? [First extends string ? ReturnType<typeof mixinTextureProps<First>> : never, ...ToMixedTextureType<Rest>] : [];
3342
- /**
3343
- * TextureMixinTypes
3344
- *
3877
+ * Physically-based rendering material driven by blueprint graphs, but shaded by the
3345
3878
  * @public
3346
3879
  */
3347
- type TextureMixinTypes<T> = ReturnType<typeof applyMaterialMixins<ToMixedTextureType<T>, typeof MeshMaterial>>;
3880
+ type PBRBlueprintOutputName = 'BaseColor' | 'Metallic' | 'Roughness' | 'Specular' | 'Emissive' | 'Normal' | 'Tangent' | 'Opacity' | 'SpecularWeight' | 'AO';
3348
3881
  /**
3349
- * TextureMixinInstanceTypes
3882
+ * Physically-based rendering material driven by blueprint graphs, but shaded by the
3883
+ * same PBR metallic/roughness backend used by {@link PBRMetallicRoughnessMaterial}.
3350
3884
  *
3351
- * @public
3352
- */
3353
- type TextureMixinInstanceTypes<T> = TextureMixinTypes<T> extends {
3354
- new (...args: any[]): infer U;
3355
- } ? U : never;
3356
- /**
3357
- * TextureProp
3885
+ * @remarks
3886
+ * The blueprint graph only produces surface inputs. Final direct/indirect lighting,
3887
+ * transmission, clearcoat, sheen, iridescence and anisotropic reflection still run
3888
+ * through the standard PBRM backend so imported GLTF materials and blueprint materials
3889
+ * stay on the same shading path.
3358
3890
  *
3359
3891
  * @public
3360
3892
  */
3361
- type TextureProp<U extends string> = {
3362
- [P in 'Texture' | 'TextureSampler' | 'TexCoordIndex' | 'TexCoordMatrix' as `${U}${P}`]: P extends 'Texture' ? Nullable<Texture2D> : P extends 'TextureSampler' ? Nullable<TextureSampler> : P extends 'TexCoordIndex' ? number : P extends 'TexCoordMatrix' ? Nullable<Matrix4x4> : never;
3363
- };
3364
- /**
3365
- * TexturePropUniforms
3366
- *
3367
- * @public
3368
- */
3369
- type TexturePropUniforms<U extends string> = {
3370
- [P in 'TextureUniform' | 'TexCoord' as `get${Capitalize<U>}${P}`]: (scope: PBInsideFunctionScope) => PBShaderExp;
3371
- } & {
3372
- [P in 'Texture' as `sample${Capitalize<U>}${P}`]: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
3373
- };
3374
- /**
3375
- * Texture property mixin
3376
- * @param name - Texture name
3377
- * @returns Texture mixin
3378
- *
3379
- * @public
3380
- */
3381
- declare function mixinTextureProps<U extends string>(name: U): <T extends typeof MeshMaterial>(BaseCls: T, vertex?: boolean) => T & (new (...args: any[]) => TextureProp<U> & TexturePropUniforms<U>);
3382
-
3383
- /**
3384
- * Interface for common PBR mixin
3385
- *
3386
- * @public
3387
- */
3388
- type IMixinPBRBRDF = {
3389
- fresnelSchlick(scope: PBInsideFunctionScope, cosTheta: PBShaderExp, F0: PBShaderExp, F90: PBShaderExp): PBShaderExp;
3390
- distributionGGX(scope: PBInsideFunctionScope, NdotH: PBShaderExp, alphaRoughness: PBShaderExp): PBShaderExp;
3391
- visGGX(scope: PBInsideFunctionScope, NdotV: PBShaderExp, NdotL: PBShaderExp, alphaRoughness: PBShaderExp): PBShaderExp;
3392
- };
3393
-
3394
- /**
3395
- * Interface for common PBR mixin
3396
- *
3397
- * @public
3398
- */
3399
- type IMixinPBRCommon = {
3400
- ior: number;
3401
- emissiveColor: Vector3;
3402
- emissiveStrength: number;
3403
- occlusionStrength: number;
3404
- transmission: boolean;
3405
- transmissionFactor: number;
3406
- thicknessFactor: number;
3407
- attenuationColor: Vector3;
3408
- attenuationDistance: number;
3409
- sheen: boolean;
3410
- sheenColorFactor: Vector3;
3411
- sheenRoughnessFactor: number;
3412
- clearcoat: boolean;
3413
- clearcoatIntensity: number;
3414
- clearcoatRoughnessFactor: number;
3415
- iridescence: boolean;
3416
- iridescenceFactor: number;
3417
- iridescenceIor: number;
3418
- iridescenceThicknessMin: number;
3419
- iridescenceThicknessMax: number;
3420
- getCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp): PBShaderExp;
3421
- calculateCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp, data: PBShaderExp): void;
3422
- getCommonDatasStruct(scope: PBInsideFunctionScope): ShaderTypeFunc;
3423
- calculateEmissiveColor(scope: PBInsideFunctionScope): PBShaderExp;
3424
- getF0(scope: PBInsideFunctionScope): PBShaderExp;
3425
- getSheenAlbedoScaling(scope: PBInsideFunctionScope, Ndot: PBShaderExp, sheenColor: PBShaderExp, sheenRoughness: PBShaderExp): PBShaderExp;
3426
- getSheenAlbedoScalingForDirect(scope: PBInsideFunctionScope, NoV: PBShaderExp, NoL: PBShaderExp, sheenColor: PBShaderExp, sheenRoughness: PBShaderExp): PBShaderExp;
3427
- directLighting(scope: PBInsideFunctionScope, lightDir: PBShaderExp, lightColor: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, diffuseScale: PBShaderExp, specularScale: PBShaderExp, sourceRadiusFactor: PBShaderExp, outColor: PBShaderExp): void;
3428
- directRectLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, posRange: PBShaderExp, axisX: PBShaderExp, axisY: PBShaderExp, colorIntensity: PBShaderExp, outColor: PBShaderExp): void;
3429
- indirectLighting(scope: PBInsideFunctionScope, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp, outRoughness?: PBShaderExp): void;
3430
- } & TextureMixinInstanceTypes<[
3431
- 'occlusion',
3432
- 'emissive',
3433
- 'sheenColor',
3434
- 'sheenRoughness',
3435
- 'clearcoatIntensity',
3436
- 'clearcoatRoughness',
3437
- 'clearcoatNormal',
3438
- 'transmission',
3439
- 'thickness',
3440
- 'iridescence',
3441
- 'iridescenceThickness'
3442
- ]> & IMixinPBRBRDF;
3443
- /**
3444
- * PBR common stuff mixin
3445
- * @param BaseCls - Class to mix in
3446
- * @returns Mixed class
3447
- *
3448
- * @public
3449
- */
3450
- declare function mixinPBRCommon<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinPBRCommon);
3451
-
3452
- /**
3453
- * Interface for albedo color mixin
3454
- * @public
3455
- */
3456
- type IMixinAlbedoColor = {
3457
- albedoColor: Vector4;
3458
- calculateAlbedoColor(scope: PBInsideFunctionScope, uv?: PBShaderExp): PBShaderExp;
3459
- } & TextureMixinInstanceTypes<['albedo']>;
3460
- /**
3461
- * Albedo color mixin
3462
- * @param BaseCls - Class to mix in
3463
- * @returns Mixed class
3464
- *
3465
- * @public
3466
- */
3467
- declare function mixinAlbedoColor<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinAlbedoColor);
3468
-
3469
- /**
3470
- * Interface for light mixin
3471
- * @public
3472
- */
3473
- type IMixinLight = {
3474
- normalScale: number;
3475
- normalMapMode: 'tangent-space' | 'object-space';
3476
- doubleSidedLighting: boolean;
3477
- needCalculateEnvLight(): boolean;
3478
- getUniformNormalScale(scope: PBInsideFunctionScope): PBShaderExp;
3479
- getEnvLightIrradiance(scope: PBInsideFunctionScope, normal: PBShaderExp): PBShaderExp;
3480
- getEnvLightRadiance(scope: PBInsideFunctionScope, reflectVec: PBShaderExp, roughness: PBShaderExp): PBShaderExp;
3481
- calculateViewVector(scope: PBInsideFunctionScope, worldPos: PBShaderExp): PBShaderExp;
3482
- calculateReflectionVector(scope: PBInsideFunctionScope, normal: PBShaderExp, viewVec: PBShaderExp): PBShaderExp;
3483
- calculateTBN(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal?: PBShaderExp, worldTangent?: PBShaderExp, worldBinormal?: PBShaderExp): PBShaderExp;
3484
- calculateNormal(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal?: PBShaderExp, worldTangent?: PBShaderExp, worldBinormal?: PBShaderExp): PBShaderExp;
3485
- calculateNormalAndTBN(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal?: PBShaderExp, worldTangent?: PBShaderExp, worldBinormal?: PBShaderExp): PBShaderExp;
3486
- calculateLightAttenuation(scope: PBInsideFunctionScope, type: PBShaderExp, worldPos: PBShaderExp, posRange: PBShaderExp, dirCutoff: PBShaderExp): PBShaderExp;
3487
- calculateLightDirection(scope: PBInsideFunctionScope, type: PBShaderExp, worldPos: PBShaderExp, posRange: PBShaderExp, dirCutoff: PBShaderExp): PBShaderExp;
3488
- calculateShadow(scope: PBInsideFunctionScope, worldPos: PBShaderExp, NoL: PBShaderExp): PBShaderExp;
3489
- forEachLight(scope: PBInsideFunctionScope, callback: (this: PBInsideFunctionScope, type: PBShaderExp, posRange: PBShaderExp, dirCutoff: PBShaderExp, colorIntensity: PBShaderExp, extra: PBShaderExp, shadow: boolean) => void): void;
3490
- } & TextureMixinInstanceTypes<['normal']> & IMixinAlbedoColor;
3491
- /**
3492
- * Light mixin
3493
- * @param BaseCls - class to mix in
3494
- * @returns Mixed class
3495
- * @public
3496
- */
3497
- declare function mixinLight<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinLight);
3498
-
3499
- /**
3500
- * Reflection model used by the PBR metallic-roughness material.
3501
- *
3502
- * @public
3503
- */
3504
- type PBRReflectionMode = 'none' | 'ggx' | 'anisotropic' | 'glint';
3505
- /**
3506
- * Interface for PBRMetallicRoughness lighting model mixin
3507
- * @public
3508
- */
3509
- type IMixinPBRMetallicRoughness = {
3510
- metallic: number;
3511
- roughness: number;
3512
- specularFactor: Vector4;
3513
- reflectionMode: PBRReflectionMode;
3514
- anisotropy: number;
3515
- anisotropyDirection: number;
3516
- anisotropyDirectionScaleBias: Vector2;
3517
- PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp, TBN: PBShaderExp, outRoughness?: PBShaderExp): PBShaderExp;
3518
- calculateMetallic(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
3519
- calculateRoughness(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
3520
- calculateSpecularFactor(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
3521
- calculateCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp, data: PBShaderExp): void;
3522
- } & IMixinPBRCommon & IMixinLight & TextureMixinInstanceTypes<[
3523
- 'metallicRoughness',
3524
- 'occlusion',
3525
- 'specular',
3526
- 'specularColor',
3527
- 'anisotropyDirection'
3528
- ]>;
3529
- /**
3530
- * PBRMetallicRoughness lighting model mixin
3531
- * @param BaseCls - Class to mix in
3532
- * @returns Mixed class
3533
- * @public
3534
- */
3535
- declare function mixinPBRMetallicRoughness<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinPBRMetallicRoughness);
3536
-
3537
- declare const PBRBluePrintMaterial_base: typeof MeshMaterial & (new (...args: any[]) => IMixinPBRBluePrint);
3538
- /**
3539
- * Physically-based rendering material driven by blueprint graphs.
3540
- *
3541
- * @remarks
3542
- * This material extends {@link MeshMaterial} with PBR behavior via
3543
- * {@link mixinPBRBluePrint}, and uses {@link MaterialBlueprintIR}
3544
- * graphs for both vertex and fragment stages.
3545
- *
3546
- * - The **vertex blueprint IR** (`vertexIR`) controls vertex
3547
- * transformations and per-vertex data.
3548
- * - The **fragment blueprint IR** (`fragmentIR`) produces inputs
3549
- * for the PBR shading model (albedo, roughness, metalness, etc.).
3550
- *
3551
- * Uniform values and textures for the blueprints are provided via
3552
- * {@link PBRBluePrintMaterial.uniformValues} and
3553
- * {@link PBRBluePrintMaterial.uniformTextures}.
3554
- *
3555
- * @public
3556
- */
3557
- declare class PBRBluePrintMaterial extends PBRBluePrintMaterial_base implements Clonable<PBRBluePrintMaterial> {
3558
- /**
3559
- * Creates a new {@link PBRBluePrintMaterial} instance.
3560
- *
3561
- * @param irFrag - Optional fragment blueprint IR. If omitted, a default
3562
- * IR containing a single {@link PBRBlockNode} is created.
3563
- * @param irVertex - Optional vertex blueprint IR. If omitted, a default
3564
- * IR containing a single {@link VertexBlockNode} is created.
3565
- * @param uniformValues - Optional initial list of uniform value descriptors.
3566
- * @param uniformTextures - Optional initial list of texture uniform descriptors.
3567
- */
3893
+ declare class PBRBluePrintMaterial extends PBRMetallicRoughnessMaterial implements Clonable<PBRBluePrintMaterial> {
3568
3894
  constructor(irFrag?: MaterialBlueprintIR, irVertex?: MaterialBlueprintIR, uniformValues?: BluePrintUniformValue[], uniformTextures?: BluePrintUniformTexture[]);
3569
- get reflectionMode(): PBRReflectionMode;
3570
- set reflectionMode(val: PBRReflectionMode);
3571
- get subsurfaceScattering(): boolean;
3572
- set subsurfaceScattering(val: boolean);
3573
- get subsurfaceColor(): Immutable<Vector3>;
3574
- set subsurfaceColor(val: Immutable<Vector3>);
3575
- get subsurfaceScale(): number;
3576
- set subsurfaceScale(val: number);
3577
- get subsurfacePower(): number;
3578
- set subsurfacePower(val: number);
3579
- get subsurfaceIntensity(): number;
3580
- set subsurfaceIntensity(val: number);
3581
- get anisotropy(): number;
3582
- set anisotropy(val: number);
3583
- get anisotropyDirection(): number;
3584
- set anisotropyDirection(val: number);
3585
- get anisotropyDirectionScaleBias(): Immutable<Vector2>;
3586
- set anisotropyDirectionScaleBias(val: Immutable<Vector2>);
3587
- /**
3588
- * Gets the fragment blueprint IR.
3589
- */
3590
3895
  get fragmentIR(): MaterialBlueprintIR;
3591
3896
  set fragmentIR(ir: MaterialBlueprintIR);
3592
- /**
3593
- * Gets the vertex blueprint IR.
3594
- */
3595
3897
  get vertexIR(): MaterialBlueprintIR;
3596
3898
  set vertexIR(ir: MaterialBlueprintIR);
3597
- /**
3598
- * Gets the list of uniform value descriptors used by the blueprints.
3599
- */
3600
3899
  get uniformValues(): BluePrintUniformValue[];
3601
3900
  set uniformValues(val: BluePrintUniformValue[]);
3602
- /**
3603
- * Gets the list of texture uniform descriptors used by the blueprints.
3604
- */
3605
3901
  get uniformTextures(): BluePrintUniformTexture[];
3606
3902
  set uniformTextures(val: BluePrintUniformTexture[]);
3607
- /**
3608
- * Creates a deep copy of this material.
3609
- *
3610
- * @remarks
3611
- * The clone shares the same vertex/fragment IR references and copies
3612
- * the current blueprint uniform descriptors, then calls `copyFrom`
3613
- * to copy base-class and mixin state.
3614
- *
3615
- * @returns A new {@link PBRBluePrintMaterial} instance.
3616
- */
3903
+ hasConnectedOutput(name: PBRBlueprintOutputName): boolean;
3617
3904
  clone(): PBRBluePrintMaterial;
3618
3905
  copyFrom(other: this): void;
3619
- /**
3620
- * Builds the vertex shader for this PBR blueprint material.
3621
- *
3622
- * @param scope - The current vertex shader function scope.
3623
- */
3624
3906
  vertexShader(scope: PBFunctionScope): void;
3625
- /**
3626
- * Builds the fragment shader for this PBR blueprint material.
3627
- *
3628
- * @param scope - The current fragment shader function scope.
3629
- */
3630
3907
  fragmentShader(scope: PBFunctionScope): void;
3631
- /**
3632
- * Applies runtime uniform values and textures to the given bind group.
3633
- *
3634
- * @remarks
3635
- * - Calls the base implementation first to bind standard mesh/PBR uniforms.
3636
- * - If fragment color is needed for the current context, all blueprint
3637
- * scalar/vector uniform values and textures are then bound by name.
3638
- *
3639
- * @param bindGroup - The bind group to which material resources are bound.
3640
- * @param ctx - The current draw context.
3641
- * @param pass - Index of the active render pass.
3642
- */
3643
3908
  applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
3644
- /**
3645
- * Creates a unique hash string used for program caching.
3646
- *
3647
- * @remarks
3648
- * The hash includes:
3649
- * - The base material hash (`super._createHash()`).
3650
- * - The fragment IR hash.
3651
- * - The vertex IR hash.
3652
- *
3653
- * Different blueprint graphs will therefore produce different programs.
3654
- *
3655
- * @returns A hash string that uniquely identifies this material configuration.
3656
- */
3657
- protected _createHash(): string;
3658
- /**
3659
- * Creates the GPU program for this blueprint PBR material.
3660
- *
3661
- * @remarks
3662
- * This calls the base implementation and returns its result.
3663
- * Commented-out `console.log` lines are provided for debugging the
3664
- * generated vertex and fragment shader sources.
3665
- *
3666
- * @param ctx - The current draw context.
3667
- * @param pass - Index of the active render pass.
3668
- * @returns The created GPU program.
3669
- */
3670
3909
  protected createProgram(ctx: DrawContext, pass: number): _zephyr3d_device.GPUProgram<unknown>;
3671
- /**
3672
- * Disposes resources associated with this material.
3673
- *
3674
- * @remarks
3675
- * - Calls the base `onDispose` to clean up inherited resources.
3676
- * - Disposes all `finalTexture` references from the blueprint
3677
- * texture uniform descriptors.
3678
- *
3679
- * This method is intended to be called by the engine's resource
3680
- * management system rather than directly by user code.
3681
- */
3910
+ protected _createHash(): string;
3682
3911
  protected onDispose(): void;
3683
- /**
3684
- * Retrieves a named output expression from a blueprint output list.
3685
- *
3686
- * @param outputs - The list of outputs generated by a blueprint graph.
3687
- * @param name - The desired output name (e.g. `"Position"`, `"Color"`, `"UV"`).
3688
- * @returns The expression associated with the given name, or `undefined` if not found.
3689
- */
3690
- private getOutput;
3691
- private applySubsurfaceScattering;
3912
+ calculateAlbedoColor(scope: PBInsideFunctionScope, uv?: PBShaderExp): PBShaderExp;
3913
+ calculateMetallic(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
3914
+ calculateRoughness(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
3915
+ calculateSpecularFactor(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
3916
+ calculateEmissiveColor(scope: PBInsideFunctionScope): PBShaderExp;
3917
+ calculateNormalAndTBN(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal?: PBShaderExp, worldTangent?: PBShaderExp, worldBinormal?: PBShaderExp): PBShaderExp;
3918
+ indirectLighting(scope: PBInsideFunctionScope, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp, outRoughness?: PBShaderExp, outDiffuseColor?: PBShaderExp): void;
3919
+ private syncBlueprintMetadata;
3920
+ private collectConnectedOutputs;
3921
+ private getBlueprintVertexColor;
3922
+ private getBlueprintVertexUV;
3923
+ private getBlueprintOutput;
3924
+ private getBlueprintOutputMap;
3925
+ private getBlueprintWorldPos;
3926
+ private getBlueprintFragmentVertexColor;
3927
+ private getBlueprintFragmentVertexUV;
3928
+ private getBlueprintFragmentVertexNormal;
3929
+ private getBlueprintFragmentVertexTangent;
3930
+ private getBlueprintFragmentVertexBinormal;
3931
+ private toOutputMap;
3932
+ private toVertexOutputMap;
3933
+ private toFloat;
3934
+ private toVec2;
3935
+ private toVec3;
3936
+ private toVec4;
3937
+ private _connectedOutputHash;
3692
3938
  }
3693
3939
 
3694
3940
  /**
@@ -3968,57 +4214,6 @@ declare class StandardSpriteMaterial extends SpriteMaterial implements Clonable<
3968
4214
  protected onDispose(): void;
3969
4215
  }
3970
4216
 
3971
- /**
3972
- * Atlas-based MSDF text material.
3973
- *
3974
- * @public
3975
- */
3976
- declare class MSDFTextMaterial extends MeshMaterial implements Clonable<MSDFTextMaterial> {
3977
- static FEATURE_TEXT_ATLAS: number;
3978
- private _atlas;
3979
- private _textColor;
3980
- private _outlineColor;
3981
- private _distanceRange;
3982
- private _atlasSize;
3983
- private _smallGlyphThreshold;
3984
- private _outlineWidth;
3985
- constructor();
3986
- get atlasTexture(): _zephyr3d_base.Nullable<Texture2D<unknown>>;
3987
- set atlasTexture(tex: _zephyr3d_base.Nullable<Texture2D<unknown>>);
3988
- get textColor(): Immutable<Vector3>;
3989
- set textColor(value: Immutable<Vector3>);
3990
- get outlineColor(): Immutable<Vector3>;
3991
- set outlineColor(value: Immutable<Vector3>);
3992
- get distanceRange(): number;
3993
- set distanceRange(value: number);
3994
- get smallGlyphThreshold(): number;
3995
- set smallGlyphThreshold(value: number);
3996
- get outlineWidth(): number;
3997
- set outlineWidth(value: number);
3998
- clone(): MSDFTextMaterial;
3999
- copyFrom(other: this): void;
4000
- vertexShader(scope: PBFunctionScope): void;
4001
- fragmentShader(scope: PBFunctionScope): void;
4002
- applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
4003
- protected onDispose(): void;
4004
- }
4005
-
4006
- /**
4007
- * Billboard MSDF text material.
4008
- *
4009
- * @public
4010
- */
4011
- declare class MSDFTextSpriteMaterial extends MSDFTextMaterial implements Clonable<MSDFTextSpriteMaterial> {
4012
- private _rotation;
4013
- constructor();
4014
- get rotation(): number;
4015
- set rotation(value: number);
4016
- clone(): MSDFTextSpriteMaterial;
4017
- copyFrom(other: this): void;
4018
- vertexShader(scope: PBFunctionScope): void;
4019
- applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
4020
- }
4021
-
4022
4217
  /**
4023
4218
  * Sprite material driven by a blueprint graph.
4024
4219
  *
@@ -4143,6 +4338,207 @@ declare class SpriteBlueprintMaterial extends SpriteMaterial {
4143
4338
  private getOutput;
4144
4339
  }
4145
4340
 
4341
+ /**
4342
+ * ToMixedTextureType
4343
+ *
4344
+ * @public
4345
+ */
4346
+ type ToMixedTextureType<T> = T extends [infer First, ...infer Rest] ? [First extends string ? ReturnType<typeof mixinTextureProps<First>> : never, ...ToMixedTextureType<Rest>] : [];
4347
+ /**
4348
+ * TextureMixinTypes
4349
+ *
4350
+ * @public
4351
+ */
4352
+ type TextureMixinTypes<T> = ReturnType<typeof applyMaterialMixins<ToMixedTextureType<T>, typeof MeshMaterial>>;
4353
+ /**
4354
+ * TextureMixinInstanceTypes
4355
+ *
4356
+ * @public
4357
+ */
4358
+ type TextureMixinInstanceTypes<T> = TextureMixinTypes<T> extends {
4359
+ new (...args: any[]): infer U;
4360
+ } ? U : never;
4361
+ /**
4362
+ * TextureProp
4363
+ *
4364
+ * @public
4365
+ */
4366
+ type TextureProp<U extends string> = {
4367
+ [P in 'Texture' | 'TextureSampler' | 'TexCoordIndex' | 'TexCoordMatrix' as `${U}${P}`]: P extends 'Texture' ? Nullable<Texture2D> : P extends 'TextureSampler' ? Nullable<TextureSampler> : P extends 'TexCoordIndex' ? number : P extends 'TexCoordMatrix' ? Nullable<Matrix4x4> : never;
4368
+ };
4369
+ /**
4370
+ * TexturePropUniforms
4371
+ *
4372
+ * @public
4373
+ */
4374
+ type TexturePropUniforms<U extends string> = {
4375
+ [P in 'TextureUniform' | 'TexCoord' as `get${Capitalize<U>}${P}`]: (scope: PBInsideFunctionScope) => PBShaderExp;
4376
+ } & {
4377
+ [P in 'Texture' as `sample${Capitalize<U>}${P}`]: (scope: PBInsideFunctionScope, texCoord?: PBShaderExp) => PBShaderExp;
4378
+ };
4379
+ /**
4380
+ * Texture property mixin
4381
+ * @param name - Texture name
4382
+ * @returns Texture mixin
4383
+ *
4384
+ * @public
4385
+ */
4386
+ declare function mixinTextureProps<U extends string>(name: U): <T extends typeof MeshMaterial>(BaseCls: T, vertex?: boolean) => T & (new (...args: any[]) => TextureProp<U> & TexturePropUniforms<U>);
4387
+
4388
+ /**
4389
+ * Interface for common PBR mixin
4390
+ *
4391
+ * @public
4392
+ */
4393
+ type IMixinPBRBRDF = {
4394
+ fresnelSchlick(scope: PBInsideFunctionScope, cosTheta: PBShaderExp, F0: PBShaderExp, F90: PBShaderExp): PBShaderExp;
4395
+ distributionGGX(scope: PBInsideFunctionScope, NdotH: PBShaderExp, alphaRoughness: PBShaderExp): PBShaderExp;
4396
+ visGGX(scope: PBInsideFunctionScope, NdotV: PBShaderExp, NdotL: PBShaderExp, alphaRoughness: PBShaderExp): PBShaderExp;
4397
+ };
4398
+
4399
+ /**
4400
+ * Interface for common PBR mixin
4401
+ *
4402
+ * @public
4403
+ */
4404
+ type IMixinPBRCommon = {
4405
+ ior: number;
4406
+ emissiveColor: Vector3;
4407
+ emissiveStrength: number;
4408
+ occlusionStrength: number;
4409
+ rectSpecularScale: number;
4410
+ transmission: boolean;
4411
+ transmissionFactor: number;
4412
+ thicknessFactor: number;
4413
+ attenuationColor: Vector3;
4414
+ attenuationDistance: number;
4415
+ sheen: boolean;
4416
+ sheenColorFactor: Vector3;
4417
+ sheenRoughnessFactor: number;
4418
+ clearcoat: boolean;
4419
+ clearcoatIntensity: number;
4420
+ clearcoatRoughnessFactor: number;
4421
+ iridescence: boolean;
4422
+ iridescenceFactor: number;
4423
+ iridescenceIor: number;
4424
+ iridescenceThicknessMin: number;
4425
+ iridescenceThicknessMax: number;
4426
+ getCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp): PBShaderExp;
4427
+ calculateCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp, data: PBShaderExp): void;
4428
+ getCommonDatasStruct(scope: PBInsideFunctionScope): ShaderTypeFunc;
4429
+ calculateEmissiveColor(scope: PBInsideFunctionScope): PBShaderExp;
4430
+ getF0(scope: PBInsideFunctionScope): PBShaderExp;
4431
+ getSheenAlbedoScaling(scope: PBInsideFunctionScope, Ndot: PBShaderExp, sheenColor: PBShaderExp, sheenRoughness: PBShaderExp): PBShaderExp;
4432
+ getSheenAlbedoScalingForDirect(scope: PBInsideFunctionScope, NoV: PBShaderExp, NoL: PBShaderExp, sheenColor: PBShaderExp, sheenRoughness: PBShaderExp): PBShaderExp;
4433
+ directLighting(scope: PBInsideFunctionScope, lightDir: PBShaderExp, lightColor: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, diffuseScale: PBShaderExp, specularScale: PBShaderExp, sourceRadiusFactor: PBShaderExp, outColor: PBShaderExp): void;
4434
+ directRectLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, posRange: PBShaderExp, axisX: PBShaderExp, axisY: PBShaderExp, colorIntensity: PBShaderExp, outColor: PBShaderExp): void;
4435
+ indirectLighting(scope: PBInsideFunctionScope, normal: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp, outRoughness?: PBShaderExp, outDiffuseColor?: PBShaderExp): void;
4436
+ } & TextureMixinInstanceTypes<[
4437
+ 'occlusion',
4438
+ 'emissive',
4439
+ 'sheenColor',
4440
+ 'sheenRoughness',
4441
+ 'clearcoatIntensity',
4442
+ 'clearcoatRoughness',
4443
+ 'clearcoatNormal',
4444
+ 'transmission',
4445
+ 'thickness',
4446
+ 'iridescence',
4447
+ 'iridescenceThickness'
4448
+ ]> & IMixinPBRBRDF;
4449
+ /**
4450
+ * PBR common stuff mixin
4451
+ * @param BaseCls - Class to mix in
4452
+ * @returns Mixed class
4453
+ *
4454
+ * @public
4455
+ */
4456
+ declare function mixinPBRCommon<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinPBRCommon);
4457
+
4458
+ /**
4459
+ * Interface for albedo color mixin
4460
+ * @public
4461
+ */
4462
+ type IMixinAlbedoColor = {
4463
+ albedoColor: Vector4;
4464
+ calculateAlbedoColor(scope: PBInsideFunctionScope, uv?: PBShaderExp): PBShaderExp;
4465
+ } & TextureMixinInstanceTypes<['albedo']>;
4466
+ /**
4467
+ * Albedo color mixin
4468
+ * @param BaseCls - Class to mix in
4469
+ * @returns Mixed class
4470
+ *
4471
+ * @public
4472
+ */
4473
+ declare function mixinAlbedoColor<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinAlbedoColor);
4474
+
4475
+ /**
4476
+ * Interface for light mixin
4477
+ * @public
4478
+ */
4479
+ type IMixinLight = {
4480
+ normalScale: number;
4481
+ normalMapMode: 'tangent-space' | 'object-space';
4482
+ doubleSidedLighting: boolean;
4483
+ needCalculateEnvLight(): boolean;
4484
+ getUniformNormalScale(scope: PBInsideFunctionScope): PBShaderExp;
4485
+ getEnvLightIrradiance(scope: PBInsideFunctionScope, normal: PBShaderExp): PBShaderExp;
4486
+ getEnvLightRadiance(scope: PBInsideFunctionScope, reflectVec: PBShaderExp, roughness: PBShaderExp): PBShaderExp;
4487
+ calculateViewVector(scope: PBInsideFunctionScope, worldPos: PBShaderExp): PBShaderExp;
4488
+ calculateReflectionVector(scope: PBInsideFunctionScope, normal: PBShaderExp, viewVec: PBShaderExp): PBShaderExp;
4489
+ calculateTBN(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal?: PBShaderExp, worldTangent?: PBShaderExp, worldBinormal?: PBShaderExp): PBShaderExp;
4490
+ calculateNormal(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal?: PBShaderExp, worldTangent?: PBShaderExp, worldBinormal?: PBShaderExp): PBShaderExp;
4491
+ calculateNormalAndTBN(scope: PBInsideFunctionScope, worldPos: PBShaderExp, worldNormal?: PBShaderExp, worldTangent?: PBShaderExp, worldBinormal?: PBShaderExp): PBShaderExp;
4492
+ calculateLightAttenuation(scope: PBInsideFunctionScope, type: PBShaderExp, worldPos: PBShaderExp, posRange: PBShaderExp, dirCutoff: PBShaderExp): PBShaderExp;
4493
+ calculateLightDirection(scope: PBInsideFunctionScope, type: PBShaderExp, worldPos: PBShaderExp, posRange: PBShaderExp, dirCutoff: PBShaderExp): PBShaderExp;
4494
+ calculateShadow(scope: PBInsideFunctionScope, worldPos: PBShaderExp, NoL: PBShaderExp): PBShaderExp;
4495
+ forEachLight(scope: PBInsideFunctionScope, callback: (this: PBInsideFunctionScope, type: PBShaderExp, posRange: PBShaderExp, dirCutoff: PBShaderExp, colorIntensity: PBShaderExp, extra: PBShaderExp, shadow: boolean) => void): void;
4496
+ } & TextureMixinInstanceTypes<['normal']> & IMixinAlbedoColor;
4497
+ /**
4498
+ * Light mixin
4499
+ * @param BaseCls - class to mix in
4500
+ * @returns Mixed class
4501
+ * @public
4502
+ */
4503
+ declare function mixinLight<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinLight);
4504
+
4505
+ /**
4506
+ * Reflection modes for PBRMetallicRoughness material
4507
+ * @public
4508
+ */
4509
+ type PBRReflectionMode = 'none' | 'ggx' | 'anisotropic' | 'glint';
4510
+ /**
4511
+ * Interface for PBRMetallicRoughness lighting model mixin
4512
+ * @public
4513
+ */
4514
+ type IMixinPBRMetallicRoughness = {
4515
+ metallic: number;
4516
+ roughness: number;
4517
+ specularFactor: Vector4;
4518
+ reflectionMode: PBRReflectionMode;
4519
+ anisotropy: number;
4520
+ anisotropyDirection: number;
4521
+ anisotropyDirectionScaleBias: Vector2;
4522
+ PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, albedo: PBShaderExp, TBN: PBShaderExp, outRoughness?: PBShaderExp, outSSSDiffuse?: PBShaderExp, outSSSTransmission?: PBShaderExp): PBShaderExp;
4523
+ calculateMetallic(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
4524
+ calculateRoughness(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
4525
+ calculateSpecularFactor(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp): PBShaderExp;
4526
+ calculateCommonData(scope: PBInsideFunctionScope, albedo: PBShaderExp, normal: PBShaderExp, viewVec: PBShaderExp, TBN: PBShaderExp, data: PBShaderExp): void;
4527
+ } & IMixinPBRCommon & IMixinLight & TextureMixinInstanceTypes<[
4528
+ 'metallicRoughness',
4529
+ 'occlusion',
4530
+ 'specular',
4531
+ 'specularColor',
4532
+ 'anisotropyDirection'
4533
+ ]>;
4534
+ /**
4535
+ * PBRMetallicRoughness lighting model mixin
4536
+ * @param BaseCls - Class to mix in
4537
+ * @returns Mixed class
4538
+ * @public
4539
+ */
4540
+ declare function mixinPBRMetallicRoughness<T extends typeof MeshMaterial>(BaseCls: T): T & (new (...args: any[]) => IMixinPBRMetallicRoughness);
4541
+
4146
4542
  /**
4147
4543
  * Interface for PBRSpecularGlossiness mixin
4148
4544
  * @public
@@ -4168,12 +4564,12 @@ declare function mixinPBRSpecularGlossness<T extends typeof MeshMaterial>(BaseCl
4168
4564
  * @public
4169
4565
  */
4170
4566
  type IMixinPBRBluePrint = {
4171
- PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outRoughness?: PBShaderExp): PBShaderExp;
4567
+ PBRLight(scope: PBInsideFunctionScope, worldPos: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, outRoughness?: PBShaderExp, outSSSDiffuse?: PBShaderExp): PBShaderExp;
4172
4568
  getCommonDatasStruct(scope: PBInsideFunctionScope): ShaderTypeFunc;
4173
4569
  getCommonData(scope: PBInsideFunctionScope, data: PBShaderExp, viewVec: PBShaderExp, worldPos: PBShaderExp, worldNorm: PBShaderExp, worldTangent: PBShaderExp, worldBinormal: PBShaderExp, vertexColor: PBShaderExp, vertexUV: PBShaderExp, ir: MaterialBlueprintIR): void;
4174
4570
  calculateCommonData(scope: PBInsideFunctionScope, ir: MaterialBlueprintIR, viewVec: PBShaderExp, worldPos: PBShaderExp, worldNorm: PBShaderExp, worldTangent: PBShaderExp, worldBinormal: PBShaderExp, vertexColor: PBShaderExp, vertexUV: PBShaderExp, data: PBShaderExp): void;
4175
- directLighting(scope: PBInsideFunctionScope, lightDir: PBShaderExp, lightColor: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, diffuseScale: PBShaderExp, specularScale: PBShaderExp, sourceRadiusFactor: PBShaderExp, outColor: PBShaderExp): void;
4176
- indirectLighting(scope: PBInsideFunctionScope, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp, outRoughness?: PBShaderExp): void;
4571
+ directLighting(scope: PBInsideFunctionScope, lightDir: PBShaderExp, lightColor: PBShaderExp, viewVec: PBShaderExp, commonData: PBShaderExp, diffuseScale: PBShaderExp, specularScale: PBShaderExp, sourceRadiusFactor: PBShaderExp, outColor: PBShaderExp, outDiffuseColor?: PBShaderExp): void;
4572
+ indirectLighting(scope: PBInsideFunctionScope, viewVec: PBShaderExp, commonData: PBShaderExp, outColor: PBShaderExp, outRoughness?: PBShaderExp, outDiffuseColor?: PBShaderExp): void;
4177
4573
  } & IMixinPBRBRDF & IMixinLight;
4178
4574
  /**
4179
4575
  * PBRBluePrint lighting model mixin
@@ -4371,6 +4767,12 @@ declare class RenderQueue extends Disposable {
4371
4767
  /** The sun light */
4372
4768
  get sunLight(): Nullable<DirectionalLight>;
4373
4769
  set sunLight(light: Nullable<DirectionalLight>);
4770
+ /** Primary directional light used by effects that need a main light direction. */
4771
+ get primaryDirectionalLight(): Nullable<DirectionalLight>;
4772
+ set primaryDirectionalLight(light: Nullable<DirectionalLight>);
4773
+ /** Primary punctual light used by thin-transmission effects when there is no main directional light. */
4774
+ get primaryTransmissionLight(): Nullable<PunctualLight>;
4775
+ set primaryTransmissionLight(light: Nullable<PunctualLight>);
4374
4776
  /** Whether this render queue has transparent objects to be drawn */
4375
4777
  get drawTransparent(): boolean;
4376
4778
  /** The render pass to which the render queue belongs */
@@ -4465,6 +4867,7 @@ declare abstract class RenderPass extends Disposable {
4465
4867
  * @returns The cull result
4466
4868
  */
4467
4869
  cullScene(ctx: DrawContext, cullCamera: Camera): RenderQueue;
4870
+ private shouldDisableRenderBundles;
4468
4871
  /**
4469
4872
  * Disposes the render pass
4470
4873
  */
@@ -5945,6 +6348,7 @@ declare class ABufferOIT extends Disposable implements OIT {
5945
6348
  private static _compositeProgram;
5946
6349
  private static _compositeBindGroup;
5947
6350
  private static _compositeRenderStates;
6351
+ private static _compositeAdditiveRenderStates;
5948
6352
  private static _ubAlignment;
5949
6353
  private _nodeBuffer;
5950
6354
  private _headStagingBuffer;
@@ -5958,6 +6362,7 @@ declare class ABufferOIT extends Disposable implements OIT {
5958
6362
  private _scissorHeight;
5959
6363
  private _currentPass;
5960
6364
  private _savedScissor;
6365
+ private _singleColorFramebuffer;
5961
6366
  /**
5962
6367
  * Creates an instance of ABufferOIT class
5963
6368
  *
@@ -6974,6 +7379,19 @@ interface RGTextureAllocator<TTexture = unknown, TFramebuffer = unknown> {
6974
7379
  * @param texture - The texture to release.
6975
7380
  */
6976
7381
  release(texture: TTexture): void;
7382
+ /**
7383
+ * Retain a texture allocated by this allocator so it can outlive the graph pass
7384
+ * that produced it.
7385
+ *
7386
+ * This is used when a graph-produced transient texture must be handed off to
7387
+ * an external owner, such as a cross-frame history resource. Executors still
7388
+ * release the graph's own reference at the resource's last use; the external
7389
+ * owner must later call {@link RGTextureAllocator.release} for the retained
7390
+ * reference.
7391
+ *
7392
+ * Allocators that cannot retain transient textures should leave this undefined.
7393
+ */
7394
+ retain?(texture: TTexture): void;
6977
7395
  /**
6978
7396
  * Allocate a temporary framebuffer matching the given descriptor.
6979
7397
  *
@@ -7118,52 +7536,6 @@ declare class RenderGraphExecutor<TTexture = unknown, TFramebuffer = unknown> {
7118
7536
  reset(): void;
7119
7537
  }
7120
7538
 
7121
- /**
7122
- * Bridges the render graph's {@link RGTextureAllocator} interface to the
7123
- * engine's device resource pool (`device.pool`).
7124
- *
7125
- * Transient textures are fetched from the pool on `allocate()` and
7126
- * returned to the pool on `release()`, enabling automatic reuse
7127
- * across frames without manual lifecycle management.
7128
- *
7129
- * Usage:
7130
- * ```ts
7131
- * const allocator = new DevicePoolAllocator();
7132
- * const executor = new RenderGraphExecutor(allocator, width, height);
7133
- * ```
7134
- *
7135
- * @public
7136
- */
7137
- declare class DevicePoolAllocator implements RGTextureAllocator<Texture2D, FrameBuffer> {
7138
- /**
7139
- * Allocate a transient texture from the device pool.
7140
- *
7141
- * @param desc - Texture descriptor from the render graph pass.
7142
- * @param size - Resolved pixel dimensions.
7143
- * @returns A pooled Texture2D instance.
7144
- */
7145
- allocate(desc: RGTextureDesc, size: RGResolvedSize): Texture2D;
7146
- /**
7147
- * Release a transient texture back to the device pool.
7148
- *
7149
- * @param texture - The texture to release.
7150
- */
7151
- release(texture: Texture2D): void;
7152
- /**
7153
- * Allocate a temporary framebuffer from the device pool.
7154
- *
7155
- * @param desc - Framebuffer descriptor from the render graph pass.
7156
- * @returns A pooled FrameBuffer instance.
7157
- */
7158
- allocateFramebuffer(desc: RGFramebufferDesc): FrameBuffer;
7159
- /**
7160
- * Release a temporary framebuffer back to the device pool.
7161
- *
7162
- * @param framebuffer - The framebuffer to release.
7163
- */
7164
- releaseFramebuffer(framebuffer: FrameBuffer): void;
7165
- }
7166
-
7167
7539
  /**
7168
7540
  * Manages cross-frame history resources that can be imported into a render graph.
7169
7541
  *
@@ -7192,6 +7564,7 @@ declare class HistoryResourceManager<TTexture = Texture2D> {
7192
7564
  private _pendingImports;
7193
7565
  private _pendingCommits;
7194
7566
  private _readScopeStack;
7567
+ private _frameActive;
7195
7568
  /**
7196
7569
  * Create a new history resource manager.
7197
7570
  *
@@ -7210,6 +7583,19 @@ declare class HistoryResourceManager<TTexture = Texture2D> {
7210
7583
  * @throws If no read scope is active for the resource.
7211
7584
  */
7212
7585
  getPrevious(name: string): TTexture;
7586
+ /**
7587
+ * Try to get a previous-frame texture from the current render graph read scope.
7588
+ *
7589
+ * Returns null when the resource was not imported for the current pass.
7590
+ *
7591
+ * @param name - Name of the history resource.
7592
+ * @returns The scoped previous-frame texture, or null.
7593
+ */
7594
+ tryGetPrevious(name: string): TTexture | null;
7595
+ /**
7596
+ * Whether this manager is currently collecting imports/commits for a graph frame.
7597
+ */
7598
+ get frameActive(): boolean;
7213
7599
  /**
7214
7600
  * Check whether a valid history resource exists and matches the descriptor.
7215
7601
  *
@@ -7279,6 +7665,34 @@ declare class HistoryResourceManager<TTexture = Texture2D> {
7279
7665
  * @param ownsTexture - Whether this manager should release the texture later.
7280
7666
  */
7281
7667
  queueCommit(name: string, desc: RGTextureDesc, size: RGResolvedSize, texture: TTexture, ownsTexture?: boolean): void;
7668
+ /**
7669
+ * Queue a graph-produced texture as a current-frame history write.
7670
+ *
7671
+ * The allocator must retain the texture before the graph executor releases its
7672
+ * transient reference. Use this from inside the pass that declares access to
7673
+ * the handle being committed.
7674
+ *
7675
+ * @param name - History resource name.
7676
+ * @param desc - Texture descriptor.
7677
+ * @param size - Resolved texture size.
7678
+ * @param ctx - Current render graph execute context.
7679
+ * @param handle - Graph texture handle to commit.
7680
+ * @returns The retained texture.
7681
+ */
7682
+ queueCommitFromGraph(name: string, desc: RGTextureDesc, size: RGResolvedSize, ctx: Pick<RGExecuteContext, 'getTexture'>, handle: RGHandle): TTexture;
7683
+ /**
7684
+ * Queue a texture after retaining it through the allocator.
7685
+ *
7686
+ * Use this for textures produced by the graph allocator. The manager owns the
7687
+ * retained reference and releases it when the history slot is overwritten,
7688
+ * discarded, or disposed.
7689
+ *
7690
+ * @param name - History resource name.
7691
+ * @param desc - Texture descriptor.
7692
+ * @param size - Resolved texture size.
7693
+ * @param texture - Texture to retain and commit.
7694
+ */
7695
+ queueRetainedCommit(name: string, desc: RGTextureDesc, size: RGResolvedSize, texture: TTexture): void;
7282
7696
  /**
7283
7697
  * Commit all current-frame history writes.
7284
7698
  */
@@ -7295,64 +7709,6 @@ declare class HistoryResourceManager<TTexture = Texture2D> {
7295
7709
  dispose(): void;
7296
7710
  }
7297
7711
 
7298
- /**
7299
- * Resource names for render graph history resources.
7300
- * @public
7301
- */
7302
- declare const RGHistoryResources: {
7303
- readonly TAA_COLOR: "taaColor";
7304
- readonly TAA_MOTION_VECTOR: "taaMotionVector";
7305
- };
7306
-
7307
- /**
7308
- * Options controlling which features are enabled in the forward+ pipeline.
7309
- *
7310
- * Derived from camera settings and device capabilities each frame.
7311
- *
7312
- * @public
7313
- */
7314
- interface ForwardPlusOptions {
7315
- /** Enable depth prepass (always true for now). */
7316
- depthPrepass: boolean;
7317
- /** Enable motion vectors (requires TAA or motionBlur). */
7318
- motionVectors: boolean;
7319
- /** Enable Hi-Z pyramid (for SSR ray tracing). */
7320
- hiZ: boolean;
7321
- /** Enable screen-space reflections. */
7322
- ssr: boolean;
7323
- /** Whether to compute SSR thickness. */
7324
- ssrCalcThickness: boolean;
7325
- /** Whether GPU picking is requested this frame. */
7326
- gpuPicking: boolean;
7327
- /** Whether transmission/refraction materials are present. */
7328
- needSceneColor: boolean;
7329
- }
7330
- /**
7331
- * Constructs a render graph representing the forward+ pipeline.
7332
- *
7333
- * Each step in the existing `SceneRenderer._renderScene` becomes a graph pass.
7334
- * Execute callbacks delegate to the existing rendering code, sharing a mutable
7335
- * `FrameState`.
7336
- *
7337
- * @param graph - The render graph to populate.
7338
- * @param ctx - The draw context for this frame.
7339
- * @param renderQueue - The culled render queue.
7340
- * @param options - Pipeline feature toggles.
7341
- * @returns The backbuffer handle (graph output).
7342
- *
7343
- * @public
7344
- */
7345
- declare function buildForwardPlusGraph(graph: RenderGraph, ctx: DrawContext, renderQueue: RenderQueue, options: ForwardPlusOptions): RGHandle;
7346
- /**
7347
- * Build, compile, and execute the forward+ pipeline as a render graph.
7348
- *
7349
- * This is the drop-in replacement for `SceneRenderer._renderScene`.
7350
- *
7351
- * @param ctx - The draw context for this frame.
7352
- * @public
7353
- */
7354
- declare function executeForwardPlusGraph(ctx: DrawContext): void;
7355
-
7356
7712
  /**
7357
7713
  * Rendering layer of post processing effects
7358
7714
  * @public
@@ -7802,11 +8158,47 @@ type PickResult = {
7802
8158
  target: PickTarget;
7803
8159
  };
7804
8160
  /**
7805
- * Camera OIT mode
8161
+ * Temporal history resources used by reprojection (TAA, motion blur).
7806
8162
  *
7807
8163
  * @public
7808
8164
  */
8165
+ type CameraHistoryData = {
8166
+ prevColorTex: Nullable<BaseTexture>;
8167
+ prevMotionVectorTex: Nullable<BaseTexture>;
8168
+ prevSSRReflectTex: Nullable<BaseTexture>;
8169
+ prevSSRMotionVectorTex: Nullable<BaseTexture>;
8170
+ };
8171
+ /**
8172
+ * Camera render path mode.
8173
+ * @public
8174
+ */
8175
+ type RenderPath = 'forward';
8176
+ /**
8177
+ * Camera Order-Independent Transparency mode.
8178
+ * @public
8179
+ */
7809
8180
  type CameraOITMode = 'none' | 'weighted' | 'abuffer';
8181
+ /**
8182
+ * Subsurface Scattering debug visualization modes (implementation-defined).
8183
+ * @public
8184
+ */
8185
+ type SSSDebugView = 'none' | 'scatter_mask' | 'scatter_softness' | 'scatter_radius' | 'scatter_falloff' | 'profile_energy' | 'profile_transmission' | 'profile_boundary' | 'diffuse' | 'blur' | 'screen_thinness' | 'thin_transmission_mask' | 'thin_lighting' | 'transmission_shadow';
8186
+ /**
8187
+ * Subsurface Scattering quality presets that resolve multiple internal settings for convenience.
8188
+ * @public
8189
+ */
8190
+ type SSSQualityPreset = 'quality' | 'balanced' | 'performance';
8191
+ /**
8192
+ * Resolved Subsurface Scattering settings after applying the quality preset. These are the actual settings used by the SSS post effect.
8193
+ * @public
8194
+ */
8195
+ type SSSResolvedSettings = {
8196
+ halfRes: boolean;
8197
+ blurKernelSize: number;
8198
+ blurStdDev: number;
8199
+ blurDepthCutoff: number;
8200
+ normalCutoff: number;
8201
+ };
7810
8202
  /**
7811
8203
  * A renderable camera node that manages view/projection math, frusta,
7812
8204
  * input control, picking, and a post-processing chain via a compositor.
@@ -7815,7 +8207,7 @@ type CameraOITMode = 'none' | 'weighted' | 'abuffer';
7815
8207
  * - Maintains projection, view, VP, and inverse VP matrices and lazily recomputes them when invalidated.
7816
8208
  * - Provides world- and view-space frusta for culling and clipping.
7817
8209
  * - Supports perspective and orthographic projections.
7818
- * - Integrates with post effects (Tonemap, FXAA, TAA, Bloom, SSR, SSAO, Motion Blur) through an internal `Compositor`.
8210
+ * - Integrates with post effects (Tonemap, FXAA, TAA, Bloom, SSR, SSS, SSAO, Motion Blur) through an internal `Compositor`.
7819
8211
  * - Handles temporal jitter and history state when TAA or motion blur are enabled.
7820
8212
  * - Emits picking rays from screen coordinates and supports async GPU picking.
7821
8213
  * - Optional controller integration for user input handling.
@@ -7868,6 +8260,11 @@ declare class Camera extends SceneNode {
7868
8260
  */
7869
8261
  get HiZ(): boolean;
7870
8262
  set HiZ(val: boolean);
8263
+ /**
8264
+ * Render path used by the scene renderer.
8265
+ */
8266
+ get renderPath(): RenderPath;
8267
+ set renderPath(_val: RenderPath);
7871
8268
  /**
7872
8269
  * Whether HDR backbuffer is enabled.
7873
8270
  *
@@ -7953,6 +8350,11 @@ declare class Camera extends SceneNode {
7953
8350
  */
7954
8351
  get TAADebug(): number;
7955
8352
  set TAADebug(val: number);
8353
+ /**
8354
+ * Enables cascade debug visualization for directional shadows.
8355
+ */
8356
+ get shadowDebugCascades(): boolean;
8357
+ set shadowDebugCascades(val: boolean);
7956
8358
  /**
7957
8359
  * Gets whether Screen Space Reflections (SSR) is enabled.
7958
8360
  */
@@ -8024,6 +8426,50 @@ declare class Camera extends SceneNode {
8024
8426
  */
8025
8427
  get ssrBlurStdDev(): number;
8026
8428
  set ssrBlurStdDev(val: number);
8429
+ /**
8430
+ * Gets whether SSR temporal accumulation is enabled.
8431
+ */
8432
+ get ssrTemporal(): boolean;
8433
+ set ssrTemporal(val: boolean);
8434
+ /**
8435
+ * Gets SSR temporal blending weight in [0, 1].
8436
+ * Higher values rely more on reprojected history.
8437
+ */
8438
+ get ssrTemporalWeight(): number;
8439
+ set ssrTemporalWeight(val: number);
8440
+ /**
8441
+ * Gets whether Screen Space Subsurface Scattering (SSS) is enabled.
8442
+ */
8443
+ get SSS(): boolean;
8444
+ set SSS(val: boolean);
8445
+ /** Global blur scale for screen-space SSS. */
8446
+ get sssBlurScale(): number;
8447
+ set sssBlurScale(val: number);
8448
+ /**
8449
+ * High-level quality preset for SSS blur controls.
8450
+ *
8451
+ * This is the primary user-facing SSS quality control and only affects
8452
+ * the blur sampling quality/performance tradeoff, not the authored look.
8453
+ */
8454
+ get sssQualityPreset(): SSSQualityPreset;
8455
+ set sssQualityPreset(val: SSSQualityPreset);
8456
+ /** Final SSS composite strength. */
8457
+ get sssStrength(): number;
8458
+ set sssStrength(val: number);
8459
+ /** Thin-shell transmission strength. */
8460
+ get sssTransmissionStrength(): number;
8461
+ set sssTransmissionStrength(val: number);
8462
+ /** Thin-shell transmission exponent. */
8463
+ get sssTransmissionPower(): number;
8464
+ set sssTransmissionPower(val: number);
8465
+ /** Multi-scatter energy compensation factor. */
8466
+ get sssMultiScatter(): number;
8467
+ set sssMultiScatter(val: number);
8468
+ /** Resolved SSS blur settings after applying the quality preset. */
8469
+ get sssResolvedSettings(): Readonly<SSSResolvedSettings>;
8470
+ /** Debug visualization for screen-space SSS buffers. */
8471
+ get sssDebugView(): SSSDebugView;
8472
+ set sssDebugView(val: SSSDebugView);
8027
8473
  /**
8028
8474
  * Gets whether SSAO is enabled.
8029
8475
  */
@@ -8050,7 +8496,7 @@ declare class Camera extends SceneNode {
8050
8496
  /** Whether to allow command buffer reuse optimization */
8051
8497
  get commandBufferReuse(): boolean;
8052
8498
  set commandBufferReuse(val: boolean);
8053
- /** Whether this camera is adapted to screen settings */
8499
+ /** Whether this camera is adapted to screen settins */
8054
8500
  get adapted(): boolean;
8055
8501
  set adapted(val: boolean);
8056
8502
  /** OIT */
@@ -8094,11 +8540,9 @@ declare class Camera extends SceneNode {
8094
8540
  *
8095
8541
  * @param x - The x-component of the screen coordinates, relative to the top-left corner of the viewport.
8096
8542
  * @param y - The y-component of the screen coordinates, relative to the top-left corner of the viewport.
8097
- * @param viewportWidth - Optional width of the viewport for normalizing screen coordinates. If not provided, it will be derived from the camera's viewport or the device's viewport.
8098
- * @param viewportHeight - Optional height of the viewport for normalizing screen coordinates. If not provided, it will be derived from the camera's viewport or the device's viewport.
8099
8543
  * @returns The ray originating from the camera position and passing through the given screen coordinates.
8100
8544
  */
8101
- constructRay(x: number, y: number, viewportWidth?: number, viewportHeight?: number): Ray;
8545
+ constructRay(x: number, y: number): Ray;
8102
8546
  /**
8103
8547
  * Place the camera by specifying the camera position and the target point
8104
8548
  * @param eye - The camera position
@@ -8188,14 +8632,16 @@ declare class Camera extends SceneNode {
8188
8632
  /** Returns true if the camera is orthographic */
8189
8633
  isOrtho(): boolean;
8190
8634
  /**
8191
- * Gets the camera history resource manager for temporal effects
8192
- * @returns History resource manager
8635
+ * Gets the camera history data which is used in temporal reprojection
8636
+ * @returns Camera history data
8193
8637
  */
8194
- getHistoryResourceManager(): Nullable<HistoryResourceManager>;
8638
+ getHistoryData(): CameraHistoryData;
8195
8639
  /**
8196
8640
  * Clears the camera history data which is used in temporal reprojection
8197
8641
  */
8198
8642
  clearHistoryData(): void;
8643
+ private static resolveSSSQualityPreset;
8644
+ private updateSSSResolvedSettings;
8199
8645
  /**
8200
8646
  * Renders a scene
8201
8647
  * @param scene - The scene to be rendered
@@ -8211,6 +8657,10 @@ declare class Camera extends SceneNode {
8211
8657
  * Reset the controller
8212
8658
  */
8213
8659
  resetController(): void;
8660
+ /**
8661
+ * Gets the camera history resource manager for temporal effects.
8662
+ */
8663
+ getHistoryResourceManager(): Nullable<HistoryResourceManager>;
8214
8664
  /** {@inheritdoc SceneNode.onDispose} */
8215
8665
  protected onDispose(): void;
8216
8666
  }
@@ -8231,9 +8681,13 @@ declare class EnvLightWrapper extends Disposable {
8231
8681
  private readonly _irradianceSHFB;
8232
8682
  private readonly _irradianceWindow;
8233
8683
  private _strength;
8684
+ private _specularStrength;
8234
8685
  /** The strength of environment lighting */
8235
8686
  get strength(): number;
8236
8687
  set strength(val: number);
8688
+ /** The strength of environment specular lighting */
8689
+ get specularStrength(): number;
8690
+ set specularStrength(val: number);
8237
8691
  /** Ambient light color for environment light type constant */
8238
8692
  get ambientColor(): Vector4;
8239
8693
  set ambientColor(val: Vector4);
@@ -8541,17 +8995,6 @@ type PickTarget = {
8541
8995
  node: SceneNode;
8542
8996
  label?: string;
8543
8997
  };
8544
- /**
8545
- * Minimal render context carrying target size and device information.
8546
- *
8547
- * @public
8548
- */
8549
- declare class RenderContext {
8550
- device: AbstractDevice;
8551
- renderWidth: number;
8552
- renderHeight: number;
8553
- constructor(_camera: Camera, w: number, h: number);
8554
- }
8555
8998
  /**
8556
8999
  * Context object passed to draw calls and render helpers.
8557
9000
  *
@@ -8605,6 +9048,8 @@ interface DrawContext {
8605
9048
  depthTexture?: Texture2D;
8606
9049
  /** Linearized depth texture bound for sampling. */
8607
9050
  linearDepthTexture?: Texture2D;
9051
+ /** Depth attachment populated by the scene depth prepass, when current target reuses it. */
9052
+ depthPrepassAttachment?: Texture2D;
8608
9053
  /** Scene color texture bound for sampling (previous pass or resolved color). */
8609
9054
  sceneColorTexture?: Texture2D;
8610
9055
  /** Default depth buffer format for targets created in this pass. */
@@ -8617,6 +9062,10 @@ interface DrawContext {
8617
9062
  compositor?: Nullable<Compositor>;
8618
9063
  /** Sun/directional light reference for passes that need it. */
8619
9064
  sunLight?: Nullable<DirectionalLight>;
9065
+ /** Primary directional light fallback when no explicit sun light is marked. */
9066
+ primaryDirectionalLight?: Nullable<DirectionalLight>;
9067
+ /** Primary punctual light fallback used by effects that need a representative thin-transmission light. */
9068
+ primaryTransmissionLight?: Nullable<PunctualLight>;
8620
9069
  /** Clustered light index/structure for lighting in forward+, clustered shading, etc. */
8621
9070
  clusteredLight?: ClusteredLight;
8622
9071
  /** Material varying bit flags that influence shader selection. */
@@ -8627,12 +9076,26 @@ interface DrawContext {
8627
9076
  forceColorState?: Nullable<ColorState>;
8628
9077
  /** Screen-space reflections are active this frame/pass. */
8629
9078
  readonly SSR: boolean;
9079
+ /** Screen-space subsurface scattering is active this frame/pass. */
9080
+ SSS: boolean;
8630
9081
  /** Whether SSR thickness should be computed dynamically in this pass. */
8631
9082
  SSRCalcThickness: boolean;
8632
9083
  /** SSR roughness input texture. */
8633
- SSRRoughnessTexture: Texture2D;
9084
+ SSRRoughnessTexture: Nullable<Texture2D>;
8634
9085
  /** SSR normal input texture (usually view-space or world-space normals). */
8635
- SSRNormalTexture: Texture2D;
9086
+ SSRNormalTexture: Nullable<Texture2D>;
9087
+ /** SSS profile texture (rgb = scatter strength, a = transmission mask). */
9088
+ SSSProfileTexture: Nullable<Texture2D>;
9089
+ /** SSS param texture (r = normalized profile slot, g = blur width). */
9090
+ SSSParamTexture: Nullable<Texture2D>;
9091
+ /** SSS diffuse-lighting texture used so scattering can preserve specular detail. */
9092
+ SSSDiffuseTexture: Nullable<Texture2D>;
9093
+ /** SSS transmission-lighting texture used for thin-shell/backscatter contributions. */
9094
+ SSSTransmissionTexture: Nullable<Texture2D>;
9095
+ /** SSR SDF proxy uniform buffer (pair of vec4: min.xyz / max.xyz for each box). */
9096
+ ssrSDFBoxBuffer: Nullable<GPUDataBuffer>;
9097
+ /** Number of valid SDF proxy boxes in `ssrSDFBoxBuffer`. */
9098
+ ssrSDFBoxCount: number;
8636
9099
  /** Final framebuffer target where the last stage renders. */
8637
9100
  finalFramebuffer: Nullable<FrameBuffer>;
8638
9101
  /** Intermediate framebuffer used by the compositor or multi-pass pipelines. */
@@ -8666,6 +9129,8 @@ type MorphInfo = {
8666
9129
  * @public
8667
9130
  */
8668
9131
  interface Drawable {
9132
+ /** Gets the display name of the drawable object (for debugging/UI). */
9133
+ getName(): string;
8669
9134
  /** Unique, stable identifier for the drawable, used in caches and picking. */
8670
9135
  getDrawableId(): number;
8671
9136
  /** Returns the owning scene node (transform and hierarchy). */
@@ -8705,7 +9170,7 @@ interface Drawable {
8705
9170
  /**
8706
9171
  * Pushes a reference to the current render queue for cleanup or back-references.
8707
9172
  *
8708
- * Useful for batching or deferred state application.
9173
+ * Useful for batching or delayed state application.
8709
9174
  */
8710
9175
  pushRenderQueueRef(ref: RenderQueueRef): void;
8711
9176
  /**
@@ -8954,6 +9419,7 @@ type SkeletonBindPose = {
8954
9419
  type SkeletonRigOptions = {
8955
9420
  rootJoint?: Nullable<SceneNode>;
8956
9421
  rootBindPose?: SkeletonBindPose;
9422
+ humanoidJointMapping?: Nullable<HumanoidJointMapping<SceneNode>>;
8957
9423
  };
8958
9424
  /**
8959
9425
  * Shared joint rig for skeletal animation.
@@ -10099,13 +10565,13 @@ declare function mixGeometryCacheBoundingBox(a: BoundingBox, b: BoundingBox, t:
10099
10565
  *
10100
10566
  * @public
10101
10567
  */
10102
- declare function ensureGeometryCacheMeshBinding(meshBindings: WeakMap<Mesh, GeometryCacheMeshBinding>, mesh: Mesh, state: GeometryCacheState, errorPrefix: string): GeometryCacheMeshBinding;
10568
+ declare function ensureGeometryCacheMeshBinding(meshBindings: WeakMap<Mesh$1, GeometryCacheMeshBinding>, mesh: Mesh$1, state: GeometryCacheState, errorPrefix: string): GeometryCacheMeshBinding;
10103
10569
  /**
10104
10570
  * Restores a mesh primitive after geometry cache playback.
10105
10571
  *
10106
10572
  * @public
10107
10573
  */
10108
- declare function restoreGeometryCacheMeshBinding(mesh: Mesh): Promise<boolean>;
10574
+ declare function restoreGeometryCacheMeshBinding(mesh: Mesh$1): Promise<boolean>;
10109
10575
 
10110
10576
  /** @public */
10111
10577
  type FixedGeometryCacheFrame = GeometryCacheFrame;
@@ -12351,7 +12817,7 @@ interface SimulationParams {
12351
12817
  rootPosition: Vector3;
12352
12818
  /** Previous frame's root bone world position (for root motion limiting) */
12353
12819
  previousRootPosition: Vector3;
12354
- /** Max root slide distance per substep. -1 = no limit */
12820
+ /** Max world-space root slide distance retained after root motion. -1 = no limit */
12355
12821
  rootSlideLimit: number;
12356
12822
  /** Current root bone world rotation */
12357
12823
  rootRotation: Quaternion;
@@ -12409,7 +12875,7 @@ interface ApplyResultOutput {
12409
12875
  *
12410
12876
  * @public
12411
12877
  */
12412
- declare function applyResult(pointsR: readonly PointR[], pointsRW: PointRW[], positionsToTransform: readonly Vector3[], blendRatio: number, transformRotations: readonly Quaternion[], transformLocalRotations: readonly Quaternion[], preserveTwist: boolean): ApplyResultOutput[];
12878
+ declare function applyResult(pointsR: readonly PointR[], pointsRW: PointRW[], positionsToTransform: readonly Vector3[], blendRatio: number, transformRotations: readonly Quaternion[], transformLocalRotations: readonly Quaternion[], preserveTwist: boolean, sceneParentRotations?: readonly (Quaternion | undefined)[]): ApplyResultOutput[];
12413
12879
  /**
12414
12880
  * Applies post-simulation angle limits to the point state.
12415
12881
  *
@@ -12535,7 +13001,7 @@ interface ControllerConfig {
12535
13001
  relaxation: number;
12536
13002
  /** Number of simulation substeps per frame. Higher = more stable at cost of performance */
12537
13003
  subSteps: number;
12538
- /** Max root bone slide distance per substep. Excess is distributed as offset. -1 = unlimited */
13004
+ /** Max system-local root slide distance retained after root motion. Excess is applied to physics state. -1 = unlimited */
12539
13005
  rootSlideLimit: number;
12540
13006
  /** Max root bone rotation angle (degrees) per substep. Excess is distributed. -1 = unlimited */
12541
13007
  rootRotateLimit: number;
@@ -12664,6 +13130,7 @@ declare class JointDynamicsSystemController {
12664
13130
  private _colliderHandleToIndex;
12665
13131
  private _flatPlaneHandleToIndex;
12666
13132
  private _grabberHandleToIndex;
13133
+ private _lastOutputLocalRotations;
12667
13134
  private _baseSystemScale;
12668
13135
  private _currentSystemScale;
12669
13136
  private _basePointParentLengths;
@@ -12750,15 +13217,15 @@ declare class JointDynamicsSystemController {
12750
13217
  */
12751
13218
  updateConfig(config: ControllerConfigUpdate): void;
12752
13219
  /**
12753
- * Compensates for teleportation by resetting the previous root transform to the current one.
12754
- * Call this after a character warp or teleport to avoid a large root-motion impulse on the
12755
- * next simulation step.
13220
+ * Resets all physics state after teleportation.
13221
+ * @deprecated Use {@link JointDynamicsSystemController.reset}. This method is kept as a compatibility alias.
12756
13222
  */
12757
13223
  warp(): void;
12758
13224
  /**
12759
13225
  * Resets all physics state.
12760
- * Each simulated point is snapped back to the current transform position and grab state
12761
- * is cleared.
13226
+ * Simulated points, transform history, root-motion history, grab state and wave phase are
13227
+ * snapped back to the current scene transforms. Runtime configuration and fixed/released
13228
+ * point weights are preserved.
12762
13229
  */
12763
13230
  reset(): void;
12764
13231
  /**
@@ -12941,6 +13408,9 @@ declare class JointDynamicsSystemController {
12941
13408
  private _rebuildGrabberHandleMap;
12942
13409
  private _rebuildConstraints;
12943
13410
  private _getSystemUniformScale;
13411
+ private _getSceneParentWorldRotation;
13412
+ private _clearOutputTransformCache;
13413
+ private _getInputLocalRotations;
12944
13414
  private _updateScaleDependentParameters;
12945
13415
  private _refreshPointParameters;
12946
13416
  private _createPointR;
@@ -13225,6 +13695,9 @@ declare class JointDynamicsModifier extends SkeletonModifier {
13225
13695
  * Reset the spring system to initial state.
13226
13696
  */
13227
13697
  reset(): void;
13698
+ /**
13699
+ * @deprecated Use {@link JointDynamicsModifier.reset}. Kept as a compatibility alias for teleport handling.
13700
+ */
13228
13701
  warp(): void;
13229
13702
  protected _getWeight(): number;
13230
13703
  protected _setWeight(value: number): void;
@@ -13257,7 +13730,7 @@ declare const MeshBase: typeof GraphNode & _zephyr3d_base.GenericConstructor<{
13257
13730
  * Mesh node
13258
13731
  * @public
13259
13732
  */
13260
- declare class Mesh extends MeshBase implements BatchDrawable {
13733
+ declare class Mesh$1 extends MeshBase implements BatchDrawable {
13261
13734
  /**
13262
13735
  * Creates an instance of mesh node
13263
13736
  * @param scene - The scene to which the mesh node belongs
@@ -13276,6 +13749,8 @@ declare class Mesh extends MeshBase implements BatchDrawable {
13276
13749
  */
13277
13750
  getPickTarget(): PickTarget;
13278
13751
  setPickTarget(node: SceneNode, label?: string): void;
13752
+ get useRenderBundle(): boolean;
13753
+ set useRenderBundle(val: boolean);
13279
13754
  get skeletonName(): string;
13280
13755
  set skeletonName(name: string);
13281
13756
  get skinBindingName(): string;
@@ -13292,7 +13767,7 @@ declare class Mesh extends MeshBase implements BatchDrawable {
13292
13767
  /**
13293
13768
  * {@inheritDoc SceneNode.isMesh}
13294
13769
  */
13295
- isMesh(): this is Mesh;
13770
+ isMesh(): this is Mesh$1;
13296
13771
  /**
13297
13772
  * Sets the bounding box for animation
13298
13773
  * @param bbox - The bounding box for animation
@@ -13665,6 +14140,151 @@ declare class ParticleSystem extends ParticleSystem_base implements Drawable {
13665
14140
  onDispose(): void;
13666
14141
  }
13667
14142
 
14143
+ interface BaseModule {
14144
+ Mesh: new() => Mesh;
14145
+
14146
+ DracoFloat32Array: new() => DracoFloat32Array;
14147
+ DracoInt8Array: new() => DracoInt8Array;
14148
+ DracoInt16Array: new() => DracoInt16Array;
14149
+ DracoInt32Array: new() => DracoInt32Array;
14150
+ DracoUInt8Array: new() => DracoUInt8Array;
14151
+ DracoUInt16Array: new() => DracoUInt16Array;
14152
+ DracoUInt32Array: new() => DracoUInt32Array;
14153
+
14154
+ POSITION: GeometryAttributeType;
14155
+ NORMAL: GeometryAttributeType;
14156
+ TEX_COORD: GeometryAttributeType;
14157
+ COLOR: GeometryAttributeType;
14158
+ GENERIC: GeometryAttributeType;
14159
+ INVALID: GeometryAttributeType;
14160
+
14161
+ _malloc(ptr: number): number;
14162
+ _free(ptr: number): void;
14163
+ destroy(object: unknown): void;
14164
+
14165
+ // Heap.
14166
+ HEAPF32: Float32Array;
14167
+ HEAP32: Int32Array;
14168
+ HEAP16: Int16Array;
14169
+ HEAP8: Int8Array;
14170
+ HEAPU32: Uint32Array;
14171
+ HEAPU16: Uint16Array;
14172
+ HEAPU8: Uint8Array;
14173
+ }
14174
+
14175
+ interface DecoderModule extends BaseModule {
14176
+ Decoder: new() => Decoder;
14177
+ DecoderBuffer: new() => DecoderBuffer;
14178
+ PointCloud: new() => PointCloud;
14179
+ MetadataQuerier: new() => MetadataQuerier;
14180
+
14181
+ // GeometryType.
14182
+ TRIANGULAR_MESH: GeometryType;
14183
+ POINT_CLOUD: GeometryType;
14184
+
14185
+ // DataType.
14186
+ DT_FLOAT32: DataType;
14187
+ DT_INT8: DataType;
14188
+ DT_INT16: DataType;
14189
+ DT_INT32: DataType;
14190
+ DT_UINT8: DataType;
14191
+ DT_UINT16: DataType;
14192
+ DT_UINT32: DataType;
14193
+ }
14194
+
14195
+ interface Decoder {
14196
+ DecodeBufferToMesh(buffer: DecoderBuffer, mesh: Mesh): Status;
14197
+ DecodeBufferToPointCloud(buffer: DecoderBuffer, pointCloud: PointCloud): Status;
14198
+ GetAttributeByUniqueId(pointCloud: PointCloud, id: number): Attribute;
14199
+ GetFaceFromMesh(mesh: Mesh, index: number, array: DracoArray): number;
14200
+ GetTrianglesUInt16Array(mesh: Mesh, byteLength: number, ptr: number): void;
14201
+ GetTrianglesUInt32Array(mesh: Mesh, byteLength: number, ptr: number): void;
14202
+ GetAttributeDataArrayForAllPoints: (
14203
+ pointCloud: PointCloud,
14204
+ attribute: Attribute,
14205
+ type: DataType,
14206
+ byteLength: number,
14207
+ ptr: number,
14208
+ ) => void;
14209
+ GetAttributeFloatForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
14210
+ GetAttributeInt8ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
14211
+ GetAttributeInt16ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
14212
+ GetAttributeInt32ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
14213
+ GetAttributeUInt8ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
14214
+ GetAttributeUInt16ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
14215
+ GetAttributeUInt32ForAllPoints(pointCloud: PointCloud, attribute: Attribute, array: DracoArray): void;
14216
+ GetEncodedGeometryType(buffer: DecoderBuffer): GeometryType;
14217
+ GetAttributeId(pointCloud: PointCloud, attributeType: number): number;
14218
+ GetAttributeIdByName(pointCloud: PointCloud, name: string): number;
14219
+ GetAttribute(pointCloud: PointCloud, id: number): Attribute;
14220
+ GetMetadata(pointCloud: PointCloud): Metadata;
14221
+ GetAttributeMetadata(pointCloud: PointCloud, attributeId: number): Metadata;
14222
+ }
14223
+
14224
+ interface DecoderBuffer {
14225
+ Init(array: Int8Array, byteLength: number): void;
14226
+ }
14227
+
14228
+ interface DracoArray {
14229
+ GetValue(index: number): number;
14230
+ }
14231
+
14232
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14233
+ interface DracoFloat32Array extends DracoArray {}
14234
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14235
+ interface DracoInt8Array extends DracoArray {}
14236
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14237
+ interface DracoInt16Array extends DracoArray {}
14238
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14239
+ interface DracoInt32Array extends DracoArray {}
14240
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14241
+ interface DracoUInt8Array extends DracoArray {}
14242
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14243
+ interface DracoUInt16Array extends DracoArray {}
14244
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14245
+ interface DracoUInt32Array extends DracoArray {}
14246
+
14247
+ interface Status {
14248
+ ok(): boolean;
14249
+ error_msg(): string;
14250
+ }
14251
+
14252
+ interface Attribute {
14253
+ num_components(): number;
14254
+ }
14255
+
14256
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14257
+ declare enum GeometryType {}
14258
+
14259
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14260
+ declare enum GeometryAttributeType {}
14261
+
14262
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14263
+ declare enum DataType {}
14264
+
14265
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
14266
+ interface Metadata {}
14267
+
14268
+ interface MetadataQuerier {
14269
+ HasEntry(metadata: Metadata, entryName: string): boolean;
14270
+ GetIntEntry(metadata: Metadata, entryName: string): number;
14271
+ GetIntEntryArray(metadata: Metadata, entryName: string, outValues: DracoInt32Array): void;
14272
+ GetDoubleEntry(metadata: Metadata, entryName: string): number;
14273
+ GetStringEntry(metadata: Metadata, entryName: string): string;
14274
+ NumEntries(metadata: Metadata): number;
14275
+ GetEntryName(metadata: Metadata, entryId: number): string;
14276
+ }
14277
+
14278
+ interface PointCloud {
14279
+ ptr: number;
14280
+ num_attributes(): number;
14281
+ num_points(): number;
14282
+ }
14283
+
14284
+ interface Mesh extends PointCloud {
14285
+ num_faces(): number;
14286
+ }
14287
+
13668
14288
  /**
13669
14289
  * Named object interface for model loading
13670
14290
  * @public
@@ -13693,6 +14313,7 @@ interface AssetSamplerInfo {
13693
14313
  * @public
13694
14314
  */
13695
14315
  interface AssetImageInfo {
14316
+ name?: string;
13696
14317
  uri?: string;
13697
14318
  data?: Uint8Array<ArrayBuffer>;
13698
14319
  mimeType?: string;
@@ -13710,6 +14331,7 @@ interface AssetVertexBufferInfo {
13710
14331
  * @public
13711
14332
  */
13712
14333
  interface AssetPrimitiveInfo {
14334
+ name?: string;
13713
14335
  vertices: Record<VertexSemantic, {
13714
14336
  format: VertexAttribFormat;
13715
14337
  data: TypedArray;
@@ -13726,6 +14348,7 @@ interface AssetPrimitiveInfo {
13726
14348
  * @public
13727
14349
  */
13728
14350
  interface AssetTextureInfo {
14351
+ name?: string;
13729
14352
  image: Nullable<AssetImageInfo>;
13730
14353
  sRGB?: boolean;
13731
14354
  sampler: Nullable<AssetSamplerInfo>;
@@ -13766,6 +14389,7 @@ interface AssetMaterialCommon {
13766
14389
  * @public
13767
14390
  */
13768
14391
  interface AssetMaterial {
14392
+ name?: string;
13769
14393
  type: string;
13770
14394
  common: AssetMaterialCommon;
13771
14395
  path?: string;
@@ -13779,6 +14403,38 @@ interface AssetUnlitMaterial extends AssetMaterial {
13779
14403
  diffuseMap?: AssetTextureInfo;
13780
14404
  diffuse?: Vector4;
13781
14405
  }
14406
+ /**
14407
+ * MToon related material properties for model loading
14408
+ * @public
14409
+ */
14410
+ interface AssetMToonMaterial extends AssetUnlitMaterial {
14411
+ shadeColorFactor?: Vector3;
14412
+ shadeMultiplyMap?: AssetTextureInfo;
14413
+ shadingShiftFactor?: number;
14414
+ shadingShiftMap?: AssetTextureInfo;
14415
+ shadingShiftTextureScale?: number;
14416
+ shadingToonyFactor?: number;
14417
+ giEqualizationFactor?: number;
14418
+ matcapFactor?: Vector3;
14419
+ matcapMap?: AssetTextureInfo;
14420
+ parametricRimColorFactor?: Vector3;
14421
+ parametricRimFresnelPowerFactor?: number;
14422
+ parametricRimLiftFactor?: number;
14423
+ rimMultiplyMap?: AssetTextureInfo;
14424
+ rimLightingMixFactor?: number;
14425
+ outlineWidthMode?: MToonOutlineWidthMode;
14426
+ outlineWidthFactor?: number;
14427
+ outlineWidthMultiplyMap?: AssetTextureInfo;
14428
+ outlineColorFactor?: Vector3;
14429
+ outlineLightingMixFactor?: number;
14430
+ outlineUsesTangentNormals?: boolean;
14431
+ uvAnimationMaskMap?: AssetTextureInfo;
14432
+ uvAnimationScrollXSpeedFactor?: number;
14433
+ uvAnimationScrollYSpeedFactor?: number;
14434
+ uvAnimationRotationSpeedFactor?: number;
14435
+ transparentWithZWrite?: boolean;
14436
+ renderQueueOffsetNumber?: number;
14437
+ }
13782
14438
  /**
13783
14439
  * Sheen related material properties for model loading
13784
14440
  * @public
@@ -14106,6 +14762,8 @@ declare class AssetSkeleton extends NamedObject {
14106
14762
  rotation: Quaternion;
14107
14763
  scale: Vector3;
14108
14764
  }[];
14765
+ /** Explicit humanoid joint mapping, when supplied by the source asset. */
14766
+ humanoidJointMapping: Nullable<HumanoidJointMapping<AssetHierarchyNode>>;
14109
14767
  /**
14110
14768
  * Creates an instance of AssetSkeleton
14111
14769
  * @param name - Name of the skeleton
@@ -14240,6 +14898,7 @@ type SaveOptions = {
14240
14898
  importMeshes: boolean;
14241
14899
  importSkeletons: boolean;
14242
14900
  importAnimations: boolean;
14901
+ rebuildMaterial?: boolean;
14243
14902
  };
14244
14903
  /**
14245
14904
  * Model information that can be shared by multiple model nodes
@@ -14280,6 +14939,21 @@ declare class SharedModel extends Disposable {
14280
14939
  getMaterial(hash: string): AssetMaterial;
14281
14940
  setMaterial(hash: string, material: AssetMaterial): void;
14282
14941
  addPrimitive(prim: AssetPrimitiveInfo): void;
14942
+ private sanitizeResourceName;
14943
+ private getReimportPoolKey;
14944
+ private getResourceBasename;
14945
+ private getResourceNumericSuffix;
14946
+ private registerReusableResourcePath;
14947
+ private collectReferencedAssetPaths;
14948
+ private collectReferencedAssetPathsFromJsonFile;
14949
+ private createReimportResourcePools;
14950
+ private consumeReusableResourcePath;
14951
+ private createUniqueResourcePath;
14952
+ private tryReuseExactResourcePath;
14953
+ private collapseCompositeTextureName;
14954
+ private getImageBaseName;
14955
+ private getMaterialBaseName;
14956
+ private getPrimitiveBaseName;
14283
14957
  /**
14284
14958
  * Adds a model-level morph target group.
14285
14959
  * @param group - Morph target group to add
@@ -14317,6 +14991,7 @@ declare class SharedModel extends Disposable {
14317
14991
  private createMorphTargetGroups;
14318
14992
  private getInitialMorphTargetGroupWeight;
14319
14993
  private getMorphTargetBindingWeight;
14994
+ private remapHumanoidJointMapping;
14320
14995
  createSceneNode(manager: ResourceManager, scene: Scene, instancing: boolean, saveMeshes: boolean, saveSkeletons: boolean, saveAnimations: boolean, saveJointDynamics: boolean, srcVFS: VFS): Promise<SceneNode>;
14321
14996
  private remapGeometryCacheFrames;
14322
14997
  private remapPCAGeometryCacheData;
@@ -15840,6 +16515,57 @@ declare class ScriptAttachment {
15840
16515
  */
15841
16516
  declare function normalizeScriptAttachments(value: unknown): ScriptAttachment[];
15842
16517
 
16518
+ /**
16519
+ * Atlas-based MSDF text material.
16520
+ *
16521
+ * @public
16522
+ */
16523
+ declare class MSDFTextMaterial extends MeshMaterial implements Clonable<MSDFTextMaterial> {
16524
+ static FEATURE_TEXT_ATLAS: number;
16525
+ private _atlas;
16526
+ private _textColor;
16527
+ private _outlineColor;
16528
+ private _distanceRange;
16529
+ private _atlasSize;
16530
+ private _smallGlyphThreshold;
16531
+ private _outlineWidth;
16532
+ constructor();
16533
+ get atlasTexture(): _zephyr3d_base.Nullable<Texture2D<unknown>>;
16534
+ set atlasTexture(tex: _zephyr3d_base.Nullable<Texture2D<unknown>>);
16535
+ get textColor(): Immutable<Vector3>;
16536
+ set textColor(value: Immutable<Vector3>);
16537
+ get outlineColor(): Immutable<Vector3>;
16538
+ set outlineColor(value: Immutable<Vector3>);
16539
+ get distanceRange(): number;
16540
+ set distanceRange(value: number);
16541
+ get smallGlyphThreshold(): number;
16542
+ set smallGlyphThreshold(value: number);
16543
+ get outlineWidth(): number;
16544
+ set outlineWidth(value: number);
16545
+ clone(): MSDFTextMaterial;
16546
+ copyFrom(other: this): void;
16547
+ vertexShader(scope: PBFunctionScope): void;
16548
+ fragmentShader(scope: PBFunctionScope): void;
16549
+ applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
16550
+ protected onDispose(): void;
16551
+ }
16552
+
16553
+ /**
16554
+ * Billboard MSDF text material.
16555
+ *
16556
+ * @public
16557
+ */
16558
+ declare class MSDFTextSpriteMaterial extends MSDFTextMaterial implements Clonable<MSDFTextSpriteMaterial> {
16559
+ private _rotation;
16560
+ constructor();
16561
+ get rotation(): number;
16562
+ set rotation(value: number);
16563
+ clone(): MSDFTextSpriteMaterial;
16564
+ copyFrom(other: this): void;
16565
+ vertexShader(scope: PBFunctionScope): void;
16566
+ applyUniformValues(bindGroup: BindGroup, ctx: DrawContext, pass: number): void;
16567
+ }
16568
+
15843
16569
  type MSDFGlyphInfo = {
15844
16570
  glyphIndex: number;
15845
16571
  advanceWidth: number;
@@ -15894,6 +16620,7 @@ type TextAlign = 'left' | 'center' | 'right';
15894
16620
  declare class MeshDrawableBase extends Disposable {
15895
16621
  private _node;
15896
16622
  constructor(node: SceneNode);
16623
+ getName(): string;
15897
16624
  getNode(): SceneNode;
15898
16625
  }
15899
16626
  declare const MeshDrawable_base: typeof MeshDrawableBase & _zephyr3d_base.GenericConstructor<{
@@ -15924,6 +16651,7 @@ declare class MeshDrawable<M extends MeshMaterial> extends MeshDrawable_base imp
15924
16651
  isBatchable(): this is BatchDrawable;
15925
16652
  draw(ctx: DrawContext, renderQueue: Nullable<RenderQueue>): void;
15926
16653
  protected onDispose(): void;
16654
+ getName(): string;
15927
16655
  }
15928
16656
 
15929
16657
  /**
@@ -16050,7 +16778,7 @@ type SceneNodeVisible = 'visible' | 'inherit' | 'hidden';
16050
16778
  * @public
16051
16779
  */
16052
16780
  interface SceneMorphTargetBinding {
16053
- mesh: Mesh;
16781
+ mesh: Mesh$1;
16054
16782
  targetIndex?: number;
16055
16783
  targetName?: string;
16056
16784
  weight: number;
@@ -16789,8 +17517,8 @@ declare class SceneNode extends SceneNode_base implements IDisposable {
16789
17517
  * @remarks
16790
17518
  * Stored and transported with the node; format is application-defined.
16791
17519
  */
16792
- get metaData(): Nullable<Metadata$1>;
16793
- set metaData(val: Nullable<Metadata$1>);
17520
+ get metaData(): Nullable<Metadata>;
17521
+ set metaData(val: Nullable<Metadata>);
16794
17522
  /**
16795
17523
  * Attached script filename or identifier (engine-specific).
16796
17524
  *
@@ -16907,7 +17635,7 @@ declare class SceneNode extends SceneNode_base implements IDisposable {
16907
17635
  /** Type guard: true if this node is a light. */
16908
17636
  isLight(): this is BaseLight;
16909
17637
  /** Type guard: true if this node is a mesh. */
16910
- isMesh(): this is Mesh;
17638
+ isMesh(): this is Mesh$1;
16911
17639
  /** Type guard: true if this node is a sprite */
16912
17640
  isSprite(): this is Sprite;
16913
17641
  /** Type guard: true if this node is a MSDF text sprite */
@@ -17839,6 +18567,11 @@ declare class ScriptingSystem {
17839
18567
  interface IRenderable extends IDisposable {
17840
18568
  render(): void;
17841
18569
  }
18570
+ /**
18571
+ * Type for render functions that can be registered as renderables.
18572
+ *
18573
+ * @public
18574
+ */
17842
18575
  type RenderFunc = () => void;
17843
18576
  /**
17844
18577
  * Interface for render hooks to customize rendering behavior.
@@ -17894,14 +18627,6 @@ declare class Engine {
17894
18627
  * Exposes the virtual file system used by the underlying {@link ScriptingSystem}'s registry.
17895
18628
  */
17896
18629
  get VFS(): VFS;
17897
- /**
17898
- * Replaces the virtual file system used by the engine.
17899
- *
17900
- * The previous resource manager VFS is closed, the scripting registry is updated,
17901
- * and built-in assets are remounted on the new VFS.
17902
- *
17903
- * @param vfs - New virtual file system.
17904
- */
17905
18630
  set VFS(vfs: VFS);
17906
18631
  /**
17907
18632
  * Exposes the instance of {@link ResourceManager}.
@@ -18664,8 +19389,8 @@ declare class Scene extends Scene_base implements IRenderable {
18664
19389
  /**
18665
19390
  * Arbitrary metadata associated with the scene (e.g., imported asset info).
18666
19391
  */
18667
- get metaData(): Nullable<Metadata$1>;
18668
- set metaData(val: Nullable<Metadata$1>);
19392
+ get metaData(): Nullable<Metadata>;
19393
+ set metaData(val: Nullable<Metadata>);
18669
19394
  /**
18670
19395
  * Attached script filename or identifier (engine-specific).
18671
19396
  *
@@ -18871,7 +19596,7 @@ declare class RaycastVisitor implements Visitor<SceneNode | OctreeNode> {
18871
19596
  get intersectedPoint(): Vector3;
18872
19597
  visit(target: SceneNode | OctreeNode): boolean;
18873
19598
  visitWater(node: Water): boolean;
18874
- visitMesh(node: Mesh): boolean;
19599
+ visitMesh(node: Mesh$1): boolean;
18875
19600
  visitOctreeNode(node: OctreeNode): boolean;
18876
19601
  private updateVisitResult;
18877
19602
  }
@@ -18985,11 +19710,7 @@ declare class ResourceManager {
18985
19710
  */
18986
19711
  getPropertiesByClass(cls: SerializableClass): PropertyAccessor[] | null;
18987
19712
  /**
18988
- * Get all properties declared on a given class and its ancestors.
18989
- *
18990
- * @param cls - Serializable class metadata.
18991
- *
18992
- * @returns An array of `PropertyAccessor` entries, or `null` if none.
19713
+ * Get all properties declared on a class, including inherited serializable properties.
18993
19714
  */
18994
19715
  getAllPropertiesByClass(cls: Nullable<SerializableClass>): PropertyAccessor[];
18995
19716
  /**
@@ -19052,13 +19773,6 @@ declare class ResourceManager {
19052
19773
  *
19053
19774
  */
19054
19775
  setAssetId(asset: unknown, id?: Nullable<string>): void;
19055
- /**
19056
- * Register a model loader.
19057
- *
19058
- * @param mimeType - What MIME type of files this loader can load
19059
- * @param loader - A concrete model loader implementation.
19060
- */
19061
- setModelLoader(mimeType: string, loader: ModelLoader): void;
19062
19776
  /**
19063
19777
  * Fetch a binary asset by ID via the asset manager.
19064
19778
  *
@@ -19066,32 +19780,11 @@ declare class ResourceManager {
19066
19780
  * - Associates the returned data with the given ID for future reverse lookup.
19067
19781
  * - The ID is typically a VFS path or locator.
19068
19782
  *
19069
- * @param path - VFS path of the binary asset.
19783
+ * @param id - Asset identifier or path.
19070
19784
  *
19071
19785
  * @returns A Promise that resolves to the binary content, or `null` if not found.
19072
19786
  */
19073
- fetchBinary(path: string, options?: BaseFetchOptions): Promise<Nullable<ArrayBuffer>>;
19074
- /**
19075
- * Fetch a text asset by ID via the asset manager.
19076
- *
19077
- * @param path - VFS path of TTF/OTF file.
19078
- * @returns A Promise that resolves to the font asset, or `null` if not found.
19079
- */
19080
- fetchFontAsset(path: string, options?: FontAssetFetchOptions): Promise<Nullable<FontAsset>>;
19081
- /**
19082
- * Get a cached font asset by ID if already loaded.
19083
- *
19084
- * @param path - VFS path of TTF/OTF file.
19085
- * @returns The cached FontAsset if it exists and is loaded, or null if not cached or still loading.
19086
- */
19087
- getFontAsset(path: string): Nullable<FontAsset>;
19088
- /**
19089
- * Removes a cached font asset entry by asset instance or asset ID.
19090
- *
19091
- * @param asset - Loaded font asset instance or its asset ID/path.
19092
- * @returns `true` if a cache entry existed and was removed.
19093
- */
19094
- releaseFontAsset(asset: FontAsset | string): boolean;
19787
+ fetchBinary(id: string): Promise<Nullable<ArrayBuffer>>;
19095
19788
  /**
19096
19789
  * Serialize an object to a JSON structure using registered class metadata.
19097
19790
  *
@@ -19140,7 +19833,7 @@ declare class ResourceManager {
19140
19833
  /**
19141
19834
  * Load a model by ID and track the allocation for reverse lookup.
19142
19835
  *
19143
- * @param path - VFS path of the model file.
19836
+ * @param id - Model identifier or path.
19144
19837
  * @param scene - Scene into which the model is loaded.
19145
19838
  * @param options - Optional model fetch options.
19146
19839
  *
@@ -19165,20 +19858,22 @@ declare class ResourceManager {
19165
19858
  /**
19166
19859
  * Load a texture by ID and track the allocation for reverse lookup.
19167
19860
  *
19168
- * @param path - VFS path of the texture file.
19861
+ * @param id - Texture identifier or path.
19169
19862
  * @param options - Optional texture fetch options.
19170
19863
  *
19171
19864
  * @returns A Promise resolving to the loaded texture, or `null` if failed.
19172
19865
  */
19173
- fetchTexture<T extends Texture2D | TextureCube | Texture2DArray>(path: string, options?: TextureFetchOptions<T>): Promise<T>;
19866
+ fetchTexture<T extends Texture2D | TextureCube | Texture2DArray>(id: string, options?: TextureFetchOptions<T>): Promise<T>;
19174
19867
  /**
19175
19868
  * Load a material by ID and track the allocation for reverse lookup.
19176
19869
  *
19177
- * @param path - VFS path of the material file.
19870
+ * @param id - Material identifier or path.
19178
19871
  *
19179
19872
  * @returns A Promise resolving to the loaded material, or `null` if failed.
19180
19873
  */
19181
- fetchMaterial<T extends Material = MeshMaterial>(path: string, options?: BaseFetchOptions): Promise<Nullable<T>>;
19874
+ fetchMaterial<T extends Material = MeshMaterial>(id: string, options?: {
19875
+ overrideVFS?: VFS;
19876
+ }): Promise<Nullable<T>>;
19182
19877
  /**
19183
19878
  * Reload specific blue print materials
19184
19879
  *
@@ -19191,14 +19886,32 @@ declare class ResourceManager {
19191
19886
  * @param path - BluePrint file path
19192
19887
  */
19193
19888
  invalidateBluePrint(path: string): void;
19889
+ /**
19890
+ * Register a model loader by MIME type.
19891
+ */
19892
+ setModelLoader(mimeType: string, loader: ModelLoader): void;
19194
19893
  /**
19195
19894
  * Load a primitive by ID and track the allocation for reverse lookup.
19196
19895
  *
19197
- * @param path - VFS path of the primitive file.
19896
+ * @param id - Primitive identifier or path.
19198
19897
  *
19199
19898
  * @returns A Promise resolving to the loaded primitive, or `null` if failed.
19200
19899
  */
19201
- fetchPrimitive<T extends Primitive = Primitive>(path: string, options?: BaseFetchOptions): Promise<Nullable<T>>;
19900
+ fetchPrimitive<T extends Primitive = Primitive>(id: string, options?: {
19901
+ overrideVFS?: VFS;
19902
+ }): Promise<Nullable<T>>;
19903
+ /**
19904
+ * Load a font asset by path and track the allocation for reverse lookup.
19905
+ */
19906
+ fetchFontAsset(path: string, options?: FontAssetFetchOptions): Promise<Nullable<FontAsset>>;
19907
+ /**
19908
+ * Returns the cached font asset if it is already loaded.
19909
+ */
19910
+ getFontAsset(path: string): Nullable<FontAsset>;
19911
+ /**
19912
+ * Releases a cached font asset.
19913
+ */
19914
+ releaseFontAsset(asset: unknown | string): boolean;
19202
19915
  /**
19203
19916
  * Load a prefab content.
19204
19917
  * @param path - Path to the prefab JSON file in VFS.
@@ -24060,6 +24773,8 @@ declare class ResolveVertexTangentNode extends BaseGraphNode {
24060
24773
  * - **Normal**: Surface normal in tangent/world space (for bump/normal mapping)
24061
24774
  * - **Tangent**: Surface tangent vector (for anisotropic effects)
24062
24775
  * - **Opacity**: Surface transparency (0 = fully transparent, 1 = fully opaque)
24776
+ * - **SpecularWeight**: Scalar weight for the specular lobe
24777
+ * - **AO**: Ambient occlusion multiplier
24063
24778
  *
24064
24779
  * All inputs are optional and have sensible defaults. Only the inputs you connect
24065
24780
  * will override the default values.
@@ -24126,14 +24841,16 @@ declare class PBRBlockNode extends BaseGraphNode {
24126
24841
  * Creates a new PBR material output node
24127
24842
  *
24128
24843
  * @remarks
24129
- * Initializes with 8 input slots for all PBR material properties.
24844
+ * Initializes with the full surface input set consumed by the PBR metallic-roughness backend.
24845
+ * Existing slot ids are preserved for backward compatibility with saved `.zbpt` graphs,
24846
+ * and new inputs are appended at the end.
24130
24847
  * Each input has:
24131
24848
  * - Flexible type acceptance (float can expand to vec3/vec4, etc.)
24132
24849
  * - Default values for when no connection is made
24133
24850
  * - Origin type that defines the expected canonical type
24134
24851
  *
24135
24852
  * Default values provide a reasonable starting material:
24136
- * - White base color (1, 1, 1, 1)
24853
+ * - White base color (1, 1, 1)
24137
24854
  * - Fully metallic (1.0)
24138
24855
  * - Fully rough (1.0)
24139
24856
  * - White specular (1, 1, 1)
@@ -24141,6 +24858,8 @@ declare class PBRBlockNode extends BaseGraphNode {
24141
24858
  * - Default surface normal (from vertex data)
24142
24859
  * - Default tangent (from vertex data)
24143
24860
  * - Fully opaque (1.0)
24861
+ * - Full specular weight (1)
24862
+ * - Full AO (1)
24144
24863
  */
24145
24864
  constructor();
24146
24865
  /**
@@ -25159,7 +25878,7 @@ type AvatarFitMode = 'reuseInverseBind' | 'preserveRestPose';
25159
25878
  /** @public */
25160
25879
  type AvatarOutfitSource = string | SceneNode | SharedModel;
25161
25880
  /** @public */
25162
- type AvatarBodyRegionTarget = SceneNode | Mesh;
25881
+ type AvatarBodyRegionTarget = SceneNode | Mesh$1;
25163
25882
  /** @public */
25164
25883
  type AvatarBodyRegions = Record<string, AvatarBodyRegionTarget[]>;
25165
25884
  /** @public */
@@ -25209,7 +25928,7 @@ declare class AvatarOutfitInstance extends Disposable {
25209
25928
  readonly id: string;
25210
25929
  readonly slot: AvatarSlotId;
25211
25930
  readonly root: DRef<SceneNode>;
25212
- readonly meshes: DRef<Mesh>[];
25931
+ readonly meshes: DRef<Mesh$1>[];
25213
25932
  readonly skinBindings: SkinBinding[];
25214
25933
  readonly hiddenBodyRegions: string[];
25215
25934
  private _wardrobe;
@@ -25599,6 +26318,11 @@ declare const LIGHT_TYPE_SPOT = 3;
25599
26318
  * @public
25600
26319
  */
25601
26320
  declare const LIGHT_TYPE_RECT = 4;
26321
+ /**
26322
+ * Max light size for clustered lighting
26323
+ * @public
26324
+ */
26325
+ declare const MAX_CLUSTERED_LIGHTS = 255;
25602
26326
  /**
25603
26327
  * Opaque render queue type
25604
26328
  * @public
@@ -25646,7 +26370,11 @@ declare const enum MaterialVaryingFlags {
25646
26370
  SKIN_ANIMATION = 2,
25647
26371
  INSTANCING = 4,
25648
26372
  SSR_STORE_ROUGHNESS = 8,
25649
- APPLY_FOG = 16
26373
+ APPLY_FOG = 16,
26374
+ SSS_STORE_PROFILE = 32,
26375
+ SSS_STORE_DIFFUSE = 64,
26376
+ SSS_STORE_NORMAL = 128,
26377
+ SSS_STORE_TRANSMISSION = 256
25650
26378
  }
25651
26379
  /**
25652
26380
  * Atmospheric Fog flag
@@ -25659,4 +26387,4 @@ declare const ATMOSPHERIC_FOG_BIT: number;
25659
26387
  */
25660
26388
  declare const HEIGHT_FOG_BIT: number;
25661
26389
 
25662
- export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationSet, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, type AssetGeometryCacheFrame, AssetHierarchyNode, type AssetImageInfo, type AssetJointDynamicsChain, type AssetJointDynamicsCollider, type AssetJointDynamicsFlatPlane, type AssetJointDynamicsSpringBone, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetMorphTargetBinding, type AssetMorphTargetGroup, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetPrimitiveInfo, type AssetRotationTrack, type AssetSamplerInfo, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSpringBone, type AssetSpringBoneCollider, type AssetSpringBoneColliderGroup, type AssetSpringBoneColliderShape, type AssetSpringBoneJoint, type AssetSubMeshData, type AssetTextureInfo, type AssetTranslationTrack, type AssetUnlitMaterial, type AssetVertexBufferInfo, type AvatarBindMode, type AvatarBodyRegionTarget, type AvatarBodyRegions, type AvatarEquipOptions, type AvatarFitMode, type AvatarJointMap, AvatarOutfitInstance, type AvatarOutfitSource, type AvatarOutfitValidation, type AvatarSlotId, type AvatarSlotOptions, AvatarWardrobe, type AvatarWardrobeOptions, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, type BaseFetchOptions, BaseGraphNode, BaseLight, BaseSprite, BaseTextureNode, type BatchDrawable, BatchGroup, BillboardMatrixNode, type BlendMode, BlinnMaterial, type BlitType, Blitter, Bloom, type BluePrintEditorState, type BluePrintUniformTexture, type BluePrintUniformValue, type BlueprintDAG, type BoneNode, BoundingBox, type BoundingVolume, type BoxCreationOptions, BoxFilterBlitter, BoxFrameShape, BoxShape, CCDSolver, type CachedBindGroup, Camera, CameraNearFarNode, type CameraOITMode, CameraPositionNode, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, type ColoredEdge, type ColoredLineEdge, type ColoredQuadraticEdge, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, type CompiledRenderGraph, Compositor, type CompositorContext, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, type ControllerConfigUpdate, CopyBlitter, type CopyHumanoidAnimationOptions, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DevicePoolAllocator, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, EPSILON, type EdgeColor, type EditorMode, ElapsedTimeNode, type EmitterBehavior, type EmitterShape, Engine, EnvConstantAmbient, EnvHemisphericAmbient, type EnvLightType, EnvLightWrapper, EnvShIBL, Environment, EnvironmentLighting, EqualNode, Exp2Node, ExpNode, type ExtractMixinReturnType, type ExtractMixinType, FABRIKSolver, FBMWaveGenerator, FFTWaveGenerator, FPSCameraController, type FPSCameraControllerOptions, FWidthNode, FXAA, FaceForwardNode, type FixedGeometryCacheFrame, type FixedGeometryCacheState, FixedGeometryCacheTrack, type FlatPlane, FloorNode, FmaNode, type FogType, FontAsset, type FontAssetFetchOptions, type FontAssetMSDFAtlasSettings, type FontMetrics, type ForwardPlusOptions, FractNode, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GlyphContour, type GlyphData, type GlyphPoint, type GrabberR, type GrabberRW, GraphNode, type GraphNodeInput, type GraphNodeOutput, type GraphStructure, type GrassInstanceInfo, GrassLayer, GrassMaterial, GrassRenderer, Grayscale, HEIGHT_FOG_BIT, Hash1Node, Hash2Node, Hash3Node, HistoryResourceManager, type Host, HumanoidBodyRig, HumanoidHandRig, type HumanoidJointMapping, type HumanoidRetargetAxisLocks, type HumanoidRootMotionMode, type HumanoidRootMotionScaleMode, type HumanoidSkeletalAnimationMaskOptions, type HumanoidSkeletalAnimationMaskPreset, type IAttachedScript, type IBaseEvent, type IControllerKeyboardEvent, type IControllerKeydownEvent, type IControllerKeypressEvent, type IControllerKeyupEvent, type IControllerMouseEvent, type IControllerPointerCancelEvent, type IControllerPointerDownEvent, type IControllerPointerMoveEvent, type IControllerPointerUpEvent, type IControllerWheelEvent, type IGraphNode, IKAngleConstraint, IKChain, IKConstraint, type IKJoint, IKModifier, IKSolver, type IMixinAlbedoColor, type IMixinBlinnPhong, type IMixinFoliage, type IMixinLambert, type IMixinLight, type IMixinPBRBluePrint, type IMixinPBRCommon, type IMixinPBRMetallicRoughness, type IMixinPBRSpecularGlossiness, type IMixinVertexColor, type IModKey, type IRUniformTexture, type IRUniformValue, type IRenderHook, type IRenderable, type InputEventHandler, InputManager, InstanceBindGroupAllocator, type InstanceData, InstanceIndexNode, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsColliderSnapshot, type JointDynamicsFlatPlaneHandle, type JointDynamicsFlatPlaneSnapshot, type JointDynamicsGrabberHandle, type JointDynamicsGrabberSnapshot, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, type JointNameMatcher, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_TERRAIN_MIPMAP_LEVELS, MORPH_ATTRIBUTE_VECTOR_COUNT, MORPH_TARGET_COLOR, MORPH_TARGET_NORMAL, MORPH_TARGET_POSITION, MORPH_TARGET_TANGENT, MORPH_TARGET_TEX0, MORPH_TARGET_TEX1, MORPH_TARGET_TEX2, MORPH_TARGET_TEX3, MORPH_WEIGHTS_VECTOR_COUNT, type MSDFBitmap, type MSDFOptions, type MSDFShape, MSDFText, MSDFTextAtlasManager, MSDFTextMaterial, MSDFTextSprite, MSDFTextSpriteMaterial, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh, MeshMaterial, type MeshUpdateCallback, type Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type ModelLoader, type MorphBoundingInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, type NamedJointsSkeletalAnimationMaskOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, type PairAdjustment, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, PerspectiveCamera, type PhysicsCurves, type PickResult, type PickTarget, PixelNormalNode, PixelWorldPositionNode, type PlaneCollider, type PlaneCreationOptions, PlaneShape, type PlayAnimationOptions, type PointInit, PointLight, type PointR, type PointRW, type PointTransform, PostEffectLayer, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, type RGExecuteContext, type RGExecuteFn, type RGFramebufferDesc, RGHandle, RGHistoryResources, type RGPassBuilder, type RGResolvedSize, type RGResourceLifetime, type RGSizeMode, RGSubpass, type RGTextureAllocator, type RGTextureDesc, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, RenderContext, type RenderFunc, RenderGraph, RenderGraphExecutor, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, RenderQueue, type RenderQueueItem, type RenderQueueRef, RenderTarget, type ResolutionTransform, ResolveVertexNormalNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResourceManager, RotateAboutAxisNode, RuntimeScript, type RuntimeScriptArrayDeclaration, type RuntimeScriptArrayElementDeclaration, type RuntimeScriptConfig, type RuntimeScriptObjectDeclaration, type RuntimeScriptObjectFieldDeclaration, type RuntimeScriptPropertyDeclaration, type RuntimeScriptPropertyInfo, type RuntimeScriptPropertyOptions, type RuntimeScriptPropertyType, type RuntimeScriptValueDeclaration, type RuntimeScriptValueType, SAO, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, type SerializedMorphTargetBinding, type SerializedMorphTargetGroup, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, type SkeletalAnimationMaskCommonOptions, type SkeletalAnimationMaskOptions, type SkeletalAnimationMaskRootMotionMode, type SkeletalAnimationMaskUnsupportedTrackMode, Skeleton, type SkeletonBindPose, SkeletonModifier, SkeletonRig, type SkeletonRigOptions, SkinBinding, type SkinnedBoundingBox, SkyEnvTextureNode, SkyRenderer, type SkyType, SmoothStepNode, type SphereCollider, type SphereCreationOptions, SphereShape, SpotLight, SpringChain, type SpringCollider, type SpringConstraint, SpringModifier, type SpringParticle, SpringSystem, type SpringSystemOptions, Sprite, SpriteBlockNode, SpriteBlueprintMaterial, SpriteMaterial, SqrtNode, StandardSpriteMaterial, StepNode, type StopAnimationOptions, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, TextSprite, type TextureFetchOptions, type TextureMixinInstanceTypes, type TextureMixinTypes, type TextureProp, type TexturePropUniforms, TextureSampleGrad, TextureSampleNode, type ToMixedTextureType, Tonemap, type TorusCreationOptions, TorusShape, type TransformAccess, TransformNode, type TwistConstraint, TwoBoneIKSolver, UnlitMaterial, VertexBinormalNode, VertexBlockNode, VertexColorNode, VertexIndexNode, VertexNormalNode, VertexOutputNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildForwardPlusGraph, buildMSDFShape, buildSurfaceFaces, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, executeForwardPlusGraph, fetchSampler, gammaToLinear, generateMSDF, getApp, getDevice, getEngine, getInput, getRuntimeScriptProperties, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mixGeometryCacheBoundingBox, mixinAlbedoColor, mixinBlinnPhong, mixinFoliage, mixinLambert, mixinLight, mixinPBRBluePrint, mixinPBRCommon, mixinPBRMetallicRoughness, mixinPBRSpecularGlossness, mixinTextureProps, mixinVertexColor, noise3D, normalizeRuntimeScriptConfig, normalizeScriptAttachmentConfig, normalizeScriptAttachments, panoramaToCubemap, perlinNoise2D, perlinNoise3D, prefilterCubemap, pushInCollisionDetection, pushInFromCapsule, pushInFromCollider, pushInFromSphere, pushoutFromCapsule, pushoutFromCollider, pushoutFromSphere, resolveCapsuleCollision, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };
26390
+ export { AABBTree, ABufferOIT, ATMOSPHERIC_FOG_BIT, AbsNode, AbstractPostEffect, AllConditionNode, type AngleLimitConfig, AnimationClip, AnimationSet, AnimationTrack, AnyConditionNode, type AppCreationOptions, type AppOptions, Application, type ApplyResultOutput, ArcCosNode, ArcSinNode, ArcTan2Node, ArcTanNode, ArccosineHNode, ArcsineHNode, ArctangentHNode, type AssetAnimationData, type AssetAnimationTrack, type AssetFixedGeometryCacheAnimationTrack, type AssetGeometryCacheAnimationTrack, type AssetGeometryCacheFrame, AssetHierarchyNode, type AssetImageInfo, type AssetJointDynamicsChain, type AssetJointDynamicsCollider, type AssetJointDynamicsFlatPlane, type AssetJointDynamicsSpringBone, type AssetMToonMaterial, AssetManager, type AssetMaterial, type AssetMaterialClearcoat, type AssetMaterialCommon, type AssetMaterialIridescence, type AssetMaterialSheen, type AssetMaterialTransmission, type AssetMeshData, type AssetMorphTargetBinding, type AssetMorphTargetGroup, type AssetPBRMaterialCommon, type AssetPBRMaterialMR, type AssetPBRMaterialSG, type AssetPCAGeometryCacheAnimationTrack, type AssetPrimitiveInfo, type AssetRotationTrack, type AssetSamplerInfo, type AssetScaleTrack, AssetScene, type AssetSkeletalAnimationTrack, AssetSkeleton, type AssetSpringBone, type AssetSpringBoneCollider, type AssetSpringBoneColliderGroup, type AssetSpringBoneColliderShape, type AssetSpringBoneJoint, type AssetSubMeshData, type AssetTextureInfo, type AssetTranslationTrack, type AssetUnlitMaterial, type AssetVertexBufferInfo, type AvatarBindMode, type AvatarBodyRegionTarget, type AvatarBodyRegions, type AvatarEquipOptions, type AvatarFitMode, type AvatarJointMap, AvatarOutfitInstance, type AvatarOutfitSource, type AvatarOutfitValidation, type AvatarSlotId, type AvatarSlotOptions, AvatarWardrobe, type AvatarWardrobeOptions, BUILTIN_ASSET_TEST_CUBEMAP, BUILTIN_ASSET_TEXTURE_SHEEN_LUT, BaseCameraController, type BaseFetchOptions, BaseGraphNode, BaseLight, BaseSprite, BaseTextureNode, type BatchDrawable, BatchGroup, BillboardMatrixNode, type BlendMode, BlinnMaterial, type BlitType, Blitter, Bloom, type BluePrintEditorState, type BluePrintUniformTexture, type BluePrintUniformValue, type BlueprintDAG, type BoneNode, BoundingBox, type BoundingVolume, type BoxCreationOptions, BoxFilterBlitter, BoxFrameShape, BoxShape, CCDSolver, type CachedBindGroup, Camera, type CameraHistoryData, CameraNearFarNode, type CameraOITMode, CameraPositionNode, CameraVectorNode, type CapsuleCollider, type CapsuleCreationOptions, CapsuleShape, CeilNode, ClampNode, ClipmapTerrain, ClipmapTerrainMaterial, ColliderForce, type ColliderR, type ColliderRW, type CollisionResult, ColorAdjust, type ColoredEdge, type ColoredLineEdge, type ColoredQuadraticEdge, CompAddNode, CompComparisonNode, CompDivNode, CompMulNode, CompSubNode, type ComparisonMode, Compositor, type CompositorContext, ConstantBVec2Node, ConstantBVec3Node, ConstantBVec4Node, ConstantBooleanNode, ConstantScalarNode, ConstantTexture2DArrayNode, ConstantTexture2DNode, ConstantTextureCubeNode, ConstantVec2Node, ConstantVec3Node, ConstantVec4Node, type Constraint, type ConstraintBuildOptions, ConstraintType, type ControllerConfig, type ControllerConfigUpdate, CopyBlitter, type CopyHumanoidAnimationOptions, CosHNode, CosNode, CrossProductNode, CubemapSHProjector, CullVisitor, type CylinderCreationOptions, CylinderShape, DDXNode, DDYNode, Degrees2RadiansNode, DepthPass, DirectionalLight, DistanceNode, DotProductNode, DracoMeshDecoder, type DrawContext, type Drawable, type DrawableInstanceInfo, EPSILON, type EdgeColor, type EditorMode, ElapsedTimeNode, type EmitterBehavior, type EmitterShape, Engine, EnvConstantAmbient, EnvHemisphericAmbient, type EnvLightType, EnvLightWrapper, EnvShIBL, Environment, EnvironmentLighting, EqualNode, Exp2Node, ExpNode, type ExtractMixinReturnType, type ExtractMixinType, FABRIKSolver, FBMWaveGenerator, FFTWaveGenerator, FPSCameraController, type FPSCameraControllerOptions, FWidthNode, FXAA, FaceForwardNode, type FixedGeometryCacheFrame, type FixedGeometryCacheState, FixedGeometryCacheTrack, type FlatPlane, FloorNode, FmaNode, type FogType, FontAsset, type FontAssetFetchOptions, type FontAssetMSDFAtlasSettings, type FontMetrics, FractNode, FunctionCallNode, FunctionInputNode, FunctionOutputNode, GPUClothSystem, type GPUClothSystemOptions, type GPUClothWrapBindingData, type GPUClothWrapBindingTarget, GaussianBlurBlitter, GenericMathNode, type GeometryCacheFrame, type GeometryCacheMeshBinding, type GeometryCacheState, GerstnerWaveGenerator, type GlyphContour, type GlyphData, type GlyphPoint, type GrabberR, type GrabberRW, GraphNode, type GraphNodeInput, type GraphNodeOutput, type GraphStructure, type GrassInstanceInfo, GrassLayer, GrassMaterial, GrassRenderer, Grayscale, HEIGHT_FOG_BIT, Hash1Node, Hash2Node, Hash3Node, HistoryResourceManager, type Host, HumanoidBodyRig, HumanoidHandRig, type HumanoidJointMapping, type HumanoidRetargetAxisLocks, type HumanoidRootMotionMode, type HumanoidRootMotionScaleMode, type HumanoidSkeletalAnimationMaskOptions, type HumanoidSkeletalAnimationMaskPreset, type IAttachedScript, type IBaseEvent, type IControllerKeyboardEvent, type IControllerKeydownEvent, type IControllerKeypressEvent, type IControllerKeyupEvent, type IControllerMouseEvent, type IControllerPointerCancelEvent, type IControllerPointerDownEvent, type IControllerPointerMoveEvent, type IControllerPointerUpEvent, type IControllerWheelEvent, type IGraphNode, IKAngleConstraint, IKChain, IKConstraint, type IKJoint, IKModifier, IKSolver, type IMixinAlbedoColor, type IMixinBlinnPhong, type IMixinFoliage, type IMixinLambert, type IMixinLight, type IMixinPBRBluePrint, type IMixinPBRCommon, type IMixinPBRMetallicRoughness, type IMixinPBRSpecularGlossiness, type IMixinVertexColor, type IModKey, type IRUniformTexture, type IRUniformValue, type IRenderHook, type IRenderable, type InputEventHandler, InputManager, InstanceBindGroupAllocator, type InstanceData, InstanceIndexNode, type InstanceUniformType, type InterChainConstraint, InvProjMatrixNode, InvSqrtNode, InvViewProjMatrixNode, type JointChainConfig, type JointDynamicSystemConfig, type JointDynamicsColliderHandle, type JointDynamicsColliderSnapshot, type JointDynamicsFlatPlaneHandle, type JointDynamicsFlatPlaneSnapshot, type JointDynamicsGrabberHandle, type JointDynamicsGrabberSnapshot, JointDynamicsModifier, JointDynamicsSystem, JointDynamicsSystemController, type JointNameMatcher, LIGHT_TYPE_DIRECTIONAL, LIGHT_TYPE_NONE, LIGHT_TYPE_POINT, LIGHT_TYPE_RECT, LIGHT_TYPE_SPOT, LambertMaterial, LengthNode, type LineCollisionResult, Log2Node, type LogMode, LogNode, LogicallyAndNode, LogicallyOrNode, MAX_CLUSTERED_LIGHTS, MAX_GERSTNER_WAVE_COUNT, MAX_MORPH_ATTRIBUTES, MAX_MORPH_TARGETS, MAX_TERRAIN_MIPMAP_LEVELS, MORPH_ATTRIBUTE_VECTOR_COUNT, MORPH_TARGET_COLOR, MORPH_TARGET_NORMAL, MORPH_TARGET_POSITION, MORPH_TARGET_TANGENT, MORPH_TARGET_TEX0, MORPH_TARGET_TEX1, MORPH_TARGET_TEX2, MORPH_TARGET_TEX3, MORPH_WEIGHTS_VECTOR_COUNT, type MSDFBitmap, type MSDFOptions, type MSDFShape, MSDFText, MSDFTextAtlasManager, MSDFTextSprite, MToonMaterial, type MToonOutlineWidthMode, MakeVectorNode, Material, MaterialBlueprintIR, type MaterialBlueprintIRBehaviors, type MaterialTextureInfo, MaterialVaryingFlags, MaxNode, Mesh$1 as Mesh, MeshMaterial, type MeshUpdateCallback, type Metadata$1 as Metadata, MinNode, MixNode, ModNode, type ModelFetchOptions, type ModelInfo, type ModelLoader, type MorphBoundingInfo, type MorphData, type MorphInfo, type MorphState, MorphTargetTrack, MultiChainSpringSystem, type MultiChainSpringSystemOptions, type NamedJointsSkeletalAnimationMaskOptions, NamedObject, type NearestPointsResult, type NodeConnection, NodeEulerRotationTrack, type NodeIterateFunc, NodeRotationTrack, NodeScaleTrack, NodeTranslationTrack, NormalizeNode, NotEqualNode, type OIT, Octree, OctreeNode, OctreeNodeChunk, OctreePlacement, OrbitCameraController, type OrbitCameraControllerOptions, OrthoCamera, PBRBlockNode, PBRBluePrintMaterial, type PBRBlueprintOutputName, PBRMetallicRoughnessMaterial, type PBRReflectionMode, PBRSpecularGlossinessMaterial, type PCAGeometryCacheState, PCAGeometryCacheTrack, type PCAGeometryCacheTrackData, type PairAdjustment, PannerNode, ParticleMaterial, ParticleSystem, PerlinNoise2DNode, PerspectiveCamera, type PhysicsCurves, type PickResult, type PickTarget, PixelNormalNode, PixelWorldPositionNode, type PlaneCollider, type PlaneCreationOptions, PlaneShape, type PlayAnimationOptions, type PointInit, PointLight, type PointR, type PointRW, type PointTransform, PostEffectLayer, PowNode, Primitive, ProjectionMatrixNode, type PropEdit, type PropertyAccessor, type PropertyAccessorOptions, type PropertySceneNodeOptions, type PropertyToType, PropertyTrack, type PropertyType, type PropertyValue, PunctualLight, QUEUE_OPAQUE, QUEUE_TRANSPARENT, RENDER_PASS_TYPE_DEPTH, RENDER_PASS_TYPE_LIGHT, RENDER_PASS_TYPE_OBJECT_COLOR, RENDER_PASS_TYPE_SHADOWMAP, Radians2DegreesNode, RaycastVisitor, RectLight, ReflectNode, RefractNode, type RenderFunc, type RenderItemList, type RenderItemListBundle, type RenderItemListInfo, RenderPass, type RenderPath, RenderQueue, type RenderQueueItem, type RenderQueueRef, RenderTarget, type ResolutionTransform, ResolveVertexNormalNode, ResolveVertexPositionNode, ResolveVertexTangentNode, ResourceManager, RotateAboutAxisNode, RuntimeScript, type RuntimeScriptArrayDeclaration, type RuntimeScriptArrayElementDeclaration, type RuntimeScriptConfig, type RuntimeScriptObjectDeclaration, type RuntimeScriptObjectFieldDeclaration, type RuntimeScriptPropertyDeclaration, type RuntimeScriptPropertyInfo, type RuntimeScriptPropertyOptions, type RuntimeScriptPropertyType, type RuntimeScriptValueDeclaration, type RuntimeScriptValueType, SAO, type SSSDebugView, type SSSQualityPreset, type SSSResolvedSettings, type SamplerType, SaturateNode, type SaveOptions, Scene, type SceneMorphTargetBinding, type SceneMorphTargetGroup, SceneNode, type SceneNodeVisible, ScreenAdapter, type ScreenConfig, ScreenRenderTarget, type ScreenScaleMode, ScriptAttachment, type ScriptAttachmentConfig, ScriptRegistry, ScriptingSystem, type ScriptingSystemOptions, SelectionNode, type SerializableClass, type SerializedMorphTargetBinding, type SerializedMorphTargetGroup, ShaderHelper, ShadowMapPass, ShadowMapper, type ShadowMode, type ShadowQualityPreset, ShadowRegion, Shape, type ShapeCreationOptions, type ShapeOptionType, type ShapeType, SharedModel, SignNode, SimplexNoise2DNode, type SimulationParams, SinHNode, SinNode, type SkeletalAnimationMaskCommonOptions, type SkeletalAnimationMaskOptions, type SkeletalAnimationMaskRootMotionMode, type SkeletalAnimationMaskUnsupportedTrackMode, Skeleton, type SkeletonBindPose, SkeletonModifier, SkeletonRig, type SkeletonRigOptions, SkinBinding, type SkinnedBoundingBox, SkyEnvTextureNode, SkyRenderer, type SkyType, SmoothStepNode, type SphereCollider, type SphereCreationOptions, SphereShape, SpotLight, SpringChain, type SpringCollider, type SpringConstraint, SpringModifier, type SpringParticle, SpringSystem, type SpringSystemOptions, Sprite, SpriteBlockNode, SpriteBlueprintMaterial, SpriteMaterial, SqrtNode, StandardSpriteMaterial, StepNode, type StopAnimationOptions, SubsurfaceProfile, type SubsurfaceProfilePreset, type SurfaceCheckResult, SwizzleNode, TanHNode, TanNode, type TerrainDebugMode, type TetrahedronCreationOptions, TetrahedronFrameShape, TetrahedronShape, TextSprite, type TextureFetchOptions, type TextureMixinInstanceTypes, type TextureMixinTypes, type TextureProp, type TexturePropUniforms, TextureSampleGrad, TextureSampleNode, type ToMixedTextureType, Tonemap, type TorusCreationOptions, TorusShape, type TransformAccess, TransformNode, type TwistConstraint, TwoBoneIKSolver, UnlitMaterial, VertexBinormalNode, VertexBlockNode, VertexColorNode, VertexIndexNode, VertexNormalNode, VertexOutputNode, VertexPositionNode, VertexTangentNode, VertexUVNode, ViewMatrixNode, ViewProjMatrixNode, type Visitor, Water, type WaveGenerator, WeightedBlendedOIT, applyAngleLimits, applyMaterialMixins, applyResult, applyRuntimeScriptConfig, buildConstraints, buildMSDFShape, buildSurfaceFaces, checkSurfaceCollision, collisionDetection, collisionDetectionCapsule, collisionDetectionSphere, computeMaxDepth, computeNearestPoints, createCapsuleCollider, createGPUClothWrapBindingData, createGeometryCacheState, createPlaneCollider, createSphereCollider, createSpringConstraint, createSpringParticle, createTransformAccess, decode2HalfFromRGBA, decodeFloatFromRGBA, decodeNormalizedFloatFromRGBA, decodeRGBM, defineProps, encode2HalfToRGBA, encodeFloatToRGBA, encodeNormalizedFloatToRGBA, encodeRGBM, ensureGeometryCacheMeshBinding, fetchSampler, gammaToLinear, generateMSDF, getApp, getDevice, getEngine, getInput, getRuntimeScriptProperties, gradient, hash11, hash12, hash13, hash21, hash22, hash23, hash31, hash32, hash33, interleavedGradientNoise, isGPUClothSupported, linearToGamma, mixGeometryCacheBoundingBox, mixinAlbedoColor, mixinBlinnPhong, mixinFoliage, mixinLambert, mixinLight, mixinPBRBluePrint, mixinPBRCommon, mixinPBRMetallicRoughness, mixinPBRSpecularGlossness, mixinTextureProps, mixinVertexColor, noise3D, normalizeRuntimeScriptConfig, normalizeScriptAttachmentConfig, normalizeScriptAttachments, panoramaToCubemap, perlinNoise2D, perlinNoise3D, prefilterCubemap, pushInCollisionDetection, pushInFromCapsule, pushInFromCollider, pushInFromSphere, pushoutFromCapsule, pushoutFromCollider, pushoutFromSphere, resolveCapsuleCollision, resolvePlaneCollision, resolveSphereCollision, restoreGeometryCacheMeshBinding, scriptProp, simulate, smoothNoise3D, sortRootPointsByProximity, temporalResolve, tryGetApp, updateColliderFromNode, valueNoise, whiteNoise, worleyFBM, worleyNoise };