A combination of a linear gradient with the 'Sphere' distance curve preset could cause NaN values due to evaluating the sqrt of a negative value. To avoid this, clamp the input value to a lower bound of 0.0f. This fixes the Smooth, Sphere, and Inverse Square presets. Pull Request: https://projects.blender.org/blender/blender/pulls/146693