# tfg.rendering.volumetric.ray_radiance.compute_radiance

<br />

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

Renders the rgba values for points along a ray, as described in ["NeRF Representing Scenes as Neural Radiance Fields for View Synthesis"](https://github.com/bmild/nerf).

    tfg.rendering.volumetric.ray_radiance.compute_radiance(
        rgba_values: type_alias.TensorLike,
        distances: type_alias.TensorLike,
        name: str = 'ray_radiance'
    ) -> Tuple[tf.Tensor, tf.Tensor, tf.Tensor]

<br />

<br />

<br />

| ## Note ||
|---|---|
| In the following, A1 to An are optional batch dimensions. ||

<br />

<br />

<br />

<br />

| ## Args ||
|---|---|
| `rgba_values` | A tensor of shape `[A1, ..., An, N, 4]`, where N are the samples on the ray. |
| `distances` | A tensor of shape `[A1, ..., An, N]` containing the distances between the samples, where N are the samples on the ray. |
| `name` | A name for this op. Defaults to "ray_radiance". |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| A tensor of shape `[A1, ..., An, 3]` for the estimated rgb values, a tensor of shape `[A1, ..., An, 1]` for the estimated density values, and a tensor of shape `[A1, ..., An, N]` for the sample weights. ||

<br />