'Is it possible to pass a parameter from a technique to a vertex/pîxel shader?

I modified some shaders in unity and I'm trying to modify one in Cryengine.

Can I send a parameter when I call a vertex/geometry/pixel shader in the technique?

Something like

//--------
MytVertexShader bla bla ;
MyGeometryShader bla bla ;
MyPixelShader bla bla ;
//-------
technique
{
    pass p0
    {
        vertex shader = MyVertexShader (myParameter1) ;
        geometry shader = MyGeometryShader (myParameter2); 
        pixel shader = MyPixelShader (myParameter3)
    }
    pass p1
    {
        vertex shader = MyVertexShader (myParameter4) ;
        geometry shader = MyGeometryShader (myParameter5); 
        pixel shader = MyPixelShader (myParameter6)
    }
}
//--------

The goal is to have only one of each shader code with optional variations based on MyParameter.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source