replaced plain scale with target resolution, to make rendering faster on the device