More work on sprite rendering