1. A method comprising: receiving a primitive defined by vertices in three-dimensional (3D) space that is specific to an object defined by at least the primitive; computing a shading sample rate for the primitive; defining an object-space shading grid that is specific to the primitive, wherein a shape of an object-space shading element corresponds to a shape of the primitive, wherein the object-space shading grid comprises at least one object-space shading element, and points on the object-space shading grid are identified based on the shading sample rate; and executing, by a processing pipeline, a shader program to compute shaded attributes for the primitive by sampling the object-space shading grid.