Vertex shader string variable

Hi
is it possible to use some string variable for a vertex shader? I d like to be able to input arbitrary functions for the newPos

float Scale = 1;
float Offset = 0;
 
float3 Mesh(float2 uv)
{
 
     uv *= Scale;
     uv += Offset;
 
    float u = uv.x;
    float v = uv.y;
 
    float3 newPos;
                  // replace here the math function for a string variable 
    newPos.x = cos(v)+u*cos(v/2)*cos(v);
    newPos.y = u*sin(v/2);
    newPos.z = sin(v)+u*cos(v/2)*sin(v);
 
    return newPos;
}
 
vs2ps VS(
    float4 PosO  : POSITION,
    float4 TexCd : TEXCOORD0)
{
    //declare output struct
    vs2ps Out;
 
    //set new position
    PosO.xyz = Mesh(PosO.xy);
 
    //transform position
    Out.Pos = mul(PosO, tWVP);
 
    //transform texturecoordinates
    Out.TexCd = mul(TexCd, tTex);
 
    return Out;
}

Hi,

no it’s not possible to use string in any shader language (for the purpose you need).

If you need fast switching between functions you can do one technique per function, but there is no dynamic parsing in hlsl.

Ok then I am left with the option to recreate those functions in the patch (using CPU) and adding the results as variables … other ideas?