warp.volume_sample_grad_f#

warp.volume_sample_grad_f(
id: uint64,
uvw: vec3f,
sampling_mode: int32,
grad: vec3f,
) float#
  • Kernel

  • Python

  • Differentiable

Sample the warp.float32 volume given by id and its gradient at the index-space point uvw.

grad receives the gradient of the sampled value with respect to the index-space coordinates uvw (a warp.vec3, zero for warp.Volume.CLOSEST). In kernels, volume_sample_grad_f() is equivalent to volume_sample_grad() with dtype=float.

Returns:

The sampled warp.float32 value.

See volume_sample_grad() for a usage example.