@hology/webgpu-renderer 0.1.13 → 0.1.15
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 +26 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -302,6 +302,27 @@ 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;
|
|
317
|
+
/** Records UI/debug overlays onto the native-resolution surface after all upscaling. */
|
|
318
|
+
presentationOverlay?: (context: {
|
|
319
|
+
readonly device: GPUDevice;
|
|
320
|
+
readonly encoder: GPUCommandEncoder;
|
|
321
|
+
readonly targetView: GPUTextureView;
|
|
322
|
+
readonly targetFormat: GPUTextureFormat;
|
|
323
|
+
readonly presentationWidth: number;
|
|
324
|
+
readonly presentationHeight: number;
|
|
325
|
+
}) => void;
|
|
305
326
|
/** Material used when a mesh does not already use WGSLShaderMaterial. */
|
|
306
327
|
fallbackMaterial?: WGSLShaderMaterial;
|
|
307
328
|
/** Optional bridge for graph/material systems layered on top of Three. */
|
|
@@ -873,6 +894,9 @@ declare class WebGpuRenderer {
|
|
|
873
894
|
private readonly defaultInstanceAttributeBuffers;
|
|
874
895
|
private readonly textureManager;
|
|
875
896
|
private readonly renderGraph;
|
|
897
|
+
private readonly nativePostSubmit;
|
|
898
|
+
private readonly presentationOverlay;
|
|
899
|
+
private readonly presentationOverlayContext;
|
|
876
900
|
private readonly directionalShadowCameras;
|
|
877
901
|
private readonly pointShadowCameras;
|
|
878
902
|
private readonly spotShadowCameras;
|
|
@@ -981,7 +1005,7 @@ declare class WebGpuRenderer {
|
|
|
981
1005
|
private resolveLineBasicMaterial;
|
|
982
1006
|
private resolveSkinnedMaterial;
|
|
983
1007
|
private hasRenderCallbacks;
|
|
984
|
-
initialize(): Promise<void>;
|
|
1008
|
+
initialize(providedAdapter?: GPUAdapter): Promise<void>;
|
|
985
1009
|
createComputeKernel(descriptor: ComputeKernelDescriptor): ComputeKernel;
|
|
986
1010
|
getDevice(): GPUDevice | null;
|
|
987
1011
|
setRenderGraphBuilder(builder: RendererGraphBuilder): void;
|
|
@@ -1058,6 +1082,7 @@ declare class WebGpuRenderer {
|
|
|
1058
1082
|
createStaticDrawSet(root: Object3D, options?: StaticDrawSetOptions): StaticDrawSet;
|
|
1059
1083
|
private disposeStaticDrawSetResource;
|
|
1060
1084
|
private renderFrame;
|
|
1085
|
+
private recordPresentationOverlay;
|
|
1061
1086
|
destroy(): void;
|
|
1062
1087
|
private createStaticPipelines;
|
|
1063
1088
|
private recreateShadowResources;
|