Texture testing code