Optimization of deferred shading