@hology/webgpu-renderer 0.1.18 → 0.1.19
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 +34 -12
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,18 +2,12 @@ import * as three from 'three';
|
|
|
2
2
|
import { Color, Vector2, Vector3, Vector4, Matrix3, Matrix4, Material, Texture, MaterialParameters, DirectionalLight, PointLight, SpotLight, Object3D, PerspectiveCamera, OrthographicCamera, BufferGeometry, Scene } from 'three';
|
|
3
3
|
export { AmbientLight, BackSide, BatchedMesh, Bone, BoxGeometry, BufferAttribute, BufferGeometry, CanvasTexture, Color, CompressedArrayTexture, CompressedCubeTexture, CompressedTexture, CompressedArrayTexture as CompressedTextureArray, CubeTexture, Data3DTexture, DataArrayTexture, DataTexture, DepthTexture, DirectionalLight, DoubleSide, FrontSide, Group, HemisphereLight, InstancedMesh, MathUtils, Matrix4, Mesh, Object3D, OrthographicCamera, PerspectiveCamera, PlaneGeometry, PointLight, RepeatWrapping, Scene, Skeleton, SkinnedMesh, SphereGeometry, SpotLight, Texture, Vector2, Vector3, Vector4 } from 'three';
|
|
4
4
|
|
|
5
|
-
interface
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
entryPoint?: string;
|
|
9
|
-
bindGroupLayoutEntries: GPUBindGroupLayoutEntry[];
|
|
10
|
-
}
|
|
11
|
-
declare class ComputeKernel {
|
|
12
|
-
readonly layout: GPUBindGroupLayout;
|
|
13
|
-
readonly pipeline: GPUComputePipeline;
|
|
14
|
-
constructor(device: GPUDevice, descriptor: ComputeKernelDescriptor);
|
|
15
|
-
createBindGroup(device: GPUDevice, entries: GPUBindGroupEntry[], label?: string): GPUBindGroup;
|
|
5
|
+
interface PipelineDiagnosticOrigin {
|
|
6
|
+
key: string;
|
|
7
|
+
[detail: string]: unknown;
|
|
16
8
|
}
|
|
9
|
+
declare function setPipelineDiagnosticLoading(device: GPUDevice, loading: boolean, phase: string): void;
|
|
10
|
+
declare function registerPipelineDiagnosticOrigin(device: GPUDevice, label: string, origin: PipelineDiagnosticOrigin): void;
|
|
17
11
|
|
|
18
12
|
type ShaderDefineValue = string | number | boolean;
|
|
19
13
|
type ShaderDefines = Record<string, ShaderDefineValue | null | undefined>;
|
|
@@ -151,6 +145,31 @@ declare class WGSLShaderMaterial extends Material {
|
|
|
151
145
|
private invalidateBindingCache;
|
|
152
146
|
}
|
|
153
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Lighting and post-processing stay in linear HDR until the present pass.
|
|
150
|
+
* The canvas format is intentionally kept separate because it is a display
|
|
151
|
+
* target, not an intermediate scene-color target.
|
|
152
|
+
*/
|
|
153
|
+
declare const SCENE_COLOR_FORMAT: GPUTextureFormat;
|
|
154
|
+
|
|
155
|
+
declare function createRenderPipelineAsync(device: GPUDevice, descriptor: GPURenderPipelineDescriptor): Promise<GPURenderPipeline>;
|
|
156
|
+
declare function createComputePipelineAsync(device: GPUDevice, descriptor: GPUComputePipelineDescriptor): Promise<GPUComputePipeline>;
|
|
157
|
+
|
|
158
|
+
interface ComputeKernelDescriptor {
|
|
159
|
+
label?: string;
|
|
160
|
+
code: string;
|
|
161
|
+
entryPoint?: string;
|
|
162
|
+
bindGroupLayoutEntries: GPUBindGroupLayoutEntry[];
|
|
163
|
+
}
|
|
164
|
+
declare class ComputeKernel {
|
|
165
|
+
readonly layout: GPUBindGroupLayout;
|
|
166
|
+
readonly pipeline: GPUComputePipeline;
|
|
167
|
+
static createAsync(device: GPUDevice, descriptor: ComputeKernelDescriptor): Promise<ComputeKernel>;
|
|
168
|
+
/** The optional pipeline allows adopting an already compiled kernel. */
|
|
169
|
+
constructor(device: GPUDevice, descriptor: ComputeKernelDescriptor, pipeline?: GPUComputePipeline);
|
|
170
|
+
createBindGroup(device: GPUDevice, entries: GPUBindGroupEntry[], label?: string): GPUBindGroup;
|
|
171
|
+
}
|
|
172
|
+
|
|
154
173
|
interface RenderGraphContext {
|
|
155
174
|
readonly device: GPUDevice;
|
|
156
175
|
readonly encoder: GPUCommandEncoder;
|
|
@@ -551,6 +570,7 @@ interface CompiledNodeFullscreenShader {
|
|
|
551
570
|
}>): void;
|
|
552
571
|
}
|
|
553
572
|
interface FrameGraphNodeFullscreenPassDescriptor {
|
|
573
|
+
readonly diagnosticOrigin?: PipelineDiagnosticOrigin;
|
|
554
574
|
readonly name: string;
|
|
555
575
|
readonly shader: CompiledNodeFullscreenShader;
|
|
556
576
|
/** Overrides frame-graph resources for named compiled graph/scene texture bindings. */
|
|
@@ -930,6 +950,7 @@ declare class WebGpuRenderer {
|
|
|
930
950
|
private readonly vertexAttributeGroupCache;
|
|
931
951
|
private readonly materialVertexAttributeCache;
|
|
932
952
|
private readonly vertexBufferBindingPlanCache;
|
|
953
|
+
private readonly preparedVertexBufferCache;
|
|
933
954
|
private readonly vertexAttributeGroupBufferKeyCache;
|
|
934
955
|
private readonly compileDrawScratch;
|
|
935
956
|
private readonly dynamicIndirectSubmissionCache;
|
|
@@ -1235,6 +1256,7 @@ declare class WebGpuRenderer {
|
|
|
1235
1256
|
private getInterleavedGeometryVertexBuffer;
|
|
1236
1257
|
private ensureWireframeIndex;
|
|
1237
1258
|
private bindGeometryVertexBuffers;
|
|
1259
|
+
private prepareGeometryVertexBuffers;
|
|
1238
1260
|
private getStandardVertexAttribute;
|
|
1239
1261
|
private prepareDrawGeometryVertexBuffers;
|
|
1240
1262
|
private getDefaultInstanceAttributeBuffer;
|
|
@@ -1743,4 +1765,4 @@ declare class OutlineEffect {
|
|
|
1743
1765
|
dispose(): void;
|
|
1744
1766
|
}
|
|
1745
1767
|
|
|
1746
|
-
export { type BloomCompositeOptions, BloomEffect, type BloomOptions, ColorGradingEffect, type ColorGradingOptions, type ColorGradingRange, type ColorGradingVector, type CompiledNodeFullscreenShader, ComputeKernel, type ComputeKernelDescriptor, DEFAULT_WGSL_VERTEX_ATTRIBUTES, DepthOfFieldEffect, type DepthOfFieldOptions, type FXAACompositeOptions, FXAAEffect, type FXAAOptions, FrameGraphBuilder, type FrameGraphFullscreenPassDescriptor, type FrameGraphMaterialPassDescriptor, type FrameGraphNodeFullscreenPassDescriptor, type FrameGraphPassDescriptor, type FrameGraphTextureHandle, type GTAOCompositeOptions, type GTAODenoiseOptions, GTAOEffect, type GTAOInputs, type GTAOOptions, type GTAOQuality, type GTAOTemporalOptions, GTAO_PRESETS, MOTION_BLUR_PRESETS, MotionBlurEffect, MotionBlurMode, type MotionBlurOptions, type MotionBlurOverride, type MotionBlurOverrideHandle, type MotionBlurQuality, OutlineEffect, type OutlineInputs, type OutlineInstanceSelection, type OutlineOptions, RenderGraph, type RenderGraphContext, type RenderGraphExecutionObserver, type RenderGraphPass, type RendererColorTargetDescriptor, type RendererCustomPassContext, type RendererCustomPassDescriptor, type RendererFrameProfile, type RendererGraphBuilder, type RendererGraphBuilderContext, type RendererMaterialPassDescriptor, type RendererMaterialResolver, type RendererOptions, type RendererPassProfile, type RendererShadowMapDebugInfo, type RendererShadowMapDebugTextureInfo, type RendererTextureTargetDescriptor, type RendererVisibilityProfile, type SMAACompositeOptions, type SMAAEdgeDetectionMode, SMAAEffect, type SMAAOptions, type SMAAQualityPreset, SSREffect, type SSRInputs, type SSROptions, type ShaderDefineValue, type ShaderDefines, type StaticDrawSet, type StaticDrawSetOptions, TemporalAAEffect, type TemporalAAOptions, type ToneMappingMode, type ToonOutlineParameters, type UniformDefinition, type UniformType, type UniformValue, VOLUMETRIC_FOG_MATERIAL_WGSL, VOLUMETRIC_FOG_PRESETS, type VolumetricFogBlurOptions, VolumetricFogEffect, type VolumetricFogInputs, type VolumetricFogOptions, type VolumetricFogQuality, type VolumetricFogScatteringMode, type VolumetricFogTemporalOptions, VolumetricFogVolumeObject, type VolumetricFogVolumeSettings, type WGSLGraphTextureDimension, type WGSLGraphTextureInput, type WGSLSceneTextureSemantic, WGSLShaderMaterial, type WGSLShaderMaterialParameters, type WGSLShaderMaterialUniform, type WGSLShaderMaterialUniformInput, type WGSLStorageBufferBinding, type WGSLStorageBufferVisibility, type WGSLSupportedVertexFormat, type WGSLVertexAttributeBinding, WebGpuPMREMGenerator, WebGpuRenderer, buildParticleLightingShaderHeader, configureVolumetricFogMaterial };
|
|
1768
|
+
export { type BloomCompositeOptions, BloomEffect, type BloomOptions, ColorGradingEffect, type ColorGradingOptions, type ColorGradingRange, type ColorGradingVector, type CompiledNodeFullscreenShader, ComputeKernel, type ComputeKernelDescriptor, DEFAULT_WGSL_VERTEX_ATTRIBUTES, DepthOfFieldEffect, type DepthOfFieldOptions, type FXAACompositeOptions, FXAAEffect, type FXAAOptions, FrameGraphBuilder, type FrameGraphFullscreenPassDescriptor, type FrameGraphMaterialPassDescriptor, type FrameGraphNodeFullscreenPassDescriptor, type FrameGraphPassDescriptor, type FrameGraphTextureHandle, type GTAOCompositeOptions, type GTAODenoiseOptions, GTAOEffect, type GTAOInputs, type GTAOOptions, type GTAOQuality, type GTAOTemporalOptions, GTAO_PRESETS, MOTION_BLUR_PRESETS, MotionBlurEffect, MotionBlurMode, type MotionBlurOptions, type MotionBlurOverride, type MotionBlurOverrideHandle, type MotionBlurQuality, OutlineEffect, type OutlineInputs, type OutlineInstanceSelection, type OutlineOptions, type PipelineDiagnosticOrigin, RenderGraph, type RenderGraphContext, type RenderGraphExecutionObserver, type RenderGraphPass, type RendererColorTargetDescriptor, type RendererCustomPassContext, type RendererCustomPassDescriptor, type RendererFrameProfile, type RendererGraphBuilder, type RendererGraphBuilderContext, type RendererMaterialPassDescriptor, type RendererMaterialResolver, type RendererOptions, type RendererPassProfile, type RendererShadowMapDebugInfo, type RendererShadowMapDebugTextureInfo, type RendererTextureTargetDescriptor, type RendererVisibilityProfile, SCENE_COLOR_FORMAT, type SMAACompositeOptions, type SMAAEdgeDetectionMode, SMAAEffect, type SMAAOptions, type SMAAQualityPreset, SSREffect, type SSRInputs, type SSROptions, type ShaderDefineValue, type ShaderDefines, type StaticDrawSet, type StaticDrawSetOptions, TemporalAAEffect, type TemporalAAOptions, type ToneMappingMode, type ToonOutlineParameters, type UniformDefinition, type UniformType, type UniformValue, VOLUMETRIC_FOG_MATERIAL_WGSL, VOLUMETRIC_FOG_PRESETS, type VolumetricFogBlurOptions, VolumetricFogEffect, type VolumetricFogInputs, type VolumetricFogOptions, type VolumetricFogQuality, type VolumetricFogScatteringMode, type VolumetricFogTemporalOptions, VolumetricFogVolumeObject, type VolumetricFogVolumeSettings, type WGSLGraphTextureDimension, type WGSLGraphTextureInput, type WGSLSceneTextureSemantic, WGSLShaderMaterial, type WGSLShaderMaterialParameters, type WGSLShaderMaterialUniform, type WGSLShaderMaterialUniformInput, type WGSLStorageBufferBinding, type WGSLStorageBufferVisibility, type WGSLSupportedVertexFormat, type WGSLVertexAttributeBinding, WebGpuPMREMGenerator, WebGpuRenderer, buildParticleLightingShaderHeader, configureVolumetricFogMaterial, createComputePipelineAsync, createRenderPipelineAsync, registerPipelineDiagnosticOrigin, setPipelineDiagnosticLoading };
|