|
This function calculates the color for a single pixel. This function uses the Front To Back Levoy Algorithm. First, a view ray is calculated and clipped to the 6 bounding planes. Then the clipping points are sorted by the distance to the viewer. Then a ray From the nearest to the farthest clipping point is shot and the voxel array is sampled with a specified step size. With every step along the ray the color value and the accumulated alpha value are recalculated, if the alpha value is larger than zero. If the accumulated alpha value equals 1, then the ray is finished and need not be followed any further.
|