@playcanvas/splat-transform
Version:
Library and CLI tool for 3D Gaussian splat format conversion and transformation
20 lines (19 loc) • 897 B
TypeScript
/**
* Prepares indirect-dispatch arguments by reading `totalPairs[0]` and
* writing workgroup counts into two slots of the device's
* `indirectDispatchBuffer` (each slot is 3 × u32 = `(x, y, z)`):
*
* - `sortSlot`: workgroup count for `ComputeRadixSort.sortIndirect`,
* computed as `ceil(totalPairs / 2048)` (matches the radix sort's
* 16×16 thread × 8 elements / thread = 2048 elements/workgroup).
* - `boundariesSlot`: workgroup count for `findBoundaries`, computed
* as `ceil(totalPairs / 64)`.
*
* Slot byte offsets are passed in via two u32 uniforms in a small ad-hoc
* uniform block (NOT the shared `Uniforms` struct, because the slot
* indices vary per chunk while the shared uniforms are set per group).
*
* @returns WGSL source for the prepare-indirect compute shader.
*/
declare const prepareIndirectWgsl: () => string;
export { prepareIndirectWgsl };