A lot of state resembles caching, and making sure those “caches” are updated properly is hard. The whole codebase begins to have to know about everywhere somebody decided to cache values, and every coder has to remember they exist and to update them all correctly even for minor code changes. Which means it causes a ton of bugs.
This, and shaders in general, are great examples of better ways to do things.
This, and shaders in general, are great examples of better ways to do things.
Often: Dynamic calculation > state