Pass equations into shaders to define graphics – HLSL or other shaders

Is it possible with HLSL (or other popular shader languages) to pass instead of an image, an equation that would define the pixel color / position output by the shader? This would allow for more dynamic drawing of smooth shapes that could be sampled with infinite detail. They would also by able to change and morph in real time.

Not sure how this is possible without passing a string with the eq to the shader and having it parse it. Seems like that might lose all the performance gained by putting it onto the GPU.