@hology/webgpu-renderer 0.1.12 → 0.1.14

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
@@ -302,6 +302,18 @@ interface RendererOptions {
302
302
  renderGraphProfiling?: boolean;
303
303
  /** Internal scene resolution relative to the presentation resolution. Defaults to 1. */
304
304
  renderScale?: number;
305
+ /**
306
+ * Experimental native bridge invoked after the scene command buffer is
307
+ * submitted. The callback may enqueue native work and a final presentation
308
+ * command buffer using the retained surface view.
309
+ */
310
+ nativePostSubmit?: (context: {
311
+ readonly device: GPUDevice;
312
+ readonly presentationView: GPUTextureView;
313
+ readonly presentationWidth: number;
314
+ readonly presentationHeight: number;
315
+ present(sourceView: GPUTextureView): void;
316
+ }) => void;
305
317
  /** Material used when a mesh does not already use WGSLShaderMaterial. */
306
318
  fallbackMaterial?: WGSLShaderMaterial;
307
319
  /** Optional bridge for graph/material systems layered on top of Three. */
@@ -793,7 +805,9 @@ declare class WebGpuRenderer {
793
805
  readonly canvas: HTMLCanvasElement;
794
806
  private readonly clearColor;
795
807
  private readonly powerPreference;
796
- private readonly shadowMapSize;
808
+ private shadowMapSize;
809
+ private directionalShadowsEnabled;
810
+ private readonly spotShadowMapSize;
797
811
  private readonly pointShadowMapSize;
798
812
  private readonly fallbackMaterial;
799
813
  private readonly materialResolver;
@@ -871,6 +885,7 @@ declare class WebGpuRenderer {
871
885
  private readonly defaultInstanceAttributeBuffers;
872
886
  private readonly textureManager;
873
887
  private readonly renderGraph;
888
+ private readonly nativePostSubmit;
874
889
  private readonly directionalShadowCameras;
875
890
  private readonly pointShadowCameras;
876
891
  private readonly spotShadowCameras;
@@ -979,7 +994,7 @@ declare class WebGpuRenderer {
979
994
  private resolveLineBasicMaterial;
980
995
  private resolveSkinnedMaterial;
981
996
  private hasRenderCallbacks;
982
- initialize(): Promise<void>;
997
+ initialize(providedAdapter?: GPUAdapter): Promise<void>;
983
998
  createComputeKernel(descriptor: ComputeKernelDescriptor): ComputeKernel;
984
999
  getDevice(): GPUDevice | null;
985
1000
  setRenderGraphBuilder(builder: RendererGraphBuilder): void;
@@ -993,6 +1008,9 @@ declare class WebGpuRenderer {
993
1008
  readonly x: number;
994
1009
  readonly y: number;
995
1010
  }[], lights?: readonly DirectionalLight[]): void;
1011
+ /** Sets the base resolution used by directional shadow-map array layers. */
1012
+ setDirectionalShadowMapSize(size: number): void;
1013
+ setDirectionalShadowsEnabled(enabled: boolean): void;
996
1014
  setRenderGraphProfilingEnabled(enabled: boolean): void;
997
1015
  getRenderGraphProfilingEnabled(): boolean;
998
1016
  getTimestampQuerySupported(): boolean;
@@ -1056,6 +1074,7 @@ declare class WebGpuRenderer {
1056
1074
  destroy(): void;
1057
1075
  private createStaticPipelines;
1058
1076
  private recreateShadowResources;
1077
+ private recreateDirectionalShadowResources;
1059
1078
  private ensureShadowTextureSizes;
1060
1079
  private ensureColorTarget;
1061
1080
  private ensureMsaaColorTarget;