Speed up gradient lookup.
Normalize gradients.
Add a direct vec3 implementation.
Fix normalize().