This paper presents a technique called Clustered Shading for deferred and forward rendering. In Clustered Shading, samples from the view are grouped into clusters based on their 3D position and normal, rather than just 2D position as in tiled shading. This creates a better mapping of lights to samples, reducing lighting computations. Clustered Shading also enables back-face culling of lights per cluster. The technique results in significantly fewer lighting computations than tiled shading. It allows real-time rendering of scenes with thousands more lights than previously possible.