Faster TEX_RG conversion