In this section, we examine the error introduced by using a lookup table to
compute
rather than using numerical methods to compute it directly.
I arbitrarily picked a resolution of 1024 by 1024 for the table. Using
floating-point values for entries, the table takes 4 MB of memory, a large
texture but well within the resource limits of today's graphics hardware.
![]() |
![]() |
Figure 1.4(a) shows the maximum error
introduced by performing a table lookup for any
pair. The error, measured as the absolute
difference between the correct
and the nearest value in the lookup
table, seldom reaches above
of the maximum intensity of the display
device, which is below what the human eye is likely to discern. However,
these values can be misleading. In practice, we use the value of
to
compute the color of a ray segment through just one of many cells.
It is fortunate that the
table error is minimized when values of
are close to zero (i.e. the cell is nearly transparent). When the
opacity is low, many cells determine the value of the final ray color.
When the opacity is high, only the closest few cells contribute to the
final ray color. Figure 1.4(b)
demonstrates the maximum cumulative error that can occur through 100 cells.
As can be seen, although the error for one cell is small when the opacity
is lowest, the cumulative error is highest in this region.
Note, however, that although we see potentially high errors, they occur only in pathological conditions with minimal attenuation and maximum fluctuation in luminance. Such errors are therefore unlikely to occur in practice. We can reduce the potential error by increasing the resolution of the lookup table or performing linear interpolation among values when performing the lookup.
![]() |
![]() |
| (a) Average Luminance and Attenuation. | (b) Partial Pre-Integration. |
![]() |
|
| (c) Linear Luminance and Attenuation. | |