News for hackers. Stuff that matters.
Re:A Generalized Ray Formulation for Wave-Optics Rendering by amluto on Tuesday April 04, 2023 @01:58PM (#35443565)
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.

Re:A Generalized Ray Formulation for Wave-Optics Rendering by amelius on Tuesday April 04, 2023 @02:45PM (#35444208)
Perhaps 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?

Re:A Generalized Ray Formulation for Wave-Optics Rendering by amluto on Tuesday April 04, 2023 @03:18PM (#35444616)
> 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