I am working with SharpDX, i thinking to try using (uniform) global variables for HLSL constants instead of constant buffers.
But, in my code SharpDX's Effect class is not used: i use PixelShader and VertexShader classes instead - constructed directly from bytecode blobs (i just don't use techniques/passes, i compile shaders separately).
With Effect class, i can assign new value to any constant in HLSL program by its name, as DirectX allows that, in any time. Example (i haven't tested this; yes, its ugly here):
SharpDX.Direct3D11.Effect fx = //
fx.GetVariableByName("someOption").AsVector().Set<Vector3>(newVectorValue);//nice
But i don't use Effect class. How can i set global HLSL variable using Vertex/PixelShader class instance? If it is not possible, shame on SharpDX dev then, in native DirectX it is much easier.