Algorithm 1.
Create 2D transfer function t f from 1D transfer functions dist and data using blend parameter t. LERP is linear interpolation with the interpolant as the last argument.
| 1: for all (i, j) do |
| 2: κ ← dist[j]A |
| 3: t f[i, j]RGB ← LERP(data[i]RGB, dist[j]RGB, dist[j]A) |
| 4: t f[i, j]A ← LERP(t * data[i]A, data[i]A * dist[j]A, κ) |
| 5: end for |