This shader reproduces the effect of thin film interference on a surface. It is based on code found here:
The shader can be used in the reflection color slot of a VRayMtl material through a VRayOSLTex, with the Fresnel option for the material turned off (the shader does its own Fresnel calculations).
The shader code and a sample scene are here: thinfilm.zip
thicknessMin - the minimum thickness of the thin film, in nanometers.
thicknessMax - the maximum thickness of the thin film, in nanometers.
thickness - a texture map that specifies the actual thickness of the film between the specified min and max thickness values. Normally this would be something like a noise map to give some variation to the interference effect. If this is left blank, the thicknessMin parameter specifies the film thickness.
nmedium - refractive index of the medium surrounding the material. Normally this is set to 1.0 for air.
nfilm - refractive index of the medium that the thin film is made of.
ninternal - refractive index of the medium below the thin film.
Here is the shader code: