three-virtual-geometry
Version:
Virtual geometry for three.js WebGPU: automatic cluster LOD and GPU-driven culling for billions of triangles. Independent implementation, not affiliated with Epic Games.
14 lines (13 loc) • 757 B
TypeScript
/**
* WebGPU limits to request when creating the renderer, so VirtualGeometry can use the GPU's full buffer sizes:
*
* const renderer = new THREE.WebGPURenderer({ requiredLimits: await virtualGeometryLimits() });
*
* Only needed for single meshes whose cluster hierarchy is larger than 128 MB, the size every WebGPU device supports
* by default: scans and models of roughly 5 million triangles or more. Smaller meshes, however many, never need it.
* Pass the same `powerPreference` you give the renderer, so the limits come from the same GPU. Returns `{}` (no extra
* limits) when WebGPU is not available.
*/
export declare function virtualGeometryLimits(options?: {
powerPreference?: GPUPowerPreference;
}): Promise<Record<string, number>>;