I stumbled upon this paper by Morten S. Mikkelsen called "Practical Real-Time Hex-Tiling" and couldn't find anyone who implemented it in OSL, so I decided to do it myself. The paper is a simplification of a method for using a tileable texture in a way that is less visually repetitive than traditional tiling. The exact theory behind this was over my head, but the end result was very compelling.
The code is tested to work across Redshift and Arnold GPU, and while it likely works with any other renderer which supports OSL, those are the only two I verified.


Here's the interface I created for the hex-tiling setup. The paper outlines a method for working with rotated normal maps as well, but it makes use of texture gradients and partial derivatives, which aren't yet implemented into Redshift's OSL code (and they sound like something that I'm at least a few math degrees short of doing myself).
