generalized grid rendering