@hology/webgpu-renderer 0.1.14 → 0.1.16
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 +19 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -292,6 +292,8 @@ interface RendererOptions {
|
|
|
292
292
|
pointShadowMapSize?: number;
|
|
293
293
|
sampleCount?: number;
|
|
294
294
|
hiZOcclusionCulling?: boolean;
|
|
295
|
+
/** 16x16 GPU point-light masks for opaque graph materials. Defaults to true. */
|
|
296
|
+
tiledLighting?: boolean;
|
|
295
297
|
/**
|
|
296
298
|
* Uses Chromium's experimental multi-draw-indirect command for GPU-culled
|
|
297
299
|
* static draw sets when the adapter supports it. Defaults to true.
|
|
@@ -314,6 +316,15 @@ interface RendererOptions {
|
|
|
314
316
|
readonly presentationHeight: number;
|
|
315
317
|
present(sourceView: GPUTextureView): void;
|
|
316
318
|
}) => void;
|
|
319
|
+
/** Records UI/debug overlays onto the native-resolution surface after all upscaling. */
|
|
320
|
+
presentationOverlay?: (context: {
|
|
321
|
+
readonly device: GPUDevice;
|
|
322
|
+
readonly encoder: GPUCommandEncoder;
|
|
323
|
+
readonly targetView: GPUTextureView;
|
|
324
|
+
readonly targetFormat: GPUTextureFormat;
|
|
325
|
+
readonly presentationWidth: number;
|
|
326
|
+
readonly presentationHeight: number;
|
|
327
|
+
}) => void;
|
|
317
328
|
/** Material used when a mesh does not already use WGSLShaderMaterial. */
|
|
318
329
|
fallbackMaterial?: WGSLShaderMaterial;
|
|
319
330
|
/** Optional bridge for graph/material systems layered on top of Three. */
|
|
@@ -820,6 +831,8 @@ declare class WebGpuRenderer {
|
|
|
820
831
|
private multiDrawIndirectEnabled;
|
|
821
832
|
private dynamicBatchingEnabled;
|
|
822
833
|
private multiDrawIndirectSupported;
|
|
834
|
+
private tiledPointLights;
|
|
835
|
+
private tiledLightingEnabled;
|
|
823
836
|
private renderGraphProfilingEnabled;
|
|
824
837
|
private indirectFirstInstanceSupported;
|
|
825
838
|
private timestampQuerySupported;
|
|
@@ -886,6 +899,8 @@ declare class WebGpuRenderer {
|
|
|
886
899
|
private readonly textureManager;
|
|
887
900
|
private readonly renderGraph;
|
|
888
901
|
private readonly nativePostSubmit;
|
|
902
|
+
private readonly presentationOverlay;
|
|
903
|
+
private readonly presentationOverlayContext;
|
|
889
904
|
private readonly directionalShadowCameras;
|
|
890
905
|
private readonly pointShadowCameras;
|
|
891
906
|
private readonly spotShadowCameras;
|
|
@@ -1044,6 +1059,8 @@ declare class WebGpuRenderer {
|
|
|
1044
1059
|
getHiZOcclusionCullingActive(): boolean;
|
|
1045
1060
|
setMultiDrawIndirectEnabled(enabled: boolean): void;
|
|
1046
1061
|
getMultiDrawIndirectEnabled(): boolean;
|
|
1062
|
+
/** Toggle without recompiling materials, for scene-specific GPU comparisons. */
|
|
1063
|
+
setTiledLightingEnabled(enabled: boolean): void;
|
|
1047
1064
|
setDynamicBatchingEnabled(enabled: boolean): void;
|
|
1048
1065
|
getDynamicBatchingEnabled(): boolean;
|
|
1049
1066
|
getMultiDrawIndirectSupported(): boolean;
|
|
@@ -1071,6 +1088,7 @@ declare class WebGpuRenderer {
|
|
|
1071
1088
|
createStaticDrawSet(root: Object3D, options?: StaticDrawSetOptions): StaticDrawSet;
|
|
1072
1089
|
private disposeStaticDrawSetResource;
|
|
1073
1090
|
private renderFrame;
|
|
1091
|
+
private recordPresentationOverlay;
|
|
1074
1092
|
destroy(): void;
|
|
1075
1093
|
private createStaticPipelines;
|
|
1076
1094
|
private recreateShadowResources;
|
|
@@ -1258,6 +1276,7 @@ declare class WebGpuRenderer {
|
|
|
1258
1276
|
private getDepthPassMaterialResourceAsync;
|
|
1259
1277
|
private getMaterialResource;
|
|
1260
1278
|
private getMaterialResourceAsync;
|
|
1279
|
+
private ensureTiledLightingSize;
|
|
1261
1280
|
private updateCameraUniforms;
|
|
1262
1281
|
private updateTemporalVisibilityUniforms;
|
|
1263
1282
|
private commitTemporalHiZHistory;
|