templatized shader
dynamically control extent of flat-earth approximation