warp.volume_sample_i#

warp.volume_sample_i(id: uint64, uvw: vec3f) int#
  • Kernel

  • Python

Sample the warp.int32 volume given by id at the index-space point uvw.

Integer volumes only support nearest-voxel sampling, so there is no sampling_mode argument (warp.Volume.CLOSEST is always used). This function is not differentiable. uvw is in index space (voxel coordinates) and may be fractional; it is rounded to the nearest voxel. Currently, exact halfway cases are rounded away from zero. Sampling uses the resolved volume value (see volume_sample()). id must identify an int32 volume.

Returns:

The sampled warp.int32 value.

See volume_sample() for a usage example.