@hology/webgpu-renderer 0.1.20 → 0.1.22

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
@@ -120,6 +120,8 @@ declare class WGSLShaderMaterial extends Material {
120
120
  wireframe: boolean;
121
121
  private uniformLayoutCache;
122
122
  private programCacheKeyCache;
123
+ private depthProgramCacheKeyCache;
124
+ private pointShadowProgramCacheKeyCache;
123
125
  private textureListCache;
124
126
  private textureVersionsCache;
125
127
  private textureVersionHashCache;
@@ -152,6 +154,9 @@ declare class WGSLShaderMaterial extends Material {
152
154
  /** Three's default clone path cannot call this material's required constructor. */
153
155
  clone(): this;
154
156
  customProgramCacheKey(): string;
157
+ /** Depth passes can share pipelines despite differences in unused forward shading. */
158
+ getDepthProgramCacheKey(pointShadow?: boolean): string;
159
+ private createProgramCacheKey;
155
160
  getTexturesList(): readonly Texture[];
156
161
  usesSceneTextures(): boolean;
157
162
  usesSceneColor(): boolean;
@@ -214,6 +219,8 @@ interface RendererOptions {
214
219
  powerPreference?: GPUPowerPreference;
215
220
  shadowMapSize?: number;
216
221
  directionalShadowUpdates?: DirectionalShadowUpdateOptions;
222
+ /** GPU caster selection/indirect submission for supported static draws. Defaults to true. */
223
+ directionalShadowGpuCulling?: boolean;
217
224
  pointShadowMapSize?: number;
218
225
  sampleCount?: number;
219
226
  hiZOcclusionCulling?: boolean;
@@ -426,6 +433,8 @@ interface RendererFrameProfile {
426
433
  reusedLayers: number;
427
434
  forcedLayers: number;
428
435
  updateMask: number;
436
+ /** Indirect command count; triangle counters remain upper bounds with GPU culling. */
437
+ gpuIndirectDraws?: number;
429
438
  };
430
439
  frameIndex: number;
431
440
  cpuTimeMs: number;
@@ -987,6 +996,8 @@ declare class WebGpuRenderer {
987
996
  private readonly presentationOverlayContext;
988
997
  private readonly directionalShadowCameras;
989
998
  private readonly directionalShadowScheduler;
999
+ private readonly directionalShadowGpu;
1000
+ private readonly directionalShadowSubmissionStats;
990
1001
  private readonly pointShadowCameras;
991
1002
  private readonly spotShadowCameras;
992
1003
  private readonly colorTargetCache;
@@ -1135,6 +1146,7 @@ declare class WebGpuRenderer {
1135
1146
  setDirectionalShadowUpdateOptions(options: DirectionalShadowUpdateOptions): void;
1136
1147
  /** Invalidate retained maps after discontinuous caster/scene changes. */
1137
1148
  invalidateDirectionalShadows(): void;
1149
+ setDirectionalShadowGpuCullingEnabled(enabled: boolean): void;
1138
1150
  setDirectionalShadowsEnabled(enabled: boolean): void;
1139
1151
  setRenderGraphProfilingEnabled(enabled: boolean): void;
1140
1152
  getRenderGraphProfilingEnabled(): boolean;
@@ -1327,6 +1339,7 @@ declare class WebGpuRenderer {
1327
1339
  private getMaterialVertexAttributes;
1328
1340
  private getGeometryVertexBuffer;
1329
1341
  private cacheGeometryVertexBufferFast;
1342
+ private readonly packedVertexGroups;
1330
1343
  private getInterleavedGeometryVertexBuffer;
1331
1344
  private ensureWireframeIndex;
1332
1345
  private bindGeometryVertexBuffers;