World AABB inflate as a fraction of camera-to-box distance.
Default 0. Set to 0.02 for the old distance-scaled expand (hurts far culls).
Packed CPU depth after reprojection into the camera used by the last execute.
Extra coverage pixels around the projected test rect. Default 0. Raise if fast camera motion pops occluded far objects back to visible.
Adds the object to the queue for occlusion testing.
The unique identifier returned earlier by the lock() method.
Optional_extra: number | number[]A queue index or -1 (if internal verification inconsistencies occur, for example, the tester is unavailable or the tester is waiting for synchronization).
Reprojects the last harvested capture and tests the queue. Does not poll readbacks — call frameUpdate every frame. Does not build the downsample chain — call updateGPUDepthBuffer after opaque depth.
Increments the coverage frame id and harvests finished GPU→CPU downloads.
Call every frame (typically on frameupdate, or at the start of update).
Distinct from execute, which only tests queued AABBs.
The time since the last frame.
Return the result of the last occlusion test for the specified object.
The unique identifier of the object.
OCCLUSION_UNKNOWN, OCCLUSION_VISIBLE, or OCCLUSION_OCCLUDED.
Registers a BoundingBox for subsequent occlusion testing.
The bounds of the object in local or world coordinates.
Optionalmatrix: Mat4
Optional transformation matrix (if a local BoundingBox is used).
Optional extra data 1.
Optional extra data 2.
A unique identifier for the registered object.
Registers a BoundingBox for subsequent occlusion testing.
The array containing the bounding box data (min and max points) in local or world coordinates [minX, maxX, minY, maxY, minZ, maxZ].
The offset in the array where the bounding box data starts.
Optionalmatrix: Mat4
Optional transformation matrix (if a local BoundingBox is used).
Optionalextra1: number
Optional extra data 1.
Optionalextra2: number
Optional extra data 2.
A unique identifier for the registered object.
Releases a previously registered identifier and removes associated data.
The unique identifier obtained from the lock() call.
Builds the coverage downsample chain from the camera depth buffer and packs the last level for readback. Call after opaque geometry has written depth. Distinct from frameUpdate (harvest) and execute (AABB tests).
GPU coverage depth → CPU AABB tester.
updateGPUDepthBuffer downsamples scene depth (4-tap max, 256∶128 chain) and packs the last level as view-space Z for GPU→CPU download. frameUpdate polls finished readbacks. execute reprojects the last capture and tests queued AABBs on the CPU. Results lag at least one GPU frame.
Works with WebglCoverageBuffer (transform feedback + PBO) and WebgpuCoverageBuffer (compute pack + mapAsync).