jeanphi wrote:My idea was that a generic 2 layer BSDF would be stackable to allow multilayers.
I'm not entirely sure what you mean by stackable?
jeanphi wrote:Regarding the specular reflection, you get to it either with the Rho member or by updating the Weight member which is meant for that (only used by glass currently with specular transmission/reflection). The hardest part here is that the specular reflection depends on the half angle which you don't know beforehand, I hadn't found any elegant heuristic to solve that part.
Rho is not thread safe and I'm not sure what good it would do in any case. Weight seems good. As for the sampling... As mentioned, from my limited tests simply using the specular reflection direction to compute H (ie H == N) seemed to work well.
jeanphi wrote:For the coating absorption, I planed to reference a named volume for the coating, this would give the IOR and the absorption in one go, plus allow scattering if we ever want to support it... It would be stored in the BSDF along with the coating depth so the BSDF would have all element to compute the absorption.
This sounds like a good idea.