title: How do I combine Phong lighting with Fresnel dielectric reflection/transmission realistically?
body: <p><strong>UPDATE:</strong> I answered my own question about what illumination model to use, but now I need to know how to calculate the Fresnel terms for reflected and transmitted rays.</p>
  
  <p>I have a partially-implemented C++ ray tracer. Right now Phong lighting with shadow rays works fine. I chose not to have entities with a single color plus scalar ambient/diffuse/scalar coefficients; the three coefficients each have RGB components, so I can implement materials like <a href="http://globe3d.sourceforge.net/g3d_html/gl-materials__ads.htm#25_8" rel="nofollow">these</a>. Lights, on the other hand, have a single RGB color plus scalar diffuse and specular intensities. There's also a single RGB ambient light.</p>
  
  <p>At this point I could also implement completely dielectric entities that reflect or transmit all light, with the proportion of reflected to refracted light determined by the Fresnel equations. However, how do I realistically combine the reflected and refracted colors with the Phong color? I want to have slightly reflective colored plastic, polished gold, perfect mirrored or glass spheres, stained glass, glass panes that are transparent head-on but green on the edges, et cetera. I was planning to add RGB reflectance and transmittance coefficients to each entity, and let the entity designer make sure that ambient+diffuse+specular+reflectance+transmittance lies in a sensible range, but this seems arbitrary. Is there a physically based way?</p>