warp.volume_sample_grad_index#

warp.volume_sample_grad_index(
id: uint64,
uvw: vec3f,
sampling_mode: int32,
voxel_data: Array[Any],
background: Any,
grad: Any,
) Any#
  • Kernel

  • Differentiable

Sample the volume given by id and its gradient at the volume local-space point uvw.

Values for allocated voxels are read from the voxel_data array, and background is used as the value of non-existing voxels. Interpolation should be warp.Volume.CLOSEST or warp.Volume.LINEAR. This function is available for both index grids and classical volumes.