Builtin Library
- ..
- README.md992 B
- bindings.yaml1.8 KB
- shader.wgsl625 B
README.md
hash_nearest
The nearest indexed point of each query position, found through the spatial hash
the hash and hash_starts kernels build, with its squared distance. A query
walks the cells within a few shells of its own and, when that cannot prove its
answer, reads every point. The lower index wins of two points equally near.
Exact.
It writes nearest (the index, 0xffffffff when no point is indexed) and dist2,
one each a query. The params are points (the indexed points), buckets,
inv_cell, rings (the shells walked before the search over every point,
default 2) and skip_self (1 leaves out the point whose index is the query's).
core.neighbours finds each point's nearest source and its distance with it.
Over a live number of indexed points (POINTS=device) params.points is the most points there can be, and the first
point_count of them are indexed: the search over every point stops at the live ones, and a query with none indexed
reports the none marker.