Moved parts of vertex gradient calculation to reduce memory usage (72.7)