Interpolate a single vertex attribute across the input framebuffer.
tfg.rendering.interpolate.interpolate_vertex_attribute(
attribute: tf.Tensor,
framebuffer: tfg.rendering.framebuffer.Framebuffer
,
background_value: Optional[Union[tf.Tensor, Iterable[float]]] = None
) -> tfg.rendering.framebuffer.RasterizedAttribute
Args |
attribute
|
2-D or 3-D vertex attribute Tensor with shape [batch,
num_vertices, num_channels] or [num_vertices, num_channels].
|
framebuffer
|
Framebuffer to interpolate across. Expected to contain
barycentrics, vertex_ids, and foreground_mask.
|
background_value
|
1-D Tensor (or convertible value) with shape
[num_channels] containing the value to use for background pixels. If None,
defaults to zero.
|
Returns |
A RasterizedAttribute containing the per-pixel interpolated values.
|