There are several places (ShaderConstants stand out) where `Any` or `some Any` are used recklessly. Let's make the entire surface area type safe.