Skip to main content

volume_render

Function volume_render 

Source
pub fn volume_render(
    sigma: &[f32],
    color: &[f32],
    t_vals: &[f32],
) -> NerfResult<RenderResult>
Expand description

Volume render a single ray.

  • sigma: density values [N] (non-negative; negatives are clamped to 0).
  • color: RGB values [N * 3] in [0, 1].
  • t_vals: sample positions [N] along the ray.

Last segment uses delta = 1e10 (infinity).

§Errors

Returns DimensionMismatch if sizes don’t match, EmptyInput if N == 0, VolumeRenderError for invalid configurations.