support for multiple retinas, variable size, and downsampling to fix the demo