Refactoring before preparations for deferred shading.