sure, this was raw version of script.
To work with wParallax version of OSL WindowsBox script you need modify coordinate system.
I attach modified version with custom function getFaceTransformMatrix.
To make it work with RailClone, just enable "multiPlanarObj" settin value to 1 like in attachment.
With "multiPlanarObj" enabled all polygons get own coordinate system for shading.