class_docstr: Renders 3D irregularly sampled points along rays.
class_docstr_tok: ["Renders","3D","irregularly","sampled","points","along","rays","."]
docstr: Renders 3D irregularly sampled points along rays.
  
  Args:
      rgbs: RGB values of points along rays :math:`(*, N, 3)`
      densities: Volume densities of points along rays :math:`(*, N)`
      points_3d: 3D points along rays :math:`(*, N, 3)`
  
  Returns:
      Rendered RGB values for each ray :math:`(*, 3)`
docstr_tok: ["Renders","3D","irregularly","sampled","points","along","rays",".","Args",":","rgbs",":","RGB","values","of","points","along","rays",":","math",":","`","(","*",",","N",",","3",")","`","densities",":","Volume","densities","of","points","along","rays",":","math",":","`","(","*",",","N",")","`","points_3d",":","3D","points","along","rays",":","math",":","`","(","*",",","N",",","3",")","`","Returns",":","Rendered","RGB","values","for","each","ray",":","math",":","`","(","*",",","3",")","`"]
code: def forward(
      self, rgbs: Tensor, densities: Tensor, points_3d: Tensor
  ) -> Tensor:
      r"""Renders 3D irregularly sampled points along rays.
  
      Args:
          rgbs: RGB values of points along rays :math:`(*, N, 3)`
          densities: Volume densities of points along rays :math:`(*, N)`
          points_3d: 3D points along rays :math:`(*, N, 3)`
  
      Returns:
          Rendered RGB values for each ray :math:`(*, 3)`
      """
      t_vals = calc_ray_t_vals(points_3d)
      deltas = t_vals[..., 1:] - t_vals[..., :-1]  # (*, N - 1)
      far = torch.empty(
          size=t_vals.shape[:-1],
          dtype=t_vals.dtype,
          device=t_vals.device,
      ).fill_(self._huge)
      deltas = torch.cat([deltas, far[..., None]], dim=-1)  # (*, N)
  
      alpha = 1 - torch.exp(
          -1.0 * densities * deltas[..., None]
      )  # (*, N)
  
      return self._render(alpha, rgbs)
  
file_path: kornia/kornia/nerf/volume_renderer.py
imports: import torch
  from kornia.core import Tensor
  from kornia.core.check import KORNIA_CHECK_SHAPE
  from kornia.nerf.samplers import calc_ray_t_vals
label_desc: Use image node_id 1 for calling the IrregularRenderer obj's underlying member method code with example usage: obj.forward(rgbs, densities, points_3d) and returns: self