Spectral Lighting

 

First calculate wavelength = ((420*(x/nx))+380), and do a lookup into the table Pete provided to find the amplitude.

Next, find X, Y, Z = amplitude*intensity (intensity = y/ny).

Next, find x, y, z = X/(X+Y+Z), Y/(X+Y+Z), Z/(X+Y+Z)

Next, find y0 = kY/(1+kY), x0 = x*y0 / y , z0 = (1-x-y) * y0 / y

Finally, Tone map using the matrix Pete provided and clamp to [0, 1]

 

k = 0.5

 

k = 1

 

 

k = 4

 

k = 16

 

 

k = 200

 

 

 

The views and opinions expressed in this page are strictly those of the page author.
The contents of this page have not been reviewed or approved by the University of Minnesota.