I'm currently trying to reimplement this technique for variation in tiling texture repetition – https://www.iquilezles.org/www/articles/texturerepetition/texturerepetition.htm – in Metal.
Some parts of the code refer to the textureGrad function (https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/textureGrad.xhtml). As it's not totally clear to me how this is implemented under the hood I wanted to ask if there is a MSL equivalent that I haven't found yet or maybe someone could give me a hint on how to reimplement it.
Thank you!