# tfg.rendering.interpolate.interpolate_vertex_attribute

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/graphics/blob/master/tensorflow_graphics/rendering/interpolate.py#L23-L86) |

Interpolate a single vertex attribute across the input framebuffer.

    tfg.rendering.interpolate.interpolate_vertex_attribute(
        attribute: tf.Tensor,
        framebuffer: https://www.tensorflow.org/graphics/api_docs/python/tfg/rendering/framebuffer/Framebuffer,
        background_value: Optional[Union[tf.Tensor, Iterable[float]]] = None
    ) -> https://www.tensorflow.org/graphics/api_docs/python/tfg/rendering/framebuffer/RasterizedAttribute

<br />

<br />

<br />

| ## 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. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A RasterizedAttribute containing the per-pixel interpolated values. ||

<br />