Move offset calculation to vertex shader.