2 ms·
The interaction of light with multiple thin layers of dielectric material is first-year physics — you can compute all the reflections at the interfaces and the
by amluto 4y ago
The interaction of light with multiple thin layers of dielectric material is first-year physics — you can compute all the reflections at the interfaces and the phase shifts through the layers as a function of wavelength and angle, and you can reassemble the result into a reflection coefficient. It depends only on angle of incidence and wavelength, and the angle of reflection equals the angle of incidence just like for a specular reflector.
So a shader should be able to handle this, in a physics-based way, as long as the path tracer can handle the wavelength dependence in a reasonable manner.
- amelius 4y agoPerhaps in the middle of the object. Near the edges it probably breaks down. Anyway, if someone asks you to make a physically correct rendering of a scene, would you reach for a shader?
- amluto 4y ago> Perhaps in the middle of the object. Near the edges it probably breaks down. How so? The results from Maxwell’s equations are valid at any angle of incidence. And, as noted, even the algorithm in this paper can’t model the edges of an object. > Anyway, if someone asks you to make a physically correct rendering of a scene, would you reach for a shader? Yes, absolutely. To be clear, I’m not talking about a fragment shader in a traditional rasterizer. I’m taking about a shader that executes when a ray hits an object. As I recall, POV-Ray was fixed-function, albeit a rather flexible fixed function. Modern ray tracers, path tracers, etc have shaders. Here’s a very modern one. Search for “shader”: https://openmoonray.org/about https://openmoonray.org/about