How do you create a rainbow reflection material?

With specular maps not being used for special reflections anymore, how would you go about creating a material that reflected a rainbow spectrum of light, like an opal, or an abalone pearl, or holographic cards?

Here’s an example of how you could do it. Think of it as a jumping off point. The key to this example is the Dot node. You can also use the Fresnel node for similar effects.

I started with the example material M_Metal_Burnished_Steel. All those nodes are intact in the “From sample material” comment.