@hology/webgpu-renderer 0.1.29 → 0.1.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -279,6 +279,12 @@ interface RendererOptions {
279
279
  fallbackMaterial?: WGSLShaderMaterial;
280
280
  /** Optional bridge for graph/material systems layered on top of Three. */
281
281
  materialResolver?: RendererMaterialResolver;
282
+ /**
283
+ * Opt an adapter source into cross-frame reuse. Return a revision that changes
284
+ * when adapter inputs change, or undefined for implicitly mutable sources.
285
+ * Source material.version and renderer invalidation are tracked separately.
286
+ */
287
+ getMaterialResolutionRevision?: (material: Material) => number | undefined;
282
288
  /**
283
289
  * Material used for a SkinnedMesh whose source material is not skin-aware.
284
290
  * Defaults to the renderer's built-in lit skinned fallback.
@@ -971,6 +977,8 @@ declare class WebGpuRenderer {
971
977
  private readonly pointShadowMapSize;
972
978
  private readonly fallbackMaterial;
973
979
  private readonly materialResolver;
980
+ private readonly getMaterialResolutionRevision;
981
+ private materialResolutionEpoch;
974
982
  private readonly toonOutlineMaterialCache;
975
983
  private readonly fallbackSkinnedMaterial;
976
984
  private readonly invokeObjectRenderCallbacks;
@@ -1093,6 +1101,13 @@ declare class WebGpuRenderer {
1093
1101
  private readonly colorFormatsValueCache;
1094
1102
  private nextColorFormatsId;
1095
1103
  private readonly renderBundleScratch;
1104
+ private skinnedMaterialBundle;
1105
+ private skinnedMaterialBundleKey;
1106
+ private skinnedMaterialBundleKeyScratch;
1107
+ private readonly skinnedMaterialBundleStats;
1108
+ private readonly skinnedDepthBundleCache;
1109
+ private directionalDepthBundleCaches;
1110
+ private readonly directionalDynamicCastersScratch;
1096
1111
  private readonly indirectMaterialResourcesScratch;
1097
1112
  private readonly directBundleDrawStatsScratch;
1098
1113
  private readonly sortedOpaqueBatchesScratch;
@@ -1220,6 +1235,7 @@ declare class WebGpuRenderer {
1220
1235
  /** Re-run material adapters after enabling renderer features between extractions. */
1221
1236
  invalidateMaterialResolution(): void;
1222
1237
  private resolveMaterial;
1238
+ private resolveAdaptedMaterial;
1223
1239
  private resolveLineMaterial;
1224
1240
  private resolveLineBasicMaterial;
1225
1241
  private resolveSkinnedMaterial;
@@ -1407,6 +1423,8 @@ declare class WebGpuRenderer {
1407
1423
  private getIndirectBundleHash;
1408
1424
  private getColorFormatsId;
1409
1425
  private getDirectForwardBundleKey;
1426
+ private clearSkinnedMaterialBundle;
1427
+ private skinnedMaterialBundleInputsStable;
1410
1428
  private getOrCreateDirectForwardBundle;
1411
1429
  private getOrCreateStaticMaterialBundle;
1412
1430
  private resolveSceneBindGroupForDraw;
@@ -1420,6 +1438,8 @@ declare class WebGpuRenderer {
1420
1438
  private executePointShadowPass;
1421
1439
  private executeSpotShadowPass;
1422
1440
  private executeDepthPrepass;
1441
+ private clearDynamicDepthBundles;
1442
+ private tryExecuteDynamicDepthBundle;
1423
1443
  private executeStaticDepthPrepass;
1424
1444
  private executeStaticTemporalDepthResolvePass;
1425
1445
  private getOrCreateStaticDepthPrepassBundle;
@@ -1440,8 +1460,8 @@ declare class WebGpuRenderer {
1440
1460
  private clearSpotShadow;
1441
1461
  private drawDepthLike;
1442
1462
  private getGeometryResource;
1443
- /** Upload changed standard BufferAttributes without replacing their buffers. */
1444
- private updateDynamicGeometryAttributes;
1463
+ /** Validate standard geometry and upload compatible edits to existing buffers. */
1464
+ private refreshGeometryResource;
1445
1465
  private getSkinnedGeometryResource;
1446
1466
  private getSkinningPalette;
1447
1467
  private releaseSkinningPalette;