Materials: factor out area- and non-area-specific shading logic