Adds new ColorMask StateAttribute, refactor earlyZ to a reusable class