@hology/webgpu-renderer 0.1.28 → 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
@@ -166,6 +166,8 @@ declare class WGSLShaderMaterial extends Material {
166
166
  customProgramCacheKey(): string;
167
167
  /** Depth passes can share pipelines despite differences in unused forward shading. */
168
168
  getDepthProgramCacheKey(pointShadow?: boolean): string;
169
+ /** Set needsUpdate after changing rasterizer state on an active material. */
170
+ private getPolygonOffsetCacheKey;
169
171
  private createProgramCacheKey;
170
172
  getTexturesList(): readonly Texture[];
171
173
  usesSceneTextures(): boolean;
@@ -207,10 +209,16 @@ interface RenderGraphPass {
207
209
 
208
210
  declare class RenderGraph {
209
211
  private readonly passes;
212
+ private readonly topologies;
213
+ private readonly executionSnapshots;
214
+ private matchesTopology;
215
+ private matchesResources;
210
216
  addPass(pass: RenderGraphPass): void;
211
217
  executeAsync(context: RenderGraphContext, observer?: RenderGraphExecutionObserver): Promise<void>;
212
218
  execute(context: RenderGraphContext, observer?: RenderGraphExecutionObserver): void;
213
219
  reset(): void;
220
+ private createExecutionSnapshot;
221
+ private releaseExecutionSnapshot;
214
222
  private resolveExecutionOrder;
215
223
  }
216
224
 
@@ -271,6 +279,12 @@ interface RendererOptions {
271
279
  fallbackMaterial?: WGSLShaderMaterial;
272
280
  /** Optional bridge for graph/material systems layered on top of Three. */
273
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;
274
288
  /**
275
289
  * Material used for a SkinnedMesh whose source material is not skin-aware.
276
290
  * Defaults to the renderer's built-in lit skinned fallback.
@@ -963,6 +977,8 @@ declare class WebGpuRenderer {
963
977
  private readonly pointShadowMapSize;
964
978
  private readonly fallbackMaterial;
965
979
  private readonly materialResolver;
980
+ private readonly getMaterialResolutionRevision;
981
+ private materialResolutionEpoch;
966
982
  private readonly toonOutlineMaterialCache;
967
983
  private readonly fallbackSkinnedMaterial;
968
984
  private readonly invokeObjectRenderCallbacks;
@@ -1085,6 +1101,13 @@ declare class WebGpuRenderer {
1085
1101
  private readonly colorFormatsValueCache;
1086
1102
  private nextColorFormatsId;
1087
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;
1088
1111
  private readonly indirectMaterialResourcesScratch;
1089
1112
  private readonly directBundleDrawStatsScratch;
1090
1113
  private readonly sortedOpaqueBatchesScratch;
@@ -1152,6 +1175,11 @@ declare class WebGpuRenderer {
1152
1175
  private readonly objectTraversalStackScratch;
1153
1176
  private readonly staticSceneSpatialIndex;
1154
1177
  private readonly staticMeshDraws;
1178
+ private readonly staticInstanceSlots;
1179
+ private readonly retiredStaticInstanceSlots;
1180
+ private readonly staticSpatialDraws;
1181
+ private staticSpatialDrawRevision;
1182
+ private readonly staticSpatialBatches;
1155
1183
  private readonly spatialShadowPlanes;
1156
1184
  private spatialShadowCount;
1157
1185
  private readonly spatialLocalShadowSpheres;
@@ -1207,6 +1235,7 @@ declare class WebGpuRenderer {
1207
1235
  /** Re-run material adapters after enabling renderer features between extractions. */
1208
1236
  invalidateMaterialResolution(): void;
1209
1237
  private resolveMaterial;
1238
+ private resolveAdaptedMaterial;
1210
1239
  private resolveLineMaterial;
1211
1240
  private resolveLineBasicMaterial;
1212
1241
  private resolveSkinnedMaterial;
@@ -1362,6 +1391,7 @@ declare class WebGpuRenderer {
1362
1391
  private commitObjectMotionHistory;
1363
1392
  private createRepeatedMeshInstances;
1364
1393
  private collectMesh;
1394
+ private collectStaticMeshDraws;
1365
1395
  private prepareSceneForCompilation;
1366
1396
  private collectInstancedMesh;
1367
1397
  private getSkinnedRenderRecord;
@@ -1393,6 +1423,8 @@ declare class WebGpuRenderer {
1393
1423
  private getIndirectBundleHash;
1394
1424
  private getColorFormatsId;
1395
1425
  private getDirectForwardBundleKey;
1426
+ private clearSkinnedMaterialBundle;
1427
+ private skinnedMaterialBundleInputsStable;
1396
1428
  private getOrCreateDirectForwardBundle;
1397
1429
  private getOrCreateStaticMaterialBundle;
1398
1430
  private resolveSceneBindGroupForDraw;
@@ -1406,6 +1438,8 @@ declare class WebGpuRenderer {
1406
1438
  private executePointShadowPass;
1407
1439
  private executeSpotShadowPass;
1408
1440
  private executeDepthPrepass;
1441
+ private clearDynamicDepthBundles;
1442
+ private tryExecuteDynamicDepthBundle;
1409
1443
  private executeStaticDepthPrepass;
1410
1444
  private executeStaticTemporalDepthResolvePass;
1411
1445
  private getOrCreateStaticDepthPrepassBundle;
@@ -1426,8 +1460,8 @@ declare class WebGpuRenderer {
1426
1460
  private clearSpotShadow;
1427
1461
  private drawDepthLike;
1428
1462
  private getGeometryResource;
1429
- /** Upload changed standard BufferAttributes without replacing their buffers. */
1430
- private updateDynamicGeometryAttributes;
1463
+ /** Validate standard geometry and upload compatible edits to existing buffers. */
1464
+ private refreshGeometryResource;
1431
1465
  private getSkinnedGeometryResource;
1432
1466
  private getSkinningPalette;
1433
1467
  private releaseSkinningPalette;
@@ -1459,6 +1493,7 @@ declare class WebGpuRenderer {
1459
1493
  private prepareGeometryVertexBuffers;
1460
1494
  private getStandardVertexAttribute;
1461
1495
  private prepareDrawGeometryVertexBuffers;
1496
+ private getInstanceVertexCapacity;
1462
1497
  private getDefaultVertexAttributeBuffer;
1463
1498
  private getMeshExtractionCacheEntry;
1464
1499
  private getInstancedMeshExtractionCacheEntry;