Updated for optamized texture formats.