changed algorithm building texture path