Implements the Textexture algorithm.