Is all spectral rendering handled as simulation? Are there technique more tailored to 'consumer' rendering, such as for real-time or even just 'realistic looking without solving full physical equations'?

I'd like to understand how we handle the rendering of spectral effects. It seems like a photon needs to be described as a range of wavelengths, and incidence with a surface either

  • replaces the original, and resolves multiple new photons across the spectral function, each with their own new vector
  • maintains the original (or marginally modified) photon, given a threshold

I would prefer to be pointed in the direction of existing work, but appreciate any coloring of this topic.

  • $\begingroup$ I feel like this question is way too broad as it stands. Whole books have been written on the subject. Perhaps you could narrow it down to a specific question that's not covered by existing resources? $\endgroup$
    – Dan Hulme
    Commented Jan 5, 2016 at 15:20
  • $\begingroup$ I can see this being answered along the lines of "There are hundreds of ways, each of which falls into one of the following N broad categories. If you want to know specific detail about one of these categories you can ask a new question." $\endgroup$ Commented Jan 5, 2016 at 16:17

2 Answers 2


The most common way I saw is to have photons of several different wavelengths. One then renders with each wavelength and blends the results into the final image.

"Existing work": Psychopath Renderer and The Secret Life of Photons.


One hacky method I've seen in real time raytracers / ray marching is to cast a ray per color channel (rgb) and do things Iike have different refraction indices per color channel.

  • $\begingroup$ Interesting. Could you point us to any sources, examples or results of this approach? $\endgroup$
    – David Kuri
    Commented Jan 5, 2016 at 9:11
  • $\begingroup$ I'm on my phone so can't take a screenshot, but this shadertoy uses the method and looks pretty decent: shadertoy.com/view/ltfXDM $\endgroup$
    – Alan Wolfe
    Commented Jan 5, 2016 at 12:30
  • 2
    $\begingroup$ POV-Ray is an open-source ray-tracer that uses a similar method to simulate dispersion. It's not a ray per channel: you can configure how many rays are used, spread equally across the spectrum. $\endgroup$
    – Dan Hulme
    Commented Jan 5, 2016 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.