Improvements to the texture encoder.